/* ========================================================= */
/* === FILE: /assets/jz-mobile/css/jz-widget-1.css       === */
/* === STATUS: v8 - FIXED (Layer 3 Sliding Logic Added)  === */
/* ========================================================= */

:root {
    /* --- BRAT TWEAK: Global Colors & Dimensions --- */
    --mob-glass-bg: rgba(15, 23, 42, 0.95);  
    --mob-border: rgba(255, 255, 255, 0.1);  
    --mob-text: #ffffff;                     
    --mob-accent: #f59e0b;                   
    --mob-height: 60px;                      
    --mob-icon-size: 1.3rem;                 
}


/* ========================================================= */
/* 1. VISIBILITY CONTROLLER (The Switch)                 */
/* ========================================================= */

/* Default State: Desktop Visible, Mobile Hidden */
.desktop-view-only { display: block; }
.mobile-view-only  { display: none; }

/* The Switch: 1280px Cutoff */
@media screen and (max-width: 1280px) {
    .desktop-view-only { display: none !important; }
    .mobile-view-only  { display: block !important; }
}


/* ========================================================= */
/* 2. DESKTOP LAYOUT (The Alignment Fix)                 */
/* ========================================================= */
.enhanced-navbar {
    width: 100%;
    height: var(--mob-height);
    background: transparent;
    border-bottom: 1px solid var(--mob-border);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 5000;
}

/* SCOPED FIX: Only affects the constraint INSIDE the navbar */
.enhanced-navbar .constraint-1400 {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    
    /* FLEXBOX MAGIC: Pushes content to the RIGHT */
    display: flex;
    justify-content: flex-end !important; 
    align-items: center;
}

.desktop-right-controls {
    display: flex;
    align-items: center;
    gap: 30px; /* Spacing between icons */
}

/* Desktop Icon Style */
.desktop-icon-btn {
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #cbd5e1;
    position: relative;
    transition: all 0.2s ease;
}

.desktop-icon-btn:hover {
    color: var(--mob-accent);
}

/* Desktop Dropdowns */
.desktop-dropdown-list {
    position: absolute;
    top: 150%;
    right: 0;
    background: rgba(20, 20, 25, 0.98);
    border: 1px solid var(--mob-border);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 6000;
}

/* Show dropdown on hover */
.desktop-icon-btn:hover .desktop-dropdown-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ========================================================= */
/* 3. MOBILE LAYOUT (Symmetry Logic)                     */
/* ========================================================= */

.mobile-navbar {
    position: fixed; top: 0; left: 0;
    width: 100%; height: var(--mob-height);
    background: var(--mob-glass-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--mob-border);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
}

.mobile-constraint {
    width: 95%; height: 100%;
    display: flex; justify-content: space-between; align-items: center;
    position: relative; 
}

/* Groups */
.mobile-left-controls { display: flex; align-items: center; gap: 15px; z-index: 20; }
.mobile-right-controls { display: flex; align-items: center; gap: 15px; z-index: 20; }

/* Center Logo */
.mobile-logo-container {
    position: absolute; left: 50%; transform: translateX(-50%);
    z-index: 10; pointer-events: none;
}
.logo-text-pulse {
    font-family: sans-serif; font-size: 1.3rem; font-weight: 900; letter-spacing: 1px;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000);
    background-size: 400% auto;
    color: transparent; -webkit-text-fill-color: transparent; background-clip: text;
    animation: rgbMobileFlow 8s linear infinite;
}
@keyframes rgbMobileFlow { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

/* Mobile Icons */
.mobile-icon-btn {
    font-size: var(--mob-icon-size); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    width: 35px; height: 35px; color: #e2e8f0;
    -webkit-tap-highlight-color: transparent;
}
.mobile-burger-btn {
    width: 30px; height: 30px; display: flex; flex-direction: column; 
    justify-content: center; gap: 5px; cursor: pointer;
}
.burger-line {
    width: 24px; height: 2px; background-color: var(--mob-text); border-radius: 2px;
}

/* Mobile Dropdowns */
.mobile-dropdown-list {
    position: absolute; top: 140%; right: -5px;
    background: rgba(20, 20, 25, 0.98); border: 1px solid var(--mob-border);
    border-radius: 8px; padding: 8px 0; min-width: 160px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.2s ease; z-index: 10001;
}
.mobile-dropdown-list.active { opacity: 1; visibility: visible; transform: translateY(0); }

.mob-dropdown-item {
    padding: 12px 15px; font-size: 0.9rem; color: #ccc; cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 10px;
}
.mob-dropdown-item:hover { background: rgba(255,255,255,0.1); color: #fff; }


/* ========================================================= */
/* 4. SLIDING MENU OVERLAY                               */
/* ========================================================= */
.mobile-menu-overlay {
    position: fixed; top: var(--mob-height); left: 0;
    width: 100%; height: calc(100vh - var(--mob-height));
    background: #0f172a; z-index: 9998;
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden; display: flex; flex-direction: column;
}
.mobile-menu-overlay.is-open { transform: translateX(0); }

.menu-header {
    padding: 20px 25px; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05); height: 80px; flex-shrink: 0;
}
.greeting-main { font-size: 1.2rem; font-weight: 800; color: #fff; }
.menu-close-btn {
    width: 35px; height: 35px; background: rgba(255,255,255,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff;
}

.menu-layers-container { position: relative; width: 100%; flex-grow: 1; overflow: hidden; }

/* BASE LAYER STYLE */
.menu-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    padding: 10px 15px 50px 15px; overflow-y: auto; transition: transform 0.3s ease-in-out;
    background: #0f172a;
}

/* --- THE CRITICAL FIX: 3-STAGE SLIDING LOGIC --- */

/* 1. VIEW: ROOT (Active: Layer 1) */
.view-root #menuLayer1 { transform: translateX(0); }
.view-root #menuLayer2 { transform: translateX(100%); }      /* Right */
.view-root #menuLayer3 { transform: translateX(200%); }      /* Far Right */

/* 2. VIEW: CATEGORIES (Active: Layer 2) */
.view-cats #menuLayer1 { transform: translateX(-100%); }     /* Left */
.view-cats #menuLayer2 { transform: translateX(0); }         /* Active */
.view-cats #menuLayer3 { transform: translateX(100%); }      /* Right */

/* 3. VIEW: TOOLS LIST (Active: Layer 3) */
.view-tools #menuLayer1 { transform: translateX(-200%); }    /* Far Left */
.view-tools #menuLayer2 { transform: translateX(-100%); }    /* Left */
.view-tools #menuLayer3 { transform: translateX(0); }        /* Active */

/* ----------------------------------------------- */

.menu-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 15px; border-radius: 12px; text-decoration: none; color: #e2e8f0;
    font-size: 1rem; margin-bottom: 5px;
}
.menu-item:active { background: rgba(255,255,255,0.08); }
.menu-icon { font-size: 1.2rem; width: 25px; text-align: center; margin-right: 15px; }
.menu-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 10px 15px; }

/* Special styling for category titles */
.layer-title {
    padding: 10px 15px 20px 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mob-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 10px;
}