/* ==========================================================================
   CUTLIST SLIDING WARDROBE DOORS CONFIGURATOR
   Exact Pixel-Perfect Design from Specification
   ========================================================================== */

:root {
    --sd-green-primary: #1e7e34;
    --sd-green-hover: #156525;
    --sd-green-light: #f0fdf4;
    --sd-green-border: #86efac;
    --sd-green-badge: #22c55e;
    --sd-gray-bg: #f3f4f6;
    --sd-gray-border: #e5e7eb;
    --sd-gray-text: #4b5563;
    --sd-dark-text: #111827;
    --sd-amber-bg: #fff7ed;
    --sd-amber-border: #ffedd5;
    --sd-amber-text: #c2410c;
    --sd-red-primary: #dc2626;
    --sd-red-border: #ef4444;
    --sd-red-bg: #fef2f2;
}

.sd-configurator-wrapper {
    margin-top: 25px;
    margin-bottom: 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--sd-dark-text);
}

/* ===================== SLIDING DOORS ACCORDION SET ===================== */
.sd-sets-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sd-set {
    background: #ffffff;
    border: 1px solid var(--sd-gray-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.sd-set:hover {
    box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.08);
}

/* Set Header */
.sd-set-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 18px;
    cursor: pointer;
    background: #ffffff;
    user-select: none;
}

.sd-set-title-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sd-set-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    border-radius: 8px;
    color: #16a34a;
    flex-shrink: 0;
}

.sd-set-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--sd-dark-text);
    letter-spacing: -0.01em;
}

.sd-set-collapse {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #16a34a;
    transition: color 0.15s ease;
}

.sd-set-collapse:hover {
    color: #15803d;
}

.sd-chevron-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.sd-set.collapsed .sd-chevron-icon {
    transform: rotate(180deg);
}

.sd-set.collapsed .sd-set-content {
    display: none;
}

.sd-set.collapsed .sd-collapse-text::before {
    content: 'Expand';
}

.sd-collapse-text::before {
    content: 'Collapse';
}

/* ===================== CREATOR STEPS CHEVRON TABS ===================== */
.sd-steps-wrap {
    padding: 0 24px 20px;
}

.sd-steps {
    display: flex;
    align-items: stretch;
    background: var(--sd-gray-bg);
    border-radius: 10px;
    overflow: hidden;
}

.sd-step {
    flex: 1;
    padding: 12px 10px 12px 28px;
    position: relative;
    background: var(--sd-gray-bg);
    color: var(--sd-gray-text);
    font-size: 13.5px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
    margin-right: -1px;
    transition: all 0.2s ease;
    user-select: none;
}

.sd-step:first-child {
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
    padding-left: 18px;
}

.sd-step.sd-step-last {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
}

.sd-step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Active Step */
.sd-step.current {
    background: var(--sd-green-primary);
    color: #ffffff;
    font-weight: 600;
    z-index: 2;
}

.sd-step.current .sd-step-badge {
    background: #ffffff;
    color: var(--sd-green-primary);
}

/* Enabled Steps */
.sd-step.enabled:not(.current) {
    color: var(--sd-dark-text);
    cursor: pointer;
    background: #e5e7eb;
}

.sd-step.enabled:not(.current):hover {
    background: #d1d5db;
}

.sd-step.enabled:not(.current) .sd-step-badge {
    background: #d1d5db;
    color: #374151;
}

/* Disabled Steps */
.sd-step.disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

/* ===================== STEP 0: OPENING SIZE CONTROLS ===================== */
.sd-step-panel {
    display: none;
    background: #ffffff;
}

.sd-step-panel.active {
    display: block;
}

.sd-opening-size {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 24px 18px;
}

.sd-input-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sd-input-col label {
    font-size: 13px;
    color: #4b5563;
    font-weight: 600;
}

.sd-input-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sd-field-icon {
    position: absolute;
    left: 12px;
    color: #64748b;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-text-input {
    width: 150px;
    height: 42px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sd-dark-text);
    padding: 0 12px 0 38px;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sd-text-input:focus {
    outline: none;
    border-color: var(--sd-green-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.sd-text-input:disabled {
    background: #f9fafb;
    cursor: not-allowed;
    opacity: 0.6;
}

.sd-text-input.sd-input-error {
    border-color: #dc2626 !important;
}

.sd-input-error-msg {
    display: none;
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    color: #dc2626;
    line-height: 1.35;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.08);
    width: 175px;
    box-sizing: border-box;
}

.sd-input-error-msg::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #fca5a5;
}

.sd-input-error-msg::before {
    content: '';
    position: absolute;
    top: calc(100% - 1.5px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #fef2f2;
    z-index: 1;
}

.sd-input-error-msg.visible {
    display: block;
}

/* Door Number Select2 Dropdown */
.sd-door-select {
    width: 140px;
}

.sd-door-select.isDisabled {
    pointer-events: none;
    opacity: 0.5;
}

.sd-door-select.isDisabled .Select2__input-wrapper {
    background: #f9fafb;
}

.Select2 {
    position: relative;
    width: 100%;
    user-select: none;
}

.Select2__input-wrapper {
    display: flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    height: 42px;
    padding: 0 12px;
    cursor: pointer;
    gap: 8px;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.Select2__input-wrapper:hover {
    border-color: #9ca3af;
}

.Select2.is-open .Select2__input-wrapper {
    border-color: var(--sd-green-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.Select2__left-icon {
    display: flex;
    align-items: center;
    color: #64748b;
    flex-shrink: 0;
}

.Select2__input {
    flex: 1;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    color: var(--sd-dark-text);
}

.Select2.isEmpty .Select2__input {
    display: none;
}

.Select2__placeholder {
    color: #9ca3af;
    font-size: 13.5px;
    flex: 1;
    display: none;
}

.Select2.isEmpty .Select2__placeholder {
    display: block;
}

.Select2__arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #4b5563;
}

.Select2__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    max-height: 200px;
    overflow-y: auto;
}

.Select2.is-open .Select2__dropdown {
    display: block;
}

.Select2__option {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--sd-dark-text);
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.12s ease;
}

.Select2__option:hover {
    background: var(--sd-green-light);
    color: var(--sd-green-primary);
}

.Select2__option:last-child {
    border-bottom: none;
}

/* Guide Action Buttons */
.sd-doc-btns {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.sd-doc-btn {
    height: 42px;
    padding: 0 18px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.sd-doc-btn:hover {
    background: #dcfce7;
    border-color: #4ade80;
}

.sd-doc-btn svg {
    color: #16a34a;
}

/* ===================== NOTICE / INFO BANNER ===================== */
.sd-warning-bar-wrap {
    padding: 0 24px;
    margin-bottom: 18px;
}

.sd-warning-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 49.78px;
    padding: 8px 16px;
    background: var(--sd-amber-bg);
    border: 1px solid var(--sd-amber-border);
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--sd-amber-text);
    box-sizing: border-box;
    gap: 12px;
}

.sd-warning-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.sd-selection-warning-wrap {
    margin-bottom: 16px;
    animation: sdSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sdSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sdDoorPulse {
    0% {
        background: rgba(254, 243, 199, 0);
    }

    50% {
        background: rgba(251, 191, 36, 0.35);
        box-shadow: inset 0 0 0 3px #f59e0b;
    }

    100% {
        background: rgba(254, 243, 199, 0);
    }
}

.sd-door-pulse {
    animation: sdDoorPulse 0.9s ease-in-out 2;
}

/* ===================== OVERSIZE DOOR NOTICE BANNER ===================== */
.sd-oversize-warning-wrap {
    padding: 0 24px;
    margin-bottom: 14px;
    animation: sdSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sd-oversize-warning-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #92400e;
    box-sizing: border-box;
    gap: 12px;
}

.sd-oversize-warning-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.sd-oversize-warning-icon {
    width: 20px;
    height: 20px;
    color: #d97706;
    flex-shrink: 0;
    margin-top: 1px;
}

.sd-oversize-warning-text {
    font-weight: 500;
}

.sd-oversize-warning-text strong {
    font-weight: 700;
    color: #78350f;
}

.sd-summary-oversize-tag {
    display: inline-block;
    padding: 2px 7px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

.sd-info-circle-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ea580c;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    font-style: italic;
    flex-shrink: 0;
}

.sd-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    margin: 0;
    height: 32px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.sd-reset-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.sd-canvas-reset-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #86efac;
    color: var(--sd-green-primary, #1e7e34);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    user-select: none;
    pointer-events: auto !important;
}

.sd-canvas-reset-btn:hover {
    background: #f0fdf4;
    border-color: var(--sd-green-primary, #1e7e34);
    color: var(--sd-green-hover, #156525);
    box-shadow: 0 4px 14px rgba(30, 126, 52, 0.18);
    transform: translateY(-1px);
}

.sd-canvas-reset-btn:active {
    transform: translateY(0);
}

/* Restrict canvas reset button strictly to Tab 2: Frame style (data-step="1") */
.sd-set:not([data-step="1"]) .sd-canvas-reset-btn,
.sd-step-panel:not([data-panel="1"]).active ~ .sd-render-wrap .sd-canvas-reset-btn {
    display: none !important;
}

/* ===================== 2D VISUALIZER CANVAS STAGE ===================== */
.sd-render-wrap {
    padding: 0 24px 24px;
}

.sd-render-box {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.sd-render {
    position: relative;
    height: 520px;
    width: 100%;
}

.sd-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Vertical Seam Floating Switch Buttons */
.sd-switch-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.sd-switch-wrap {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.sd-switch-btn {
    pointer-events: all;
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    border-radius: 9999px;
    padding: 7px 22px;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    user-select: none;
    line-height: 1.2;
    outline: none;
}

.sd-switch-btn:hover {
    background: #ffffff;
    border-color: var(--sd-green-primary);
    color: var(--sd-green-primary);
    box-shadow: 0 4px 14px rgba(30, 126, 52, 0.14);
    transform: scale(1.05);
}

.sd-switch-btn:active {
    transform: scale(0.98);
}

.sd-switch-btn.active {
    background: #ffffff;
    border-color: var(--sd-green-primary);
    color: var(--sd-green-primary);
    box-shadow: 0 2px 10px rgba(30, 126, 52, 0.2);
}

.sd-switch-btn:disabled,
.sd-switch-btn.disabled {
    opacity: 1 !important;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    color: #64748b;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transform: none !important;
}

/* Step 2 & 3 Selection & Edit Overlays */
.sd-door-overlay-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.sd-door-select-zone,
.sd-panel-select-zone {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    box-sizing: border-box;
    user-select: none;
}

.sd-door-select-zone:not(.is-selected):hover,
.sd-panel-select-zone:not(.is-selected):hover {
    background: rgba(254, 243, 199, 0.45);
}

.sd-door-edit-badge {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1.2;
}

/* Step 1: Door Size Adjust Handles & Max Size Indicator */
.sd-door-adjust-handle {
    position: absolute;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: auto;
    cursor: ew-resize;
    user-select: none;
    z-index: 50;
    line-height: 1.3;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.sd-door-adjust-handle:hover {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.24);
    transform: translate(-50%, -50%) scale(1.05);
}

.sd-door-adjust-handle.is-dragging {
    background: #fed7aa;
    border-color: #ea580c;
    color: #7c2d12;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
    transform: translate(-50%, -50%) scale(1.07);
}

.sd-door-adjust-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    vertical-align: middle;
}

.sd-door-adjust-arrow.is-right {
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid #ea580c;
    margin-left: 2px;
}

.sd-door-adjust-arrow.is-left {
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 7px solid #ea580c;
    margin-right: 2px;
}

.sd-door-max-size-hint {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #c2410c;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    z-index: 40;
    letter-spacing: 0.2px;
    background: #ffedd5;
    padding: 5px 14px;
    border-radius: 8px;
    border: 1.5px solid #ea580c;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
    animation: sdPulseLimit 0.8s ease-in-out infinite alternate;
}

@keyframes sdPulseLimit {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.sd-door-edit-badge:hover {
    background: #f8fafc;
    border-color: #16a34a;
    color: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.18);
}

.sd-panel-edit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    color: #000000;
    pointer-events: none;
    user-select: none;
    transition: transform 0.12s ease;
}

.sd-panel-select-zone:hover .sd-panel-edit-badge {
    transform: scale(1.1);
}

/* Placeholder Step Content */
.sd-step-placeholder {
    padding: 40px 24px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* ===================== STEP 1: FRAME STYLE ===================== */
.sd-frame-style-panel {
    padding: 0 24px 20px;
}

.sd-frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.sd-frame-card {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.sd-frame-card:hover {
    border-color: var(--sd-green-border);
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.08);
}

.sd-frame-card.active {
    border: 2.5px solid var(--sd-green-primary);
    background: #f8fafc;
    box-shadow: 0 4px 16px rgba(30, 126, 52, 0.15);
}

.sd-frame-card-icon {
    width: 60px;
    height: 70px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.sd-frame-card-icon svg {
    width: 100%;
    height: 100%;
}

.sd-frame-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.sd-frame-card-price {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 500;
}

.sd-frame-card-badge {
    margin-top: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--sd-green-primary);
    background: var(--sd-green-light);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--sd-green-border);
    transition: all 0.15s ease;
}

.sd-frame-card.active .sd-frame-card-badge {
    background: var(--sd-green-primary);
    color: #ffffff;
    border-color: var(--sd-green-primary);
}

.sd-frame-colors-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 10px;
}

.sd-frame-colors-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-frame-colors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sd-frame-color-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.15s ease;
    user-select: none;
}

.sd-frame-color-chip:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.sd-frame-color-chip.active {
    border-color: var(--sd-green-primary);
    background: var(--sd-green-light);
    color: var(--sd-green-primary);
    box-shadow: 0 0 0 2px rgba(30, 126, 52, 0.2);
}

.sd-frame-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* ===================== STEP 2: DOOR DESIGN (MATCHING SCREENSHOT 1) ===================== */
.sd-door-design-panel {
    padding: 0 24px 20px;
}

.sd-designs-grid {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.sd-design-card {
    flex: 1;
    min-width: 140px;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.sd-design-card:hover {
    border-color: var(--sd-green-border);
}

.sd-design-card.active {
    border: 3px solid var(--sd-green-primary) !important;
}

.sd-design-preview {
    height: 140px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.sd-design-preview svg {
    height: 100%;
    width: auto;
    display: block;
}

.sd-design-footer {
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    padding: 10px 8px;
    text-align: center;
}

.sd-design-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}

.sd-design-subtitle {
    font-size: 10.5px;
    color: #6b7280;
    margin-top: 3px;
    line-height: 1.1;
}


/* ===================== STEP 3: PANEL DESIGN (MATCHING SCREENSHOT 2) ===================== */
.sd-panel-design-step {
    padding: 0 24px 20px;
}

.sd-panel-design-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sd-panel-card {
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.15s ease;
}

.sd-panel-card:hover {
    border-color: var(--sd-green-primary);
    box-shadow: 0 6px 16px rgba(30, 126, 52, 0.12);
}

.sd-panel-card.active {
    border: 2.5px solid var(--sd-green-primary);
}

.sd-panel-swatches-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 8px;
    background: #ffffff;
}

.sd-panel-mini-swatch {
    height: 48px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background-size: cover;
    background-position: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sd-panel-card-footer {
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* ===================== MODAL POPUPS (MATCHING SCREENSHOT 3 & MOCKUP) ===================== */
.sd-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sd-modal-overlay.is-visible {
    display: flex;
}

.sd-modal-dialog {
    background: #ffffff;
    border-radius: 4px;
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    position: relative;
    padding: 30px;
    box-sizing: border-box;
    font-family: inherit;
    margin: auto;
}

/* ===================== OVERSIZED DOOR / DOOR DESIGN WARNING MODAL (CUTLIST THEME) ===================== */
#sdOversizeModalOverlay {
    z-index: 1000005;
}

.sd-oversize-modal-dialog {
    max-width: 500px;
    width: 92vw;
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 30px 28px;
    box-shadow: 0 25px 45px -10px rgba(15, 23, 42, 0.25), 0 12px 20px -8px rgba(15, 23, 42, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    border: 1px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sd-oversize-modal-icon-badge {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #fffbeb;
    border: 2px solid #fef3c7;
    box-shadow: 0 0 0 6px #fef9c3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    box-sizing: border-box;
    flex-shrink: 0;
}

.sd-oversize-modal-icon-badge svg {
    display: block;
    width: 28px;
    height: 28px;
}

.sd-oversize-modal-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px 0;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.sd-oversize-modal-desc {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px;
    line-height: 1.6;
    color: #1e293b;
    font-weight: 450;
    margin: 0 0 24px 0;
    width: 100%;
    box-sizing: border-box;
}

.sd-oversize-modal-desc strong {
    color: #0f172a;
    font-weight: 700;
}

/* Structured Highlight Card */
.sd-oversize-highlight-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

/* Stats Grid: Current vs Maximum */
.sd-oversize-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.sd-oversize-stat-card {
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-sizing: border-box;
    position: relative;
}

.sd-oversize-stat-card.is-warning {
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
}

.sd-oversize-stat-card.is-standard {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
}

.sd-oversize-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    line-height: 1.3;
}

.sd-oversize-stat-card.is-warning .sd-oversize-stat-label {
    color: #c2410c;
}

.sd-oversize-stat-num {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.sd-oversize-stat-card.is-warning .sd-oversize-stat-num {
    color: #9a3412;
}

.sd-oversize-stat-num small {
    font-size: 13.5px;
    font-weight: 600;
    color: inherit;
    margin-left: 2px;
}

.sd-oversize-stat-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 7px;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.sd-oversize-stat-badge.is-alert {
    background: #ea580c;
    color: #ffffff;
}

.sd-oversize-stat-badge.is-neutral {
    background: #e2e8f0;
    color: #475569;
}

/* Lead Explanatory Text */
.sd-oversize-lead-text {
    font-size: 14.5px;
    line-height: 1.55;
    color: #334155;
    margin: 0;
    text-align: center;
}

.sd-oversize-lead-text strong {
    color: #0f172a;
    font-weight: 700;
}

/* Tip / Recommendation Callout Box */
.sd-oversize-tip-card {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-sizing: border-box;
}

.sd-oversize-tip-icon-col {
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-oversize-tip-body {
    font-size: 13.5px;
    line-height: 1.5;
    color: #1e3a8a;
    text-align: left;
}

.sd-oversize-tip-body strong {
    display: block;
    color: #1e40af;
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 13.5px;
}

/* Modal Action Button */
.sd-oversize-modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sd-oversize-modal-btn {
    min-width: 160px;
    height: 44px;
    padding: 0 34px;
    background: #15803d;
    border: none;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(21, 128, 61, 0.28);
}

.sd-oversize-modal-btn:hover {
    background: #166534;
    box-shadow: 0 5px 14px rgba(21, 128, 61, 0.38);
    transform: translateY(-1px);
}

.sd-oversize-modal-btn:active {
    transform: translateY(0);
}

@media (max-width: 460px) {
    .sd-oversize-modal-dialog {
        padding: 30px 20px 24px;
        border-radius: 16px;
    }
    .sd-oversize-stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .sd-oversize-stat-card {
        padding: 10px 12px;
    }
    .sd-oversize-stat-num {
        font-size: 22px;
    }
}


/* ===================== DOOR RATIO WARNING MODAL (CUTLIST THEME) ===================== */
.sd-ratio-modal-dialog {
    max-width: 480px;
    width: 90vw;
    background: #ffffff;
    border-radius: 18px;
    padding: 36px 30px 28px;
    box-shadow: 0 25px 45px -10px rgba(15, 23, 42, 0.22), 0 12px 20px -8px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    border: 1px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sd-ratio-modal-icon-badge {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #fffbeb;
    border: 2px solid #fef3c7;
    box-shadow: 0 0 0 6px #fef9c3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    box-sizing: border-box;
    color: #d97706;
}

.sd-ratio-modal-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.sd-ratio-modal-desc {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px;
    line-height: 1.6;
    color: #1e293b;
    font-weight: 450;
    margin: 0 0 28px 0;
    max-width: 400px;
}

.sd-ratio-modal-desc strong {
    color: #0f172a;
    font-weight: 600;
}

.sd-ratio-modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.sd-ratio-modal-reset-btn {
    min-width: 120px;
    height: 42px;
    padding: 0 24px;
    background: #ffffff;
    border: 1.5px solid #ef4444;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sd-ratio-modal-reset-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.sd-ratio-modal-proceed-btn {
    min-width: 120px;
    height: 42px;
    padding: 0 28px;
    background: #16a34a;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.sd-ratio-modal-proceed-btn:hover {
    background: #15803d;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
    transform: translateY(-1px);
}

.sd-ratio-modal-proceed-btn:active {
    transform: translateY(0);
}

/* ===================== FRAME STYLE & COLOURS MODAL ===================== */
.sd-frame-modal-dialog {
    max-width: 980px;
    width: 95vw;
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.22);
    border: none;
    position: relative;
    margin: auto;
}

.sd-frame-modal-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    max-height: calc(100vh - 40px);
    min-height: 0;
}

/* Left Column: Gallery, Big Render Preview, Zoom, Thumbnails & Label */
.sd-frame-modal-left {
    background: #ffffff;
    padding: 24px 20px;
    border-right: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
}

.sd-frame-main-preview-box {
    width: 100%;
    height: 290px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin-bottom: 20px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.sd-frame-main-preview-img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

.sd-frame-zoom-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #334155;
    padding: 0;
    transition: all 0.15s ease;
    z-index: 5;
}

.sd-frame-zoom-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    transform: scale(1.08);
}

.sd-frame-thumbs-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sd-frame-thumb-nav {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.sd-frame-thumb-nav:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.sd-frame-thumbs-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    align-items: center;
}

.sd-frame-thumbs-row::-webkit-scrollbar {
    display: none;
}

.sd-frame-thumb {
    width: 62px;
    height: 62px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 3px;
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.sd-frame-thumb:hover {
    border-color: #94a3b8;
}

.sd-frame-thumb.active {
    border: 2px solid #16a34a;
    box-shadow: 0 0 0 1px #16a34a;
}

.sd-frame-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sd-frame-modal-info {
    margin-top: 4px;
}

.sd-frame-modal-style-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
    line-height: 1.2;
}

.sd-frame-modal-style-color {
    font-size: 13.5px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.2;
}

/* Right Column: Frame Colours & Actions */
.sd-frame-modal-right {
    background: #ffffff;
    padding: 28px 32px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
    box-sizing: border-box;
}

.sd-frame-modal-category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.sd-frame-modal-heading {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px 0;
    letter-spacing: -0.01em;
}

.sd-frame-modal-desc {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 20px 0;
}

.sd-frame-modal-divider {
    height: 1px;
    background: #f1f5f9;
    margin-bottom: 22px;
}

.sd-frame-modal-subheading {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
}

.sd-frame-colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 26px;
}

.sd-frame-modal-color-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    width: 105px;
    user-select: none;
}

.sd-frame-modal-color-box {
    width: 105px;
    height: 80px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.15s ease;
}

.sd-frame-modal-color-card:hover .sd-frame-modal-color-box {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.sd-frame-modal-color-card.active .sd-frame-modal-color-box {
    border: 2px solid #16a34a;
    background: #ffffff;
}

.sd-frame-color-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.sd-frame-modal-color-box img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    display: block;
}

.sd-frame-modal-color-box .sd-fallback-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: block;
}

.sd-frame-modal-color-label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 8px;
    text-align: left;
    line-height: 1.2;
}

/* Green Notice Callout */
.sd-frame-modal-notice {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: #166534;
    margin-bottom: 24px;
    line-height: 1.4;
}

.sd-frame-notice-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    flex-shrink: 0;
}

/* Modal Footer & Buttons */
.sd-frame-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: none;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    background: #ffffff;
    z-index: 10;
}

.sd-frame-modal-cancel-btn {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sd-frame-modal-cancel-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.sd-frame-modal-save-btn {
    background: #16a34a;
    border: none;
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sd-frame-modal-save-btn:hover {
    background: #15803d;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

@media (max-width: 820px) {
    .sd-frame-modal-layout {
        grid-template-columns: 1fr;
    }

    .sd-frame-modal-left {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
}

/* ===================== DOOR DESIGN & PANEL SIZE MODAL ===================== */
.sd-door-design-modal-dialog {
    max-width: 960px;
    width: 95vw;
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.22);
    border: none;
    position: relative;
    margin: auto;
}

.sd-door-design-modal-layout {
    display: grid;
    grid-template-columns: 430px 1fr;
    max-height: calc(100vh - 40px);
    min-height: 0;
}

.sd-door-design-modal-left {
    background: #f8fafc;
    padding: 20px 16px;
    border-right: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    box-sizing: border-box;
}

.sd-door-design-preview-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-door-preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    box-sizing: border-box;
}

.sd-door-modal-top-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 36px;
    flex-shrink: 0;
    margin-bottom: 24px;
}

.sd-door-modal-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #86efac;
    border-radius: 8px;
    color: #16a34a;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    user-select: none;
    line-height: 1;
}

.sd-door-modal-reset-btn:hover {
    background: #f0fdf4;
    border-color: #4ade80;
    color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.12);
}

.sd-door-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: auto 0;
    width: 100%;
    flex: 1;
}

.sd-door-stage-unit {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    position: relative;
}

.sd-door-center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.sd-door-mockup {
    box-sizing: border-box;
    border-width: 6px;
    border-style: solid;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    border-radius: 2px;
    flex-shrink: 0;
    overflow: visible;
}

.sd-door-mockup.has-angled-cuts {
    border: none !important;
}

.sd-door-frame-poly {
    pointer-events: none;
}

.sd-door-mockup-infill {
    width: 100%;
    height: 100%;
    display: flex;
    background: #ffffff;
    position: relative;
    overflow: visible;
}

.sd-door-mockup-infill.orient-horiz {
    flex-direction: column;
}

.sd-door-mockup-infill.orient-vert {
    flex-direction: row;
}

.sd-door-mockup-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    transition: flex 0.1s ease, background-color 0.15s ease;
}

.sd-door-mockup-panel.is-min-size {
    background-color: #fed7aa !important;
}

.sd-min-size-alert {
    font-size: 10.5px;
    font-weight: 600;
    color: #ea580c;
    text-align: center;
    padding-top: 4px;
    line-height: 1.2;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.2px;
}

/* Vertical Min Size Speech Bubble Popup on Top */
.sd-min-size-popup {
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 50;
    pointer-events: none;
    user-select: none;
    line-height: 1.2;
}

.sd-min-size-popup::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: #cbd5e1 transparent transparent transparent;
}

.sd-min-size-popup::after {
    content: "";
    position: absolute;
    top: calc(100% - 1.5px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px 4px 0 4px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.sd-door-mockup-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.sd-door-mockup-infill.orient-horiz .sd-door-mockup-divider {
    height: 5px;
    width: 100%;
    cursor: ns-resize;
}

.sd-door-mockup-infill.orient-vert .sd-door-mockup-divider {
    width: 5px;
    height: 100%;
    cursor: ew-resize;
}

/* Circular Drag Handle */
.sd-design-adjust-circle {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: inherit;
    z-index: 20;
    padding: 0;
    color: #334155;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
    user-select: none;
    touch-action: none;
}

.sd-design-adjust-circle:hover {
    border-color: #16a34a;
    color: #16a34a;
    transform: scale(1.12);
}

.sd-design-adjust-circle.is-dragging,
.sd-design-adjust-circle:active {
    border-color: #16a34a;
    color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.18);
}

/* Dimension Lines & Badges */
.sd-dim-total-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 80px;
    flex-shrink: 0;
}

.sd-dim-arrow-tick.sd-dim-tick-top,
.sd-dim-arrow-tick.sd-dim-tick-bottom {
    width: 10px;
    height: 1px;
    background: #94a3b8;
}

.sd-dim-arrow-tick.sd-dim-tick-left,
.sd-dim-arrow-tick.sd-dim-tick-right {
    height: 10px;
    width: 1px;
    background: #94a3b8;
}

.sd-dim-arrow-head.sd-arrow-up {
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-bottom: 6px solid #94a3b8;
    margin: 1px 0;
}

.sd-dim-arrow-head.sd-arrow-down {
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 6px solid #94a3b8;
    margin: 1px 0;
}

.sd-dim-arrow-head.sd-arrow-left {
    width: 0;
    height: 0;
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
    border-right: 6px solid #94a3b8;
    margin: 0 1px;
}

.sd-dim-arrow-head.sd-arrow-right {
    width: 0;
    height: 0;
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
    border-left: 6px solid #94a3b8;
    margin: 0 1px;
}

.sd-dim-line-seg {
    background: #94a3b8;
}

.sd-dim-total-left .sd-dim-line-seg,
.sd-dim-panel-item-horiz .sd-dim-line-seg {
    width: 1px;
    flex: 1;
}

.sd-dim-total-bottom .sd-dim-line-seg {
    height: 1px;
    flex: 1;
}

.sd-dim-total-badge {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin: 4px 0;
}

.sd-dim-total-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: 30px;
    margin-top: 6px;
}

.sd-dim-total-bottom .sd-dim-total-badge {
    margin: 0 4px;
}

.sd-dim-panels-col {
    display: flex;
    flex-direction: column;
    width: 80px;
    justify-content: space-between;
    flex-shrink: 0;
}

.sd-dim-panel-item-horiz {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin: 1px 0;
}

.sd-dim-panels-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: 28px;
    margin-top: 6px;
    position: relative;
}

.sd-dim-panel-item-vert {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0;
    min-width: 0;
}

.sd-dim-panel-item-vert .sd-door-badge-tag {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 1px 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    margin: 0 1px;
    box-sizing: border-box;
}

.sd-dim-panel-item-vert .sd-door-badge-input {
    width: 25px;
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    padding: 0;
    margin: 0;
}

.sd-dim-panel-item-vert .sd-badge-unit {
    font-size: 9.5px;
    font-weight: 600;
    color: #475569;
    margin-left: 1px;
}

.sd-dim-panels-spacer {
    width: 80px;
    display: flex;
    flex-shrink: 0;
    pointer-events: none;
    visibility: hidden;
}

.sd-door-badge-tag {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 2px 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: 3px 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sd-door-badge-tag:focus-within,
.sd-door-badge-tag:hover {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.sd-door-badge-input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    width: 34px;
    padding: 0;
    margin: 0;
    cursor: text;
    -moz-appearance: textfield;
}

.sd-door-badge-input::-webkit-outer-spin-button,
.sd-door-badge-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sd-badge-unit {
    font-size: 11.5px;
    font-weight: 600;
    color: #0f172a;
    margin-left: 2px;
    pointer-events: none;
}

/* Bottom Notice Bar */
.sd-door-modal-info-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 14px;
    box-sizing: border-box;
    margin-top: auto;
    flex-shrink: 0;
}

.sd-door-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sd-door-info-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #166534;
    line-height: 1.3;
}

/* Right Column */
.sd-door-design-modal-right {
    background: #ffffff;
    padding: 24px 28px 18px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
    box-sizing: border-box;
}

.sd-design-sec {
    margin-top: 14px;
}

.sd-design-sec:first-child {
    margin-top: 0;
}

.sd-design-sec-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    letter-spacing: -0.3px;
}

.sd-design-sec-desc {
    font-size: 12.5px;
    color: #64748b;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.sd-design-calc-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sd-design-calc-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    border-radius: 8px;
    padding: 7px 14px;
    border: 1px solid #dcfce7;
}

.sd-calc-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sd-calc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

.sd-calc-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.sd-calc-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.sd-calc-val {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.sd-calc-sub {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 500;
}

.sd-design-rules-box {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.5;
}

.sd-design-rules-box p {
    margin: 0 0 2px 0;
}

.sd-design-rules-box p:last-child {
    margin-bottom: 0;
}

.sd-design-orient-heading {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    display: block;
}

.sd-design-orient-picker {
    display: flex;
    gap: 12px;
}

.sd-design-orient-card {
    position: relative;
    width: 120px;
    height: 82px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #ffffff;
    color: #64748b;
    transition: all 0.15s ease;
    user-select: none;
    box-sizing: border-box;
}

.sd-design-orient-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.sd-design-orient-card.active {
    border: 2px solid #16a34a;
    background: #ffffff;
    color: #16a34a;
    box-shadow: 0 0 0 1px #16a34a;
}

.sd-design-orient-card.active .sd-orient-title {
    color: #16a34a;
    font-weight: 700;
}

.sd-orient-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.sd-orient-icon svg {
    max-width: 38px;
    max-height: 28px;
}

.sd-orient-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0px;
}

.sd-orient-sub {
    font-size: 10.5px;
    color: #64748b;
}

.sd-orient-check-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.3);
}

.sd-design-orient-card.active .sd-orient-check-badge {
    display: flex;
}

.sd-design-orient-card.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

.sd-design-orient-card.is-disabled:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* Tooltip for vertical disabled rule */
.input-info-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background: #1e293b;
    color: #ffffff;
    font-size: 11px;
    line-height: 1.35;
    padding: 8px 10px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.input-info-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.sd-design-orient-card:hover .input-info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* ===================== ANGLED CUT IN DOOR DESIGN MODAL ===================== */
.sd-angled-cut-sec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.sd-angled-cut-heading-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.sd-angled-cut-door-pill {
    font-size: 11px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 1px 8px;
    letter-spacing: 0.2px;
}

.sd-angled-cut-door-pill.is-middle {
    color: #64748b;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.sd-angled-cut-notice-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3.5px solid #64748b;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
    margin-top: 6px;
}

.sd-angled-cut-notice-box.is-warning {
    background: #fffbeb;
    border-color: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.sd-angled-cut-notice-icon {
    display: inline-flex;
    flex-shrink: 0;
    margin-top: 1px;
}

.sd-btn-add-angled-cut {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #16a34a;
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sd-btn-add-angled-cut:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}

.sd-btn-add-angled-cut:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
}

.sd-angled-cuts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.sd-angled-cut-empty-hint {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    text-align: center;
}

.sd-angled-cut-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sd-angled-cut-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.sd-angled-cut-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sd-angled-cut-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.sd-angled-cut-card-title .sd-angled-cut-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

.sd-angled-cut-corner-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    letter-spacing: 0.2px;
}

.sd-angled-cut-remove-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.sd-angled-cut-remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.sd-angled-cut-corner-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sd-angled-cut-field-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
}

.sd-corner-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.sd-corner-chip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.1;
}

.sd-corner-chip small {
    font-size: 9px;
    color: #64748b;
    font-weight: 500;
}

.sd-corner-chip:hover:not(.active):not(:disabled) {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.sd-corner-chip:hover:not(.active):not(:disabled) small {
    color: #166534;
}

.sd-corner-chip.active {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3);
}

.sd-corner-chip.active small {
    color: rgba(255, 255, 255, 0.95);
}

.sd-corner-chip.active:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
}

.sd-corner-chip.active:hover:not(:disabled) small {
    color: #ffffff;
}

.sd-corner-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
}

.sd-angled-cut-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sd-angled-input-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sd-angled-input-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
}

.sd-angled-input-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sd-angled-input-wrap:focus-within {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}

.sd-angled-num-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    padding: 0;
    margin: 0;
    text-align: right;
    -moz-appearance: textfield;
}

.sd-angled-num-input::-webkit-outer-spin-button,
.sd-angled-num-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sd-angled-unit {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    margin-left: 4px;
}

.sd-angled-input-hint {
    font-size: 10px;
    color: #94a3b8;
}

.sd-angled-cut-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    color: #475569;
    border: 1px solid #f1f5f9;
}

.sd-angled-cut-info-bar strong {
    color: #0f172a;
    font-weight: 700;
}

.sd-angled-cut-card.is-done {
    border-color: #86efac;
    background: #fcfdfc;
}

.sd-angled-cut-done-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #15803d;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    letter-spacing: 0.2px;
}

.sd-angled-cut-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.sd-angled-cut-btn-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #16a34a;
    border: 1px solid #16a34a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.2);
}

.sd-angled-cut-btn-done:hover {
    background: #15803d;
    border-color: #15803d;
    box-shadow: 0 2px 5px rgba(22, 163, 74, 0.3);
    transform: translateY(-1px);
}

.sd-angled-cut-btn-done:active {
    transform: translateY(0);
}

.sd-angled-cut-btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sd-angled-cut-btn-edit:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.sd-door-cut-click-edge {
    pointer-events: stroke !important;
    cursor: pointer;
    transition: stroke 0.15s ease;
}

.sd-door-cut-click-edge:hover {
    stroke: rgba(22, 163, 74, 0.35) !important;
}

/* Door Mockup Wrapper & Angled Cut Visual Overlay */
.sd-door-mockup-wrapper {
    position: relative;
    display: inline-block;
    box-sizing: border-box;
}

.sd-door-mockup-cut-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 25;
}

.sd-door-cut-badge {
    position: absolute;
    background: #ffffff;
    border: 1.5px solid #16a34a;
    border-radius: 6px;
    padding: 1px 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 1.5px;
    z-index: 30;
    pointer-events: auto;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    user-select: none;
    touch-action: none;
}

.sd-door-cut-badge.handle-h-badge {
    cursor: ew-resize;
}

.sd-door-cut-badge.handle-v-badge {
    cursor: ns-resize;
    padding: 1px 3px;
    gap: 1px;
}

.sd-door-cut-badge.handle-v-badge .sd-door-cut-badge-input {
    width: 25px;
    font-size: 10.5px;
}

.sd-door-cut-badge.handle-v-badge .sd-badge-unit {
    font-size: 9.5px;
    margin-left: 1px;
}

.sd-door-cut-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.25);
    border-color: #15803d;
}

.sd-door-cut-badge.is-dragging {
    border-color: #15803d;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.28), 0 4px 12px rgba(0, 0, 0, 0.18);
    transform: scale(1.08);
}

.sd-door-cut-badge-input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    width: 28px;
    padding: 0;
    margin: 0;
    cursor: text;
    -moz-appearance: textfield;
}

.sd-door-cut-badge-input::-webkit-outer-spin-button,
.sd-door-cut-badge-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sd-door-cut-badge .sd-badge-unit {
    font-size: 10px;
    font-weight: 600;
    color: #166534;
}

.sd-door-cut-hypot-badge {
    position: absolute;
    transform: translate(-50%, -50%);
    background: #16a34a;
    color: #ffffff;
    border-radius: 10px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
    cursor: move;
    white-space: nowrap;
    z-index: 32;
    letter-spacing: 0.2px;
    user-select: none;
    touch-action: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.sd-door-cut-hypot-badge:hover {
    transform: translate(-50%, -50%) scale(1.12);
    background: #15803d;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}

.sd-door-cut-hypot-badge.is-dragging {
    transform: translate(-50%, -50%) scale(1.18);
    background: #15803d;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.35), 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* Interactive Draggable Vertex Handles for Angled Cut */
.sd-door-cut-handle {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #16a34a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    z-index: 34;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    padding: 0;
    color: #16a34a;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
    pointer-events: auto;
}

.sd-door-cut-handle.handle-h {
    cursor: ew-resize;
}

.sd-door-cut-handle.handle-v {
    cursor: ns-resize;
}

.sd-door-cut-handle:hover {
    transform: translate(-50%, -50%) scale(1.22);
    border-color: #15803d;
    color: #15803d;
    background: #f0fdf4;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.22), 0 3px 8px rgba(0, 0, 0, 0.18);
}

.sd-door-cut-handle.is-dragging,
.sd-door-cut-handle:active {
    transform: translate(-50%, -50%) scale(1.32);
    border-color: #15803d;
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.35), 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Hotspots on uncut door corners to add cut directly */
.sd-corner-add-hotspot {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #94a3b8;
    color: #475569;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    z-index: 29;
    padding: 0;
    transition: all 0.15s ease;
    opacity: 0.7;
}

.sd-door-mockup-wrapper:hover .sd-corner-add-hotspot {
    opacity: 1;
}

.sd-corner-add-hotspot:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    transform: scale(1.18);
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.35);
}

.sd-corner-add-hotspot.tl {
    top: -8px;
    left: -8px;
}

.sd-corner-add-hotspot.tr {
    top: -8px;
    right: -8px;
}

.sd-corner-add-hotspot.bl {
    bottom: -8px;
    left: -8px;
}

.sd-corner-add-hotspot.br {
    bottom: -8px;
    right: -8px;
}

/* Summary Step Angled Item */
.sd-summary-door-angled-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sd-summary-door-angled-item .sd-summary-spec-icon {
    color: #16a34a;
    margin-top: 1px;
}

.sd-door-design-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    padding-bottom: 4px;
    position: sticky;
    bottom: 0;
    background: #ffffff;
    z-index: 10;
}

.sd-door-design-cancel-btn {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 24px;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sd-door-design-cancel-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.sd-door-design-save-btn {
    background: #15803d;
    border: none;
    border-radius: 8px;
    padding: 9px 32px;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(21, 128, 61, 0.25);
}

.sd-door-design-save-btn:hover {
    background: #166534;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
}

@media (max-width: 768px) {
    .sd-door-design-modal-layout {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .sd-door-design-modal-dialog {
        max-height: 90vh;
        overflow-y: auto;
    }

    .sd-door-design-modal-left {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        overflow-y: visible;
    }

    .sd-door-design-modal-right {
        overflow-y: visible;
        max-height: none;
    }
}

.sd-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.sd-modal-close:hover {
    color: #0f172a;
    transform: scale(1.1);
}

.sd-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
}

.sd-modal-intro {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 16px;
}

.sd-modal-subhead {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.sd-modal-subtitle {
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
    margin-bottom: 16px;
}

.sd-modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.sd-modal-tab-btn {
    padding: 6px 20px;
    background: #ffffff;
    border: 1.5px solid var(--sd-green-primary);
    color: var(--sd-green-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.sd-modal-tab-btn:hover:not(.active) {
    background: var(--sd-green-light);
    border-color: var(--sd-green-hover);
    color: var(--sd-green-hover);
}

.sd-modal-tab-btn.active {
    background: var(--sd-green-primary);
    color: #ffffff;
}

.sd-modal-body-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.sd-modal-preview-card {
    display: flex;
    flex-direction: column;
}

.sd-modal-preview-img-box {
    width: 100%;
    height: 200px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sd-modal-preview-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 12px 0 4px 0;
}

.sd-modal-preview-price {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.sd-modal-swatches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 12px;
}

.sd-modal-swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.sd-modal-swatch-thumb {
    width: 80px;
    height: 60px;
    border: 1.5px solid #d1d5db;
    border-radius: 2px;
    box-sizing: border-box;
    transition: all 0.15s ease;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.sd-modal-swatch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sd-modal-swatch-item:hover .sd-modal-swatch-thumb {
    border-color: var(--sd-green-border);
}

.sd-modal-swatch-item.active .sd-modal-swatch-thumb {
    border: 2.5px solid var(--sd-green-primary);
    box-shadow: 0 0 0 2px rgba(30, 126, 52, 0.25);
}

.sd-modal-swatch-name {
    font-size: 11px;
    color: #475569;
    text-align: center;
    margin-top: 4px;
    line-height: 1.2;
}

.sd-modal-swatch-item.is-out-of-stock {
    opacity: 0.55;
    cursor: not-allowed;
}

.sd-modal-swatch-item.is-out-of-stock .sd-modal-swatch-thumb {
    filter: grayscale(40%);
}

.sd-swatch-stock-tag.out-of-stock {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    background: rgba(220, 38, 38, 0.92);
    color: #ffffff;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 3px;
    border-radius: 2px;
    text-align: center;
    line-height: 1.1;
    pointer-events: none;
}

/* ===================== DECORATIVE BOARDS MODAL (MOCKUP 2) ===================== */
.sd-board-modal-dialog {
    max-width: 980px !important;
    width: 95vw !important;
}

.sd-board-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.sd-board-filter-title {
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
}

.sd-board-search-wrap {
    position: relative;
    width: 290px;
    max-width: 100%;
}

.sd-board-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.sd-board-search-input {
    width: 100%;
    height: 38px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    padding: 0 30px 0 32px;
    font-size: 13.5px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.sd-board-search-input:focus {
    border-color: var(--sd-green-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 126, 52, 0.15);
}

.sd-board-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sd-board-search-clear:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.sd-board-brand-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.sd-board-brand-btn {
    height: 38px;
    min-width: 140px;
    flex: 0 0 auto;
    border: 1.5px solid var(--sd-green-primary);
    background: #ffffff;
    color: var(--sd-green-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    transition: all 0.15s ease;
    text-align: center;
    white-space: nowrap;
}

.sd-board-brand-btn:hover:not(.active) {
    background: var(--sd-green-light);
    border-color: var(--sd-green-hover);
    color: var(--sd-green-hover);
}

.sd-board-brand-btn.active {
    background: var(--sd-green-primary);
    color: #ffffff;
    border-color: var(--sd-green-primary);
}

.sd-board-collection-row {
    margin-bottom: 18px;
}

.sd-board-collection-select-wrap {
    position: relative;
    display: inline-block;
    width: 320px;
    max-width: 100%;
}

.sd-board-collection-select {
    width: 100%;
    height: 40px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    padding: 0 34px 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    background: #ffffff;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sd-board-collection-select:focus {
    border-color: var(--sd-green-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 126, 52, 0.15);
}

.sd-board-body-layout {
    grid-template-columns: 290px 1fr !important;
    gap: 24px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .sd-board-body-layout {
        grid-template-columns: 1fr !important;
    }
}

.sd-board-body-layout .sd-modal-preview-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.sd-board-body-layout .sd-modal-preview-img-box {
    width: 100%;
    height: 185px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.sd-board-preview-info-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 14px;
    gap: 12px;
}

.sd-board-preview-left-info {
    flex: 1;
    min-width: 0;
}

.sd-board-preview-left-info .sd-modal-preview-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.25;
}

.sd-board-preview-decor-name {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.sd-board-preview-sheet-size {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

.sd-board-preview-thick-col {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.sd-board-thick-val {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.sd-board-thick-dot {
    display: none !important;
}

.sd-board-body-layout .sd-modal-preview-price {
    font-size: 13.5px;
    color: #475569;
    font-weight: 500;
    margin-top: 6px;
}

.sd-board-body-layout .sd-modal-preview-price strong {
    color: #0f172a;
    font-weight: 700;
}

.sd-board-preview-grain-wrap {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sd-board-grain-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.sd-board-grain-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.sd-board-grain-indicator.is-vertical {
    background: var(--sd-green-light, #f0fdf4);
    border-color: var(--sd-green-border, #86efac);
}

.sd-board-grain-box {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    flex-shrink: 0;
    color: #64748b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sd-board-grain-indicator.is-vertical .sd-board-grain-box {
    border-color: var(--sd-green-primary, #1e7e34);
    color: var(--sd-green-primary, #1e7e34);
    background: #ffffff;
}

.sd-board-grain-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sd-board-grain-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.sd-board-grain-indicator.is-vertical .sd-board-grain-label {
    color: var(--sd-green-primary, #1e7e34);
}

.sd-board-grain-desc {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.25;
}

.sd-board-prestige-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--sd-green-light, #f0fdf4);
    border: 1px solid var(--sd-green-border, #86efac);
    color: #166534;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin: 8px 0 14px;
}

.sd-board-prestige-notice svg {
    flex-shrink: 0;
    color: var(--sd-green-primary, #1e7e34);
}

.sd-board-swatches-container {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    padding: 4px;
}

.sd-board-swatches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 14px;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.sd-board-swatches-grid .sd-modal-swatch-thumb {
    width: 92px;
    height: 92px;
    border: 1.5px solid #d1d5db;
    border-radius: 2px;
    box-sizing: border-box;
    background-color: #f1f5f9;
}

.sd-board-swatches-grid .sd-modal-swatch-item:hover .sd-modal-swatch-thumb {
    border-color: var(--sd-green-border);
}

.sd-board-swatches-grid .sd-modal-swatch-item.active .sd-modal-swatch-thumb {
    border: 2.5px solid var(--sd-green-primary);
    box-shadow: 0 0 0 2px rgba(30, 126, 52, 0.25);
}

.sd-board-empty-msg {
    grid-column: 1 / -1;
    padding: 36px 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Dedicated Board Modal Empty State Card */
.sd-board-empty-state-card {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 14px;
    padding: 38px 24px;
    margin: 12px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sd-board-empty-state-inner {
    max-width: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sd-board-empty-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.sd-board-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.sd-board-empty-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 18px;
}

.sd-board-empty-recommendation {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    width: 100%;
    margin-bottom: 22px;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.sd-board-empty-rec-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sd-green-primary);
    background: var(--sd-green-light);
    border: 1px solid var(--sd-green-border);
    padding: 2.5px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.sd-board-empty-recommendation p {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    margin: 0;
}

.sd-board-empty-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sd-empty-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    outline: none;
}

.sd-empty-action-btn.primary {
    background: var(--sd-green-primary);
    color: #ffffff;
}

.sd-empty-action-btn.primary:hover {
    background: var(--sd-green-hover);
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.25);
    transform: translateY(-1px);
}

.sd-empty-action-btn.secondary {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

.sd-empty-action-btn.secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.sd-board-modal-dialog .sd-modal-save-btn {
    background: var(--sd-green-primary);
}

.sd-board-modal-dialog .sd-modal-save-btn:hover {
    background: var(--sd-green-hover);
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.25);
}

.sd-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
}

.sd-modal-cancel-btn {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sd-modal-cancel-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

.sd-modal-save-btn {
    background: var(--sd-green-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.sd-modal-save-btn:hover {
    background: var(--sd-green-hover);
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.25);
}

.sd-modal-save-btn:disabled,
.sd-modal-save-btn.is-disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border: 1px solid #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    pointer-events: none !important;
    transform: none !important;
    opacity: 0.8 !important;
}

/* ===================== STEP 4: SUMMARY ===================== */
.sd-summary-panel {
    padding: 0 24px 24px;
}

.sd-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) 380px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1080px) {
    .sd-summary-grid {
        grid-template-columns: 1fr;
    }
}

.sd-summary-spec-box {
    background: transparent;
    border: none;
    padding: 0;
}

.sd-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 1. Configuration Card */
.sd-summary-config-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sd-summary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.sd-summary-card-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sd-summary-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eefbf2;
    border: 1px solid #c7f0d2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex-shrink: 0;
}

.sd-summary-header-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.sd-summary-header-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

.sd-summary-btn-edit-config {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sd-summary-btn-edit-config:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* 4-Item Grid */
.sd-summary-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .sd-summary-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sd-summary-info-grid {
        grid-template-columns: 1fr;
    }
}

.sd-summary-info-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sd-summary-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

.sd-summary-info-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sd-summary-info-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.sd-summary-info-val {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
}

/* 2. Door Details Section */
.sd-summary-doors-section {
    margin-top: 6px;
}

.sd-summary-doors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.sd-summary-doors-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.sd-summary-btn-add-doors {
    background: #eefbf2;
    border: 1px solid #86efac;
    color: #16a34a;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sd-summary-btn-add-doors:hover {
    background: #dcfce7;
    border-color: #4ade80;
}

.sd-summary-doors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sd-summary-door-card-new {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sd-summary-door-card-new:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sd-summary-door-thumb-box {
    width: 54px;
    height: 74px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 2px;
}

.sd-summary-door-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.sd-summary-door-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-summary-door-layout-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #0369a1;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 9999px;
    line-height: 1.25;
}

.sd-summary-door-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.sd-summary-door-specs-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sd-summary-door-spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sd-summary-spec-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    flex-shrink: 0;
}

.sd-summary-spec-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sd-summary-spec-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
}

.sd-summary-spec-value {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    line-height: 1.2;
}

.sd-summary-panels-val {
    white-space: normal;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.sd-summary-panel-entry {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sd-summary-panel-letter {
    font-weight: 700;
    color: #0f172a;
}

.sd-summary-panel-dim {
    color: #64748b;
    font-size: 11.5px;
    font-weight: 500;
}

.sd-summary-panel-sep {
    color: #94a3b8;
    font-weight: 400;
    margin: 0 2px;
}

.sd-summary-spec-divider {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.sd-summary-door-softclose-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.sd-summary-door-softclose-item .sd-softclose-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.sd-softclose-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sd-softclose-controls label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    user-select: none;
}

.sd-softclose-controls input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    accent-color: #16a34a;
    margin: 0;
}

.sd-softclose-price-tag {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    font-weight: 400;
}

/* 3. Quotation Summary Right Box */
.sd-summary-pricing-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.sd-quotation-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.sd-quotation-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eefbf2;
    border: 1px solid #c7f0d2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex-shrink: 0;
}

.sd-quotation-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.sd-quotation-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

.sd-quotation-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
}

.sd-quotation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.sd-quotation-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sd-quotation-item-thumb {
    width: 42px;
    height: 48px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sd-quotation-item-thumb img,
.sd-quotation-track-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sd-quotation-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sd-quotation-item-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.sd-quotation-item-sub {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

.sd-quotation-item-price {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    margin-left: 8px;
}

.sd-quotation-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.sd-quotation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
}

.sd-quotation-row-label {
    color: #475569;
    font-weight: 500;
}

.sd-quotation-row-val {
    color: #0f172a;
    font-weight: 700;
}

.sd-quotation-total-box {
    background: #eefbf2;
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sd-quotation-total-label {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.sd-quotation-total-val {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.sd-btn-add-cart {
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    height: 48px;
    width: 100%;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.15s ease, transform 0.15s ease;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.2);
}

.sd-btn-add-cart:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.sd-btn-add-cart:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sd-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: sdSpin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes sdSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================== BOTTOM ACTION BUTTONS ===================== */
.sd-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px 24px 28px;
    background: #ffffff;
}

.sd-btn-delete {
    height: 42px;
    padding: 0 24px;
    background: #ffffff;
    border: 1.5px solid var(--sd-red-border);
    color: var(--sd-red-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.sd-btn-delete:hover {
    background: var(--sd-red-bg);
}

.sd-btn-add-set {
    height: 42px;
    padding: 0 24px;
    background: #ffffff;
    border: 1.5px solid var(--sd-green-badge);
    color: var(--sd-green-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.sd-btn-add-set:hover {
    background: var(--sd-green-light);
}

/* ===================== RESPONSIVE BREAKPOINTS ===================== */
@media (max-width: 960px) {
    .sd-opening-size {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .sd-input-col {
        width: 100%;
    }

    .sd-text-input,
    .sd-door-select {
        width: 100%;
    }

    .sd-doc-btns {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .sd-doc-btn {
        flex: 1;
        justify-content: center;
    }

    .sd-steps {
        overflow-x: auto;
    }

    .sd-step {
        min-width: 140px;
    }

    .sd-render {
        height: 420px;
    }
}

/* Sliding Doors Cart Variation Meta Styles */
.cutlist-meta-sliding-details,
.cutlist-meta-door-row {
    white-space: normal !important;
}

.cutlist-meta-sliding-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    width: 100% !important;
    margin-top: 3px !important;
    padding-left: 8px !important;
    border-left: 2px solid #cbd5e1 !important;
}

.cutlist-meta-sliding-details .cutlist-meta-door-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    width: 100% !important;
    clear: both !important;
    line-height: 1.35 !important;
    font-size: 11.5px !important;
}

dl.variation dd .cutlist-meta-sliding-details {
    display: flex !important;
    flex-direction: column !important;
}


/* =========================================================================
   ADDED TO BASKET SUCCESS MODAL & MULTI-SET WORKFLOW
   ========================================================================= */
.sd-cart-success-modal-dialog {
    max-width: 500px !important;
    width: 92% !important;
    border-radius: 18px !important;
    padding: 30px 26px !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28) !important;
    background: #ffffff !important;
    position: relative !important;
    animation: sdModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sd-btn-add-cart.is-added {
    background: #16a34a !important;
    border-color: #15803d !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25) !important;
}

.sd-btn-add-cart.is-added:hover {
    background: #15803d !important;
    transform: translateY(-1px);
}

.sd-set.sd-set-highlight {
    box-shadow: 0 0 0 3px var(--sd-green-primary), 0 10px 28px rgba(30, 126, 52, 0.2) !important;
    transition: box-shadow 0.35s ease;
}

/* Hide WooCommerce default added_to_cart duplicate link */
.sd-container .added_to_cart,
.sd-summary-pricing-box .added_to_cart,
a.added_to_cart.wc-forward {
    display: none !important;
}

/* Out of stock swatches & badge tags in modals */
.sd-modal-swatch-item.is-out-of-stock {
    opacity: 0.55;
    cursor: not-allowed !important;
    position: relative;
    filter: grayscale(40%);
}

.sd-modal-swatch-item.is-out-of-stock:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #e2e8f0 !important;
}

.sd-swatch-stock-tag.out-of-stock {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background: rgba(185, 28, 28, 0.92);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1.2;
    pointer-events: none;
}

/* ==========================================================================
   Quotation Summary: Additional Track Option (Mockup Match)
   ========================================================================== */

.sd-add-track-card,
.sd-add-accessories-card {
    background: #f0fdf4;
    border: 1.2px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 3px 0 2px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.04);
}

.sd-add-track-card:hover,
.sd-add-accessories-card:hover {
    background: #ecfdf5;
    border-color: #86efac;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
    transform: translateY(-1px);
}

.sd-add-track-card:active,
.sd-add-accessories-card:active {
    transform: translateY(0);
}

.sd-add-track-card.is-active,
.sd-add-accessories-card.is-active {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.sd-add-track-card.is-configured,
.sd-add-accessories-card.is-configured {
    background: #f0fdf4;
    border-color: #86efac;
}

.sd-add-track-icon-box {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1px solid rgba(22, 163, 74, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.sd-add-track-card:hover .sd-add-track-icon-box,
.sd-add-accessories-card:hover .sd-add-track-icon-box {
    transform: scale(1.05);
    border-color: #16a34a;
}

.sd-add-track-icon-box.active {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

.sd-add-track-info {
    flex: 1;
    min-width: 0;
}

.sd-add-track-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.25;
}

.sd-add-track-sub {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

.sd-add-track-arrow {
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sd-add-track-card:hover .sd-add-track-arrow,
.sd-add-accessories-card:hover .sd-add-track-arrow {
    transform: translateX(3px);
    color: #16a34a;
}

/* Quotation Summary Additional Track Item */
.sd-quotation-item-extra-track,
.sd-quotation-item-extra-brushed,
.sd-quotation-item-extra-softclose,
.sd-quotation-item-extra-topwheel,
.sd-quotation-item-extra-bottomwheel,
.sd-quotation-item-extra-wheels {
    background: #ffffff;
    border-radius: 8px;
}

.sd-quotation-track-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
    background: transparent;
    padding: 2px;
    box-sizing: border-box;
    display: block;
}

.sd-quotation-item-price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.sd-quotation-item-price-wrap button,
.sd-btn-remove-softclose-line,
.sd-btn-remove-extra-track-line,
.sd-btn-remove-extra-brushed-line,
.sd-btn-remove-extra-softclose-line,
.sd-btn-remove-extra-topwheel-line,
.sd-btn-remove-extra-bottomwheel-line,
.sd-btn-remove-extra-wheels-line {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.15s ease;
    font-family: inherit;
    line-height: inherit;
}

.sd-quotation-item-price-wrap button:hover,
.sd-btn-remove-softclose-line:hover,
.sd-btn-remove-extra-track-line:hover,
.sd-btn-remove-extra-brushed-line:hover,
.sd-btn-remove-extra-softclose-line:hover,
.sd-btn-remove-extra-topwheel-line:hover,
.sd-btn-remove-extra-bottomwheel-line:hover,
.sd-btn-remove-extra-wheels-line:hover {
    color: #dc2626;
}

/* ==========================================================================
   Bottom Additional Track Configuration Section (Matches Screenshot)
   ========================================================================== */

.sd-extra-track-section-wrap {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 1. Info Banner */
.sd-extra-track-info-banner {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sd-extra-track-info-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sd-extra-track-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sd-extra-track-info-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #064e3b;
    line-height: 1.35;
}

.sd-extra-track-info-sub {
    font-size: 12.5px;
    color: #047857;
    line-height: 1.35;
}

/* 2. Configuration Form Card */
.sd-extra-track-form-card {
    background: #ffffff;
    border: 1.5px solid #86efac;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.sd-extra-track-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.sd-extra-track-form-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sd-extra-track-thumb-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sd-extra-track-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sd-extra-track-form-titles {
    display: flex;
    flex-direction: column;
}

.sd-extra-track-form-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 3px 0;
    line-height: 1.25;
}

.sd-extra-track-form-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

.sd-extra-track-btn-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}

.sd-extra-track-btn-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Controls Grid */
.sd-extra-track-form-grid {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #f1f5f9;
    flex-wrap: wrap;
}

.sd-extra-track-field-group {
    display: flex;
    flex-direction: column;
}

.sd-extra-track-pos-group {
    flex: 1 1 150px;
    min-width: 130px;
}

.sd-extra-track-len-group {
    flex: 0 1 125px;
    min-width: 110px;
    position: relative;
}

.sd-extra-track-profile-group {
    flex: 1 1 80px;
    min-width: 125px;
}

.sd-extra-track-color-group {
    flex: 1 1 110px;
    min-width: 135px;
}

.sd-extra-track-image-group {
    flex: 0 0 68px;
    min-width: 58px;
}

.sd-extra-track-image-wrap {
    width: 60px;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.sd-extra-track-image-wrap:hover {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.sd-extra-track-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    background: #ffffff;
}

.sd-extra-track-qty-group {
    flex: 0 0 115px;
    min-width: 105px;
}

.sd-extra-track-btn-group {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}

.sd-extra-track-field-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 7px;
    display: block;
}

.sd-extra-track-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.sd-extra-track-select {
    width: 100%;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 34px 0 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sd-extra-track-select:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.sd-extra-track-select-caret {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
    display: flex;
    align-items: center;
}

.sd-extra-track-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.sd-extra-track-len-input-form {
    width: 100%;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 44px 0 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sd-extra-track-len-input-form:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.sd-extra-track-len-input-form.sd-input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.sd-extra-track-len-err {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.sd-extra-track-input-unit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
}

.sd-extra-track-qty-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0 6px;
    width: 110px;
    box-sizing: border-box;
}

.sd-extra-track-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    user-select: none;
}

.sd-extra-track-qty-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.sd-extra-track-qty-value {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    min-width: 24px;
    text-align: center;
}

.sd-btn-add-track-submit,
.sd-btn-add-brushed-submit,
.sd-btn-add-softclose-submit,
.sd-btn-add-topwheel-submit,
.sd-btn-add-bottomwheel-submit,
.sd-btn-add-wheels-submit {
    height: 42px;
    padding: 0 24px;
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sd-btn-add-track-submit:hover,
.sd-btn-add-brushed-submit:hover,
.sd-btn-add-softclose-submit:hover,
.sd-btn-add-topwheel-submit:hover,
.sd-btn-add-bottomwheel-submit:hover,
.sd-btn-add-wheels-submit:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.sd-btn-add-track-submit:active,
.sd-btn-add-brushed-submit:active,
.sd-btn-add-softclose-submit:active,
.sd-btn-add-topwheel-submit:active,
.sd-btn-add-bottomwheel-submit:active,
.sd-btn-add-wheels-submit:active {
    transform: translateY(0);
}

.sd-btn-remove-track-submit,
.sd-btn-remove-brushed-submit,
.sd-btn-remove-softclose-submit,
.sd-btn-remove-topwheel-submit,
.sd-btn-remove-bottomwheel-submit,
.sd-btn-remove-wheels-submit {
    height: 42px;
    padding: 0 16px;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.sd-btn-remove-track-submit:hover,
.sd-btn-remove-brushed-submit:hover,
.sd-btn-remove-softclose-submit:hover,
.sd-btn-remove-topwheel-submit:hover,
.sd-btn-remove-bottomwheel-submit:hover,
.sd-btn-remove-wheels-submit:hover {
    background: #fecaca;
    color: #b91c1c;
}

/* Flash highlight animation when clicked from Quotation Summary */
@keyframes sdCardHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
        border-color: #16a34a;
    }

    50% {
        box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.2);
        border-color: #16a34a;
    }

    100% {
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
        border-color: #86efac;
    }
}

.sd-card-highlight {
    animation: sdCardHighlight 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Additional Hardware & Accessories Section
   ========================================================================== */
.sd-extra-accessories-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sd-extra-accessories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.sd-extra-accessories-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sd-extra-accessories-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex-shrink: 0;
}

.sd-extra-accessories-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sd-extra-accessories-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.sd-extra-accessories-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
}

.sd-extra-accessories-btn-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.15s ease;
}

.sd-extra-accessories-btn-close:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.sd-extra-accessories-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sd-extra-accessory-item {
    border: 1.2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.sd-extra-accessory-item.is-added {
    border-color: #86efac;
    background: #fcfdfd;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.06);
}

.sd-extra-accessory-item-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.sd-extra-accessory-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sd-extra-accessory-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sd-extra-accessory-info {
    flex: 1;
    min-width: 0;
}

.sd-extra-accessory-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 3px 0;
    line-height: 1.25;
}

.sd-extra-accessory-desc {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.sd-extra-accessory-price-badge {
    text-align: right;
    flex-shrink: 0;
}

.sd-extra-accessory-rate {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #16a34a;
    line-height: 1.2;
}

.sd-extra-accessory-unit {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.3;
    margin-top: 1px;
}

.sd-extra-accessory-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #f1f5f9;
}

.sd-extra-accessory-static-text {
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .sd-extra-track-form-grid,
    .sd-extra-accessory-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .sd-extra-track-pos-group,
    .sd-extra-track-len-group,
    .sd-extra-track-profile-group,
    .sd-extra-track-color-group,
    .sd-extra-track-image-group,
    .sd-extra-track-qty-group,
    .sd-extra-track-btn-group,
    .sd-extra-accessory-grid .sd-extra-track-field-group,
    .sd-extra-accessory-grid .sd-extra-track-btn-group {
        flex: 1 1 100%;
        width: 100%;
    }

    .sd-extra-track-image-wrap {
        width: 100%;
        height: 56px;
    }

    .sd-extra-track-qty-stepper {
        width: 100%;
    }

    .sd-btn-add-track-submit,
    .sd-btn-add-brushed-submit,
    .sd-btn-add-softclose-submit,
    .sd-btn-add-topwheel-submit,
    .sd-btn-add-bottomwheel-submit,
    .sd-btn-add-wheels-submit,
    .sd-btn-remove-track-submit,
    .sd-btn-remove-brushed-submit,
    .sd-btn-remove-softclose-submit,
    .sd-btn-remove-topwheel-submit,
    .sd-btn-remove-bottomwheel-submit,
    .sd-btn-remove-wheels-submit {
        width: 100%;
    }
}

/* =========================================================================
   TOP-VIEW RUNNING TRACK EDITABLE DIMENSION CALLOUT BUBBLES
   ========================================================================= */
.sd-track-callouts-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 12;
}

.sd-track-bubble {
    position: absolute;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    line-height: 18px;
    height: 22px;
    box-sizing: border-box;
    text-align: center;
}

/* Arrow pointer: pointing DOWN to top/back rail */
.sd-track-bubble.is-down::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 4.5px 0 4.5px;
    border-style: solid;
    border-color: #cbd5e1 transparent transparent transparent;
}

.sd-track-bubble.is-down::before {
    content: '';
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 4.5px 0 4.5px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
    z-index: 1;
}

/* Arrow pointer: pointing UP to bottom/front rail */
.sd-track-bubble.is-up::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 4.5px 5px 4.5px;
    border-style: solid;
    border-color: transparent transparent #cbd5e1 transparent;
}

.sd-track-bubble.is-up::before {
    content: '';
    position: absolute;
    bottom: calc(100% - 1px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 4.5px 5px 4.5px;
    border-style: solid;
    border-color: transparent transparent #ffffff transparent;
    z-index: 1;
}

/* Suppress sd-design-price badge on door design cards */
.sd-design-price {
    display: none !important;
}

/* ==========================================================================
   Soft-Closer Dedicated Per-Door Configuration Card
   (Matches media_1792652580497.png)
   ========================================================================== */
.sd-softclose-card {
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 22px 24px;
    margin-top: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.sd-softclose-card.sd-card-highlight {
    animation: sdCardHighlight 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Header */
.sd-softclose-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.sd-softclose-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.sd-softclose-thumb-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-softclose-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sd-softclose-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sd-softclose-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sd-softclose-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
}

.sd-softclose-badge {
    display: inline-flex;
    align-items: center;
    background: #dcfce7;
    color: #16a34a;
    font-size: 12.5px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 9999px;
    line-height: 1.3;
}

.sd-softclose-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Close Button (X) */
.sd-softclose-btn-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.sd-softclose-btn-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Info Alert Banner */
.sd-softclose-info-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 20px;
}

.sd-softclose-info-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-softclose-info-text {
    font-size: 13.5px;
    color: #15803d;
    margin: 0;
    line-height: 1.4;
}

.sd-softclose-info-text strong {
    font-weight: 700;
}

/* Doors Grid */
.sd-softclose-doors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

/* Individual Door Card */
.sd-sc-door-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sd-sc-door-card.is-active {
    border-color: #86efac;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.06);
}

/* Door Card Top: Label & Diagram */
.sd-sc-door-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sd-sc-door-meta {
    display: flex;
    flex-direction: column;
}

.sd-sc-door-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.sd-sc-door-pos {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 3px;
    font-weight: 500;
}

.sd-sc-door-diagram {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-sc-door-diagram svg {
    display: block;
}

/* Horizontal Divider */
.sd-sc-door-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0 0 14px 0;
}

/* Controls Row: Left side & Right side columns */
.sd-sc-door-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.sd-sc-side-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sd-sc-side-col.is-right {
    border-left: 1px solid #f1f5f9;
    padding-left: 16px;
}

.sd-sc-side-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

/* iOS / Pill-style Toggle Switch */
.sd-sc-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.sd-sc-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

.sd-sc-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #e2e8f0;
    border-radius: 9999px;
    transition: background-color 0.25s ease;
    flex-shrink: 0;
}

.sd-sc-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 1px 1px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sd-sc-toggle-input:checked + .sd-sc-toggle-slider {
    background-color: #16a34a;
}

.sd-sc-toggle-input:checked + .sd-sc-toggle-slider::before {
    transform: translateX(20px);
}

.sd-sc-toggle-state-text {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    min-width: 24px;
    transition: color 0.15s ease;
}

.sd-sc-toggle-input:checked ~ .sd-sc-toggle-state-text {
    color: #0f172a;
    font-weight: 600;
}

/* Prompt Card in Quotation Sidebar */
.sd-add-softclose-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.sd-add-softclose-card:hover {
    background: #f0fdf4;
    border-color: #86efac;
}

.sd-add-softclose-card.is-active,
.sd-add-softclose-card.is-configured {
    background: #f0fdf4;
    border-style: solid;
    border-color: #86efac;
}

.sd-quotation-item-softclose {
    cursor: pointer;
    transition: background 0.15s ease;
}

.sd-quotation-item-softclose:hover {
    background: #f0fdf4;
}

@media (max-width: 640px) {
    .sd-softclose-doors-grid {
        grid-template-columns: 1fr;
    }
    .sd-softclose-card {
        padding: 16px 16px;
    }
}

/* ==========================================================================
   Master Container for All Additional Accessories & Products
   ========================================================================== */
.sd-extra-products-master-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.sd-extra-products-master-wrap.sd-card-highlight {
    animation: sdCardHighlight 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sd-extra-products-master-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1.5px solid #f1f5f9;
}

.sd-extra-products-master-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sd-extra-products-master-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex-shrink: 0;
}

.sd-extra-products-master-titles {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sd-extra-products-master-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.sd-extra-products-master-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.sd-extra-products-master-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    padding: 0;
    transition: all 0.15s ease;
}

.sd-extra-products-master-close-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.sd-extra-products-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Adjust child cards when placed inside the master wrap */
.sd-extra-products-list .sd-softclose-card,
.sd-extra-products-list .sd-extra-track-form-card,
.sd-extra-products-list .sd-extra-accessory-item {
    margin-top: 0;
    border: 1.2px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.sd-extra-products-list .sd-softclose-card.is-added,
.sd-extra-products-list .sd-extra-track-form-card.is-added,
.sd-extra-products-list .sd-extra-accessory-item.is-added {
    border-color: #86efac;
    background: #fcfdfd;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.06);
}

.sd-extra-products-list .sd-softclose-card.sd-card-highlight,
.sd-extra-products-list .sd-extra-track-form-card.sd-card-highlight,
.sd-extra-products-list .sd-extra-accessory-item.sd-card-highlight {
    animation: sdCardHighlight 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Unified Master Prompt Card in Quotation Sidebar */
.sd-add-accessories-master-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.sd-add-accessories-master-card:hover {
    background: #f0fdf4;
    border-color: #86efac;
}

.sd-add-accessories-master-card.is-active,
.sd-add-accessories-master-card.is-configured {
    background: #f0fdf4;
    border-style: solid;
    border-color: #86efac;
}

@media (max-width: 640px) {
    .sd-extra-products-master-wrap {
        padding: 18px 16px;
    }
    .sd-extra-products-list .sd-softclose-card,
    .sd-extra-products-list .sd-extra-track-form-card,
    .sd-extra-products-list .sd-extra-accessory-item {
        padding: 16px 14px;
    }
}