.stl-model-preview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid var(--rz-border-color, #dee2e6);
    border-radius: 8px;
    padding: 0.75rem;
    background: #fff;
    width: 100%;
    max-width: min(100%, 1200px);
    margin-inline: auto;
}

.stl-model-preview.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2500;
    max-width: none;
    margin: 0;
    border-radius: 0;
    padding: 1rem;
    overflow: auto;
}

.stl-model-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.stl-model-preview-title {
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-all;
    flex: 1 1 auto;
    min-width: 0;
}

.stl-model-preview-canvas-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.stl-model-preview-canvas {
    width: 100%;
    max-width: min(100%, 1200px);
    height: min(1000px, calc(100vh - 320px));
    min-height: 240px;
    background: #282858;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.stl-model-preview.is-fullscreen .stl-model-preview-canvas {
    height: min(1000px, calc(100vh - 180px));
    max-width: min(100%, 1400px);
}

.stl-model-preview-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    max-width: min(100%, 1200px);
    margin-inline: auto;
}

.stl-model-preview-controls .depth-slider {
    flex: 1 1 200px;
    min-width: 160px;
}

.product-area-calculation-dialog {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.product-area-calculation-dialog .rz-tabview {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.product-area-calculation-dialog .rz-tabview-panels {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.product-area-calculation-3d-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.product-area-calculation-nesting-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rz-border-color, #dee2e6);
}

.product-area-kit-count-field {
    margin-left: auto;
}

.product-area-complect-area-total {
    margin-left: auto;
}

.product-area-result-kit-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-top: 0.5rem;
}

.product-area-complect-area-per-result {
    min-width: 160px;
}

.product-area-complect-area-value-sm {
    font-size: 1.25rem;
}

.product-area-complect-area-display {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 180px;
}

.product-area-complect-area-label {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.2;
}

.product-area-complect-area-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--rz-text-color, #212529);
}

.product-area-complect-area-unit {
    font-size: 1rem;
    font-weight: 600;
}

.product-area-calculation-nesting-result {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rz-border-color, #dee2e6);
}

.product-area-calculation-nesting-result-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.product-area-autofit-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--rz-text-color, #212529);
    cursor: pointer;
    user-select: none;
}

.product-area-manual-sheet-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.product-area-calculation-nesting-result:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contour-nesting-editor-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contour-nesting-editor-meta {
    font-size: 0.9rem;
    line-height: 1.5;
}

.contour-nesting-editor-hint {
    color: #666;
    font-size: 0.85rem;
}

.contour-nesting-editor-sheet-wrap {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px;
    min-height: 240px;
    max-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.contour-nesting-editor-sheet {
    width: 100%;
    height: 100%;
    max-height: 400px;
    touch-action: none;
}

.contour-nesting-item {
    cursor: grab;
}

.contour-nesting-item.dragging {
    cursor: grabbing;
}

.contour-nesting-item path {
    fill: rgba(30, 136, 229, 0.25);
    stroke: #1565c0;
    stroke-width: 0.4;
}

.contour-nesting-item.selected path {
    fill: rgba(255, 152, 0, 0.35);
    stroke: #ef6c00;
    stroke-width: 0.8;
}
