/* * SA Coating - 3D VISUALIZER STYLES
 * Focus: FUI (Futuristic UI), Space Efficiency
 */

/* --- 1. LAYOUT --- */
#viz-app {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

#canvas-wrapper {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
    z-index: 1;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 100px 100px;
}

/* --- 2. TOP BAR (Room Switcher) --- */
.viz-top-bar {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 20px 30px;
    display: flex; justify-content: space-between; align-items: flex-start;
    z-index: 10; pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 100%);
}
.viz-top-bar > * { pointer-events: auto; }

.room-tabs {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px;
}
/* Hide Scrollbar on Top Tabs */
.room-tabs::-webkit-scrollbar { display: none; }

.r-tab {
    background: rgba(20, 20, 20, 0.8); border: 1px solid rgba(255,255,255,0.2);
    color: #ccc; padding: 8px 20px; border-radius: 30px;
    cursor: pointer; font-weight: 600; font-size: 0.8rem; white-space: nowrap;
    transition: 0.3s; backdrop-filter: blur(5px);
}
.r-tab i { margin-right: 5px; }
.r-tab:hover { border-color: white; color: white; }
.r-tab.active { background: #00aeef; border-color: #00aeef; color: black; box-shadow: 0 0 15px rgba(0, 174, 239, 0.4); }

.viz-actions { display: flex; gap: 10px; }
.act-btn {
    padding: 8px 20px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.6); color: white; cursor: pointer; font-weight: 700; font-size: 0.75rem;
    text-transform: uppercase; transition: 0.3s;
}
.act-btn:hover { background: white; color: black; }
.act-btn.primary { background: #00aeef; border-color: #00aeef; color: black; }

/* --- 3. BOTTOM BAR (Palette & Status) --- */
.viz-bottom-bar {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1000px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 15px 25px;
    display: flex; align-items: center; gap: 30px;
    z-index: 10;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.status-panel {
    min-width: 120px;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 20px;
}
.status-panel small { color: #00aeef; font-size: 0.6rem; letter-spacing: 1px; display: block; }
.status-panel h4 { color: white; margin: 0; font-size: 1rem; font-weight: 700; }

/* SCROLLABLE PALETTE FIX */
.palette-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden; /* Mask the edges */
}
.palette-scroller {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
    scroll-behavior: smooth;
}
/* Custom Scrollbar Styling */
.palette-scroller::-webkit-scrollbar { height: 6px; }
.palette-scroller::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.palette-scroller::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
.palette-scroller::-webkit-scrollbar-thumb:hover { background: #00aeef; }

.swatch {
    width: 45px; height: 45px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer; transition: transform 0.2s;
    flex-shrink: 0; /* Prevent squishing */
}
.swatch:hover { transform: scale(1.2); border-color: white; z-index: 2; box-shadow: 0 0 15px rgba(255,255,255,0.3); }

/* Custom Picker */
.custom-color {
    position: relative;
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-left: 1px solid rgba(255,255,255,0.1);
    padding-left: 20px;
}
.custom-color input { position: absolute; opacity: 0; width: 0; height: 0; }
.custom-color label {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px dashed #666; color: #aaa;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s;
}
.custom-color label:hover { border-color: #00aeef; color: #00aeef; transform: rotate(45deg); }

/* --- 4. LOADING --- */
#loading-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 100;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.5s;
}
.spinner {
    width: 50px; height: 50px; border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #00aeef; border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-screen p { color: #00aeef; font-family: monospace; letter-spacing: 3px; font-size: 0.8rem; }

/* --- 5. MOBILE --- */
@media (max-width: 768px) {
    .viz-top-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 15px; top: 50px; }
    .viz-actions { justify-content: flex-end; }
    
    .viz-bottom-bar { 
        width: 100%; bottom: 0; border-radius: 0; 
        flex-direction: column; align-items: stretch; gap: 15px; padding: 15px;
        background: rgba(10, 10, 10, 0.98);
    }
    .status-panel { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; text-align: center; }
    .custom-color { width: 100%; border-left: none; padding-left: 0; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); }
}