/**
 * Configurator Layout & Component Styles
 * Extracted from index.php for maintainability
 * Loaded after configurator.css, mobile-ux-v2.css, and dark-mode.css
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Saira', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
}

/* UI panels hidden until user makes initial choice */
#module-library,
#module-preview-section,
#unit-toggle {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
}

/* Revealed state after initial choice */
body.ui-revealed #module-library,
body.ui-revealed #module-preview-section,
body.ui-revealed #unit-toggle {
    opacity: 1;
    pointer-events: auto;
}

/* Watermark shifts right when left panel is visible */
#configurator-watermark {
    left: 20px;
    transition: left 0.4s ease-out;
}
body.ui-revealed #configurator-watermark {
    left: 440px;
}
@media (max-width: 1024px) {
    /* On mobile, watermark stays in place (no left panel visible) */
    #configurator-watermark {
        left: 20px !important;
    }
}

/* Mobile FAB - hidden by default, shown on mobile */
#mobile-share-fab {
    display: none;
}

#configurator-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: block;
    background: #87CEEB;
    /* Fallback */
}

#viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 60px;
    background: #15635E;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

#header h1 {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    font-style: italic;
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-home-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    padding: 0.4rem;
}

.header-home-link:hover {
    opacity: 1;
}

#header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Toolbar group wrappers: invisible on mobile (display: contents = children render as-if no wrapper) */
.toolbar-group {
    display: contents;
}

/* Toolbar dividers: hidden below 901px */
.toolbar-divider {
    display: none;
}

/* Row 2 + Properties panel: hidden below 901px (desktop only) */
.header-row2 {
    display: none;
}

.properties-panel {
    display: none;
}

/* ─── Modal z-index fix: all modals must be above header (z-index: 9999) ─── */
.modal-overlay,
.configurator-modal,
.share-modal-overlay,
.shared-link-modal-overlay,
.share-modal-backdrop,
.share-modal,
.auth-modal-backdrop,
.kit-modal-backdrop,
.email-modal-backdrop,
.help-modal-backdrop,
.quote-modal-backdrop,
.annotation-modal,
.light-gate-backdrop {
    z-index: 10001 !important;
}

/* Modal content boxes — one tick higher than backdrops */
.modal-overlay .modal-content-box,
.share-modal-overlay .share-modal-content,
.shared-link-modal-overlay .shared-link-content,
.configurator-modal .modal-content,
.share-modal,
.annotation-modal,
.auth-modal-content,
.kit-modal-content,
.email-modal-content,
.help-modal-content,
.quote-modal-content {
    z-index: 10002 !important;
}

/* Notification toasts above header */
.notification-toast {
    z-index: 10003 !important;
}

.btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: white;
    color: #15635E;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Module Library */
#module-library {
    position: absolute;
    top: 70px;
    left: 20px;
    bottom: 20px;
    width: 400px;
    z-index: 10;

    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);

    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#modules-container {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Critical: allows flex child to shrink and scroll */
}

#module-grid {
    flex: 1 1 auto;
    min-height: 0;
}

/* Mobile: Single column list for modules */
@media (max-width: 1024px) {
    #module-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
}

#foundation-section {
    flex-shrink: 0;
    margin-top: 10px;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}

#module-library h2 {
    color: #15635E;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

/* Module Diagram */
#module-diagram {
    position: relative;
    margin-bottom: 1rem;
    border: 2px solid #15635E;
    border-radius: 8px;
    overflow: hidden;
}

#diagram-overlay rect:hover {
    opacity: 0.2 !important;
    fill: #15635E;
}

#diagram-overlay rect.active {
    opacity: 0.3 !important;
    fill: #28a745;
}

.module-category {
    margin-bottom: 1.5rem;
}

.module-category h3 {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.module-item {
    background: #f8f9fa;
    padding: 10px;
    margin-bottom: 0px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.module-item:hover {
    background: #e8f5f4;
    border-color: #15635E;
}

/* Category Tabs */
#category-tabs {
    border-bottom: none;
}

.category-tab:hover {
    color: #15635E !important;
    border-bottom-color: #15635E !important;
}

.category-tab.active {
    background: #15635E !important;
    color: white !important;
    border-color: #15635E !important;
    font-weight: 700 !important;
}

.module-item.added {
    background: #d4edda;
    border-color: #28a745;
}

.module-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.module-price {
    color: #15635E;
    font-weight: 700;
}

/* 3D Viewport */
#viewport {
    position: relative;
    background: linear-gradient(to bottom, #87CEEB 0%, #f5f5f5 100%);
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    /* Force hardware acceleration */
    transform: translateZ(0);
}

#loading {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.65);
    padding: 1.25rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    z-index: 10001;
    max-width: 380px;
}

/* Initial choice modal - Desktop positioning */
#initial-choice-inline {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(21, 99, 94, 0.2);
    backdrop-filter: blur(12px);
    z-index: 10001;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #15635E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.75rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Build Summary */
#build-summary {
    background: white;
    padding: 1.5rem;
    overflow-y: auto;
    border-left: 1px solid #e0e0e0;
    /* Hide by default on desktop too, will be toggled */
    display: none;
    position: absolute;
    right: 0;
    top: 60px;
    bottom: 0;
    width: 350px;
    z-index: 100;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

#build-summary.open {
    display: block;
}

#selected-modules {
    margin-bottom: 2rem;
}

.item-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.item-action-btn:hover {
    transform: scale(1.2);
}

.selected-module {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.selected-module:hover {
    border-color: #15635E;
    background: #f0f7f6;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.selected-module-info {
    flex: 1;
}

.selected-module-name {
    font-weight: 600;
    color: #333;
}

.selected-module-qty {
    font-size: 0.9rem;
    color: #666;
}

/* .remove-btn defined above at line ~451 */

#price-breakdown {
    border-top: 2px solid #e0e0e0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #666;
}

.price-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 900;
    color: #15635E;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #15635E;
}

/* Bottom Bar CTA Hierarchy (Sprint 2) */
/* Primary: Get Local Quotes — uses .cta-primary from configurator.css */
/* Secondary: Export Parts List — uses .cta-secondary from configurator.css */
/* Tertiary: Get Official Plans — uses .cta-tertiary from configurator.css */

#checkout-btn {
    /* Now tertiary — text-link style */
    width: 100%;
    margin-top: 0.5rem;
    padding: 8px 16px;
    background: transparent;
    color: #888;
    border: none;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.82rem;
    text-align: center;
    transition: color 0.2s;
}

#checkout-btn:hover:not(:disabled) {
    color: #15635E;
}

#checkout-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Light Gate Modal (Consumer Pipeline Sprint 1) */
.light-gate-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.light-gate-content {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.light-gate-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.light-gate-close:hover {
    background: #f0f0f0;
    color: #333;
}

.light-gate-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
}

.light-gate-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

.light-gate-build-info {
    background: #f5f9f8;
    border: 1px solid #d4e8e5;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.light-gate-build-info strong {
    font-size: 1rem;
    color: #15635E;
}

.light-gate-build-info span {
    font-size: 0.85rem;
    color: #555;
}

.light-gate-field {
    margin-bottom: 1rem;
}

.light-gate-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.35rem;
}

.light-gate-field input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.light-gate-field input:focus {
    outline: none;
    border-color: #15635E;
    box-shadow: 0 0 0 3px rgba(21, 99, 94, 0.1);
}

.light-gate-field-hint {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
}

.light-gate-submit {
    width: 100%;
    padding: 0.85rem;
    background: #E8740C;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.light-gate-submit:hover {
    background: #c86200;
}

.light-gate-privacy {
    text-align: center;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 0.75rem;
}

.light-gate-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    gap: 1rem;
}

.light-gate-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #eee;
    border-top-color: #E8740C;
    border-radius: 50%;
    animation: lightGateSpin 0.8s linear infinite;
}

@keyframes lightGateSpin {
    to { transform: rotate(360deg); }
}

.light-gate-loading p {
    font-size: 0.95rem;
    color: #666;
}

.light-gate-error {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Build Summary Overlay (Sprint 2) */
.build-summary-content {
    max-width: 520px;
}

.bso-stats {
    background: #f5f9f8;
    border: 1px solid #d4e8e5;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.bso-stats-info {
    flex: 1;
}

.bso-stats-kit {
    font-size: 1.1rem;
    font-weight: 700;
    color: #15635E;
    margin: 0 0 0.15rem 0;
}

.bso-stats-meta {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
}

.bso-stats-cost {
    text-align: right;
    flex-shrink: 0;
}

.bso-stats-cost-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bso-stats-cost-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #15635E;
}

.bso-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.bso-cat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.bso-cat-icon {
    font-size: 1.2rem;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.bso-cat-info {
    flex: 1;
}

.bso-cat-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.bso-cat-parts {
    font-size: 0.78rem;
    color: #888;
}

.bso-cat-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: #15635E;
    background: #eef6f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.bso-footnote {
    text-align: center;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 0.75rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    /* Hide module preview on mobile - too obstructive */
    #module-preview-section {
        display: none !important;
    }

    #configurator-container {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 60px 1fr auto;
        height: 100vh;
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }

    /* Hide Desktop Nav on Mobile */
    #header-nav {
        display: none !important;
    }

    /* Module/Summary Drawer Grab Handle */
    #module-library::before,
    #build-summary::before {
        content: "";
        display: block;
        width: 60px;
        height: 6px;
        background: #ccc;
        border-radius: 3px;
        margin: 12px auto 8px;
        cursor: grab;
        touch-action: none;
    }

    /* Visual hint on grab handle hover/touch */
    #module-library:active::before,
    #build-summary:active::before {
        background: #15635E;
    }

    #module-library,
    #build-summary {
        padding-top: 0;
    }

    .module-category h3 {
        border-bottom: 2px solid #15635E;
        padding-bottom: 5px;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
        color: #15635E;
    }

    /* Material Selection */
    .material-options-container {
        display: flex;
        gap: 10px;
        margin: 20px 0;
        padding: 10px;
        background: #f8f8f8;
        border-radius: 12px;
        border: 1px solid #eee;
    }

    .material-option {
        flex: 1;
        padding: 10px;
        text-align: center;
        background: white;
        border: 2px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
        font-size: 0.8rem;
        font-weight: bold;
        transition: all 0.2s;
    }

    .material-option:hover {
        border-color: #15635E;
        background: #f0f7f6;
    }

    .material-option.active {
        border-color: #15635E;
        background: #15635E;
        color: white;
    }

    /* Modal Drawers (Floating Card Style) */
    #module-library,
    #build-summary {
        position: fixed;
        bottom: 85px;
        /* Float above nav */
        left: 2.5%;
        /* Center nicely */
        width: 95%;
        /* Maximize width */
        height: 75vh;
        background: white;
        z-index: 5000;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        display: none;
        flex-direction: column;
        overflow: hidden;
        padding: 0;
    }

    #module-library.active,
    #build-summary.active {
        display: flex;
        /* Activate as Flex container */
    }

    /* Internal Modal Styles */
    .drawer-header {
        flex: 0 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
        background: #f9f9f9;
    }

    .drawer-header h2 {
        margin: 0;
        font-size: 1.1rem;
        color: #15635E;
        font-weight: 700;
    }

    .drawer-close-btn {
        background: none;
        border: none;
        font-size: 1.8rem;
        line-height: 1;
        color: #888;
        padding: 0 8px;
        cursor: pointer;
        display: none;
        /* Hidden on desktop by default */
    }

    /* Show close buttons only on mobile */
    @media (max-width: 1024px) {
        .drawer-close-btn {
            display: block;
        }
    }

    #modules-container,
    #selected-modules {
        flex: 1;
        overflow-y: auto;
        /* Scrollable content area */
        padding: 15px;
        -webkit-overflow-scrolling: touch;
    }

    #viewport-container {
        position: relative;
        height: 100%;
    }

    /* Mobile Bottom Nav - BIGGER */
    #mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 75px;
        /* Increased from 60px */
        background: #15635E;
        z-index: 9999;
        /* FORCE TOP */
        pointer-events: auto;
        /* ENSURED */
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-item {
        color: rgba(255, 255, 255, 0.6);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        /* Increased from 0.7rem */
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        background: none;
        border: none;
        padding: 10px;
        width: 100%;
        height: 100%;
        touch-action: manipulation;
        /* Remove delay */
        transition: transform 0.1s, background-color 0.2s, color 0.2s;
    }

    .mobile-nav-item:active {
        transform: scale(0.95);
        background-color: rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-item.active {
        color: white;
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-item span {
        font-size: 1.8rem;
        /* Emoji icon size */
        margin-bottom: 2px;
        line-height: 1;
        display: block;
    }

    /* Hide the span text wrapper if it duplicats */
    .mobile-nav-item span:last-child {
        font-size: 0.85rem;
    }

    #module-diagram {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (min-width: 1025px) {
    #mobile-nav {
        display: none;
    }
}

/* ============================================
   MOBILE CONFIGURATOR OVERHAUL
   Optimized for viral sharing & touch UX
   ============================================ */

@media (max-width: 1024px) {
    /* Floating Tools FAB - Always visible */
    #mobile-share-fab {
        position: fixed;
        bottom: 95px;
        right: 16px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #15635E 0%, #1a7a74 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 16px rgba(21, 99, 94, 0.4);
        z-index: 6000;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    #mobile-share-fab:active {
        transform: scale(0.92);
        box-shadow: 0 2px 8px rgba(21, 99, 94, 0.4);
    }

    /* Bottom Sheet Improvements */
    #module-library,
    #build-summary {
        border-radius: 24px 24px 0 0;
        bottom: 75px;
        height: 70vh;
        max-height: calc(100vh - 140px);
    }

    /* Larger grab handle */
    #module-library::before,
    #build-summary::before {
        width: 48px;
        height: 5px;
        background: #d0d0d0;
        margin: 14px auto 10px;
        border-radius: 3px;
    }

    /* Peek mode - show partial sheet */
    #module-library.peek,
    #build-summary.peek {
        height: 35vh;
    }

    /* Enhanced Module Cards for Touch */
    .module-item {
        padding: 16px;
        margin-bottom: 10px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 70px;
        border: 2px solid #e8e8e8;
        background: white;
        touch-action: manipulation;
    }

    .module-item:active {
        transform: scale(0.98);
        background: #f0f9f8;
    }

    .module-item .module-icon {
        width: 50px;
        height: 50px;
        background: #f0f9f8;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .module-item .module-info {
        flex: 1;
        min-width: 0;
    }

    .module-item .module-name {
        font-size: 1rem;
        font-weight: 700;
        color: #222;
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .module-item .module-price {
        font-size: 0.95rem;
        color: #15635E;
        font-weight: 600;
    }

    .module-item .module-add-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #15635E;
        color: white;
        border: none;
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        cursor: pointer;
        transition: background 0.2s;
    }

    .module-item .module-add-btn:active {
        background: #0d4a46;
    }

    .module-item.added .module-add-btn {
        background: #28a745;
    }

    /* Category Pills - Horizontal scroll */
    #category-tabs {
        display: flex;
        gap: 8px;
        padding: 12px 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: none;
        background: #f8f9fa;
    }

    #category-tabs::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        flex-shrink: 0;
        padding: 10px 18px;
        border-radius: 20px;
        background: white;
        border: 2px solid #e0e0e0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #666;
        white-space: nowrap;
    }

    .category-tab.active {
        background: #15635E;
        border-color: #15635E;
        color: white !important;
    }

    /* Quick Stats Bar in Summary */
    .mobile-stats-bar {
        display: flex;
        justify-content: space-around;
        padding: 16px;
        background: linear-gradient(135deg, #15635E 0%, #1a7a74 100%);
        color: white;
        border-radius: 12px;
        margin: 12px 16px;
    }

    .mobile-stat {
        text-align: center;
    }

    .mobile-stat-value {
        font-size: 1.5rem;
        font-weight: 800;
        display: block;
    }

    .mobile-stat-label {
        font-size: 0.75rem;
        opacity: 0.8;
        text-transform: uppercase;
    }

    /* Enhanced Mobile Nav */
    #mobile-nav {
        height: 70px;
        padding-bottom: env(safe-area-inset-bottom, 0);
        background: linear-gradient(180deg, #15635E 0%, #0d4a46 100%);
    }

    .mobile-nav-item {
        gap: 4px;
    }

    .mobile-nav-item svg {
        width: 26px;
        height: 26px;
    }

    .mobile-nav-item span {
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.3px;
    }

    /* Swipe hint animation */
    @keyframes swipe-hint {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
    }

    .drawer-swipe-hint {
        animation: swipe-hint 1.5s ease-in-out 3;
    }

    /* Share menu mobile optimization */
    #share-dropdown {
        top: 55px !important;
        bottom: auto !important;
        left: auto !important;
        right: 10px !important;
        width: auto !important;
        min-width: 180px;
        border-radius: 12px;
        padding: 8px;
    }

    #share-dropdown .tool-item {
        padding: 14px 16px;
        font-size: 1rem;
    }

    /* More Tools mobile optimization */
    #more-tools-dropdown {
        top: 55px !important;
        bottom: auto !important;
        left: auto !important;
        right: 10px !important;
        width: auto !important;
        min-width: 200px;
        border-radius: 16px;
        padding: 12px;
    }

    #more-tools-dropdown .tool-item {
        padding: 14px 16px;
        font-size: 1rem;
    }
}

/* Scrollbar Fix for Rounded Corners */
#module-library::-webkit-scrollbar,
#build-summary::-webkit-scrollbar {
    width: 8px;
    /* Slightly wider for usability */
}

#module-library::-webkit-scrollbar-track,
#build-summary::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 20px;
    /* Push away from top rounded corner */
    margin-bottom: 20px;
    /* Push away from bottom rounded corner */
}

#module-library::-webkit-scrollbar-thumb,
#build-summary::-webkit-scrollbar-thumb {
    background: rgba(21, 99, 94, 0.2);
    /* Subtle tint */
    border-radius: 4px;
}

#module-library::-webkit-scrollbar-thumb:hover,
#build-summary::-webkit-scrollbar-thumb:hover {
    background: rgba(21, 99, 94, 0.5);
}

/* AR Button Pulse Animation */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 107, 53, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 53, 0.8), 0 0 30px rgba(232, 175, 0, 0.4); }
}

/* Environment dropdown hover */
.env-option:hover {
    border-color: #15635E !important;
    background: #f0f9f8 !important;
}

/* Mobile header - simplified with Share and Tools buttons */
@media (max-width: 768px) {
    #header {
        height: 50px;
        padding: 0 12px;
    }
    /* Hide these buttons on mobile - they go in dropdowns */
    #ar-btn,
    #interior-view-btn,
    #walkthrough-btn,
    #fullscreen-btn,
    #start-over-btn {
        display: none !important;
    }
    /* Hide Tools button on mobile - FAB replaces it */
    #more-tools-btn {
        display: none !important;
    }
    /* Keep Share button visible */
    #share-menu-btn {
        display: flex !important;
        padding: 8px 12px !important;
    }
    /* Hide button text labels on mobile portrait for more space */
    #share-menu-btn .btn-label {
        display: none !important;
    }
    /* Make icons slightly larger when text is hidden */
    #share-menu-btn i {
        font-size: 1.15rem;
    }
    /* Show mobile-only items in dropdown */
    .mobile-only-tool {
        display: flex !important;
    }
}

/* Hide mobile-only tools on desktop */
@media (min-width: 769px) {
    .mobile-only-tool {
        display: none !important;
    }
}

/* Floating AR Button - Mobile Only */
.mobile-ar-fab {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #FF6B35 0%, #E8AF00 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    animation: ar-fab-pulse 2s ease-in-out infinite;
    align-items: center;
    gap: 8px;
}
.mobile-ar-fab i {
    font-size: 1.1rem;
}
.mobile-ar-fab:active {
    transform: scale(0.95);
}
@keyframes ar-fab-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(255, 107, 53, 0.7), 0 0 40px rgba(232, 175, 0, 0.3); }
}
@media (max-width: 768px) {
    .mobile-ar-fab {
        display: flex;
    }
}
/* Hide FAB when modals are open */
body.modal-open .mobile-ar-fab {
    display: none !important;
}

/* Design Your Own CTA - Floating button for first-time visitors */
.design-cta {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1000;
    background: linear-gradient(135deg, #15635E 0%, #1a7a74 100%);
    color: white;
    border-radius: 50px;
    padding: 16px 28px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(21, 99, 94, 0.4);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.design-cta.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.design-cta:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 30px rgba(21, 99, 94, 0.5);
}
.design-cta:active {
    transform: translateX(-50%) scale(0.95);
}
.design-cta-content {
    display: flex;
    align-items: center;
    gap: 10px;
}
.design-cta-icon {
    font-size: 1.3rem;
}
.design-cta-text {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .design-cta {
        padding: 14px 22px;
    }
    .design-cta-text {
        font-size: 1rem;
    }
}

/* Mobile styles for kit selection - initial-choice moved to mobile-ux-v2.css */
@media (max-width: 600px) {
    /* Kit grid - stack on mobile */
    #kit-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    #kit-selection-modal .modal-content {
        padding: 1.5rem !important;
        width: 95% !important;
    }
}

/* Hide button labels on medium screens */
@media (max-width: 900px) and (min-width: 769px) {
    #header-actions .btn-label {
        display: none;
    }
    #header-actions .btn {
        padding: 8px 10px;
    }
}

/* ============================================
   DESKTOP APPLICATION TOOLBAR (>900px)
   Grouped layout with visual dividers
   ============================================ */
@media (min-width: 901px) {
    /* Frosted pill container for entire toolbar */
    #header-actions {
        gap: 0;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        padding: 4px 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    /* Toolbar groups become visible flex containers */
    .toolbar-group {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 0 6px;
    }

    /* Vertical divider between groups */
    .toolbar-divider {
        display: block;
        width: 1px;
        height: 24px;
        background: rgba(255, 255, 255, 0.2);
        flex-shrink: 0;
    }

    /* Uniform ghost button treatment — all same style */
    #header-actions .header-btn {
        background: transparent !important;
        color: rgba(255, 255, 255, 0.85) !important;
        border: none;
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 0.8rem;
        font-weight: 500;
        gap: 5px;
        transition: background 0.15s, color 0.15s;
        box-shadow: none;
    }

    #header-actions .header-btn:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
        box-shadow: none;
        transform: none;
    }

    /* Override individual color classes — uniform ghost on desktop */
    #header-actions .header-btn.teal,
    #header-actions .header-btn.cyan,
    #header-actions .header-btn.pink {
        color: rgba(255, 255, 255, 0.85) !important;
        background: transparent !important;
    }

    #header-actions .header-btn.teal:hover,
    #header-actions .header-btn.cyan:hover,
    #header-actions .header-btn.pink:hover {
        color: white !important;
        background: rgba(255, 255, 255, 0.15) !important;
    }

    /* Share button: primary accent — stands out as main export action */
    #header-actions .header-btn.share-accent {
        background: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
        font-weight: 600;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
    }

    #header-actions .header-btn.share-accent:hover {
        background: rgba(255, 255, 255, 0.25) !important;
    }

    /* Undo/redo: ghost style matching toolbar */
    #header-actions .undo-redo-group {
        background: transparent;
        padding: 0;
        border-radius: 0;
        gap: 2px;
    }

    #header-actions .undo-redo-btn {
        color: rgba(255, 255, 255, 0.5);
        background: transparent;
        padding: 6px 8px;
        border-radius: 6px;
    }

    #header-actions .undo-redo-btn:not(:disabled):hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    #header-actions .undo-redo-btn:not(:disabled) {
        color: rgba(255, 255, 255, 0.85);
    }

    /* Unit toggle: blend with toolbar */
    #header-actions .header-unit-toggle {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
    }

    /* Start Over: subtle, isolated, destructive */
    #header-actions .start-over-btn {
        background: transparent;
        color: rgba(255, 255, 255, 0.45);
        border: 1px dashed rgba(255, 255, 255, 0.2);
        padding: 6px 10px;
        font-size: 0.75rem;
        margin-left: 2px;
    }

    #header-actions .start-over-btn:hover {
        color: rgba(255, 255, 255, 0.85);
        border-color: rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.08);
    }

    /* Active states: filled backgrounds for toggle indication */
    #header-actions .header-btn.active {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #15635E !important;
    }

    #header-actions .header-btn.active-gold {
        background: #E8AF00 !important;
        color: #333 !important;
    }

    #header-actions .header-btn.active-interior {
        background: #17a2b8 !important;
        color: white !important;
    }

    /* Hide Share/Tools dropdown buttons on desktop — Row 2 replaces them */
    #header-actions .toolbar-group[aria-label="Export and Tools"] {
        display: none;
    }
    /* Also hide the divider before the Export and Tools group */

    /* ─── Header: two-row layout ─── */
    #header {
        height: auto;
        flex-wrap: wrap;
        padding: 8px 16px 0;
    }

    .header-left-group {
        align-self: flex-start;
        padding-top: 4px;
    }

    #header-actions {
        align-self: flex-start;
        margin-top: 2px;
    }

    /* ─── Row 2: Feature Discovery ─── */
    .header-row2 {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 4px 0 6px;
        gap: 0;
        justify-content: center;
    }

    .header-row2 .toolbar-group {
        gap: 2px;
        padding: 0 4px;
    }

    .header-row2 .toolbar-divider {
        height: 20px;
    }

    /* Row 2 icon buttons */
    .row2-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 28px;
        background: transparent;
        color: rgba(255, 255, 255, 0.6);
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 0.8rem;
        transition: background 0.15s, color 0.15s;
        position: relative;
    }

    .row2-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .row2-btn.active {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }

    /* ─── Custom Tooltips for Row 2 ─── */
    .row2-tooltip {
        position: fixed;
        pointer-events: none;
        z-index: 10004;
        padding: 6px 12px;
        background: rgba(15, 15, 15, 0.95);
        color: #f0f0f0;
        font-size: 0.72rem;
        font-weight: 500;
        letter-spacing: 0.02em;
        border-radius: 6px;
        white-space: nowrap;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
        opacity: 0;
        transform: translateY(-4px);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .row2-tooltip.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* Tooltip arrow (pointing up toward the button) */
    .row2-tooltip::before {
        content: '';
        position: absolute;
        top: -5px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 5px solid rgba(15, 15, 15, 0.95);
    }

    /* Spacer pushes Get Quote to far right */
    .row2-spacer {
        flex: 1;
    }

    /* CTA button (Get Quote) — labeled, stands out */
    .row2-btn-cta {
        display: flex;
        align-items: center;
        gap: 5px;
        height: 28px;
        padding: 0 12px;
        background: #E8AF00;
        color: #1a1a1a;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 0.72rem;
        font-weight: 700;
        white-space: nowrap;
        transition: background 0.15s, transform 0.1s;
    }

    .row2-btn-cta:hover {
        background: #FFD700;
        transform: translateY(-1px);
    }

    .row2-btn-cta:active {
        transform: scale(0.97);
    }

    .row2-btn-cta i {
        font-size: 0.75rem;
    }

    /* Adjust module library top for taller header */
    #module-library {
        top: 100px;
    }

    /* Fix modals/loading clipped by two-row header (z-index: 9999, ~90px tall) */
    #initial-choice-inline {
        top: 110px;
        z-index: 10001;
    }

    #loading {
        top: 110px;
        z-index: 10001;
    }

    /* Notifications: bump below two-row header */
    .notification-toast {
        top: 100px;
    }

    /* Hide floating tool-windows on desktop — properties panel replaces them */
    .tool-window {
        display: none !important;
    }

    /* ─── Properties Panel (Blender-style sidebar) ─── */
    .properties-panel {
        position: fixed;
        right: 0;
        top: 90px;
        bottom: 0;
        width: 280px;
        background: rgba(30, 30, 30, 0.92);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 2000;
        overflow-y: auto;
        display: none;
        padding: 8px 0;
    }

    .properties-panel.visible {
        display: block;
    }

    .properties-panel::-webkit-scrollbar {
        width: 6px;
    }

    .properties-panel::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 3px;
    }

    /* Props section: accordion */
    .props-section {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .props-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 14px;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.8rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .props-header span {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .props-header:hover {
        background: rgba(255, 255, 255, 0.06);
        color: white;
    }

    .props-chevron {
        font-size: 0.65rem;
        transition: transform 0.2s;
        opacity: 0.5;
    }

    .props-section.open .props-chevron {
        transform: rotate(180deg);
    }

    .props-section.open .props-header {
        color: white;
        background: rgba(255, 255, 255, 0.06);
    }

    .props-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
        padding: 0 14px;
    }

    .props-section.open .props-body {
        max-height: 500px;
        padding: 10px 14px 14px;
    }

    /* Props panel content styles */
    .props-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .properties-panel .env-option,
    .properties-panel .weather-option {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.8);
        border-radius: 6px;
        padding: 8px;
        font-size: 0.75rem;
        cursor: pointer;
        transition: all 0.15s;
        text-align: center;
    }

    .properties-panel .env-option:hover,
    .properties-panel .weather-option:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.25);
        color: white;
    }

    .properties-panel .env-option.active,
    .properties-panel .weather-option.active {
        background: rgba(78, 205, 196, 0.2);
        border-color: #4ecdc4;
        color: white;
    }

    .properties-panel .time-preset {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.8);
        border-radius: 6px;
        padding: 6px;
        font-size: 0.7rem;
        cursor: pointer;
        transition: all 0.15s;
    }

    .properties-panel .time-preset:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .properties-panel .time-preset.active {
        background: rgba(232, 175, 0, 0.2);
        border-color: #E8AF00;
        color: white;
    }

    .properties-panel .tool-section-label {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
        font-weight: 600;
    }

    .properties-panel .sun-slider-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
    }

    .properties-panel .sun-slider-input {
        flex: 1;
        -webkit-appearance: none;
        appearance: none;
        height: 6px;
        background: linear-gradient(to right, #FF8C00, #FFD700, #87CEEB, #4169E1);
        border-radius: 3px;
    }

    .properties-panel .sun-slider-input::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: #E8AF00;
        border-radius: 50%;
        border: 2px solid white;
        cursor: pointer;
    }

    .properties-panel .sun-time-display {
        text-align: center;
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.75rem;
        margin-top: 4px;
    }

    .properties-panel .camera-presets-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .properties-panel .camera-preset-btn {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.8);
        border-radius: 6px;
        padding: 8px 4px;
        font-size: 0.7rem;
        cursor: pointer;
        text-align: center;
        transition: all 0.15s;
    }

    .properties-panel .camera-preset-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.25);
        color: white;
    }

    .properties-panel .camera-btn-icon {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .properties-panel .dimension-box {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        padding: 8px;
        text-align: center;
    }

    .properties-panel .dimension-label {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.65rem;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    .properties-panel .dimension-value {
        color: white;
        font-size: 1rem;
        font-weight: 600;
    }

    .properties-panel .dimensions-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }

    .properties-panel .dimension-toggle-btn {
        margin-top: 8px;
        width: 100%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.7);
        border-radius: 6px;
        padding: 6px;
        font-size: 0.75rem;
        cursor: pointer;
        transition: all 0.15s;
    }

    .properties-panel .dimension-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .properties-panel .explode-description {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .properties-panel .explode-btn {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.8);
        border-radius: 6px;
        padding: 8px 16px;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.15s;
    }

    .properties-panel .explode-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .properties-panel .explode-status {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.7rem;
        margin-top: 6px;
    }
}

/* Sun slider styling */
#sun-slider {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #FF8C00, #FFD700, #87CEEB, #4169E1);
    border-radius: 4px;
}
#sun-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #E8AF00;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* More Tools dropdown styling */
.tool-item:hover {
    background: #f0f9f8 !important;
}
.tool-item:active {
    background: #e0f0ef !important;
}

/* Draggable Tool Windows */
.tool-window {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 2500;
    min-width: 220px;
    overflow: hidden;
}

/* Mobile: Center tool windows and make them full-width cards */
@media (max-width: 1024px) {
    .tool-window {
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
        bottom: 160px !important;
        width: auto !important;
        min-width: unset !important;
        max-height: 60vh;
        overflow-y: auto;
        border-radius: 16px;
    }
}
.tool-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    cursor: move;
    user-select: none;
}
.tool-window-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #15635E;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tool-window-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.tool-window-close:hover {
    color: #dc3545;
}
.tool-window-body {
    padding: 16px;
}
