/* KICKSLAB - Centralized Authentication System Styles */

/* 1. Modal Styles */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.auth-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: #ffffff;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.auth-modal-overlay.active .auth-modal {
    transform: translateY(0);
}

.auth-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    transition: color 0.3s;
}

.auth-close-btn:hover {
    color: #000;
}

.auth-modal h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: #000;
}

.auth-modal p {
    font-family: 'Inter', sans-serif;
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    border: none;
    font-family: 'Inter', sans-serif;
}

.auth-btn-primary {
    background-color: #4285F4;
    color: #fff;
}

.auth-btn-primary:hover {
    background-color: #3367d6;
}

.auth-btn-secondary {
    background-color: #f4f4f4;
    color: #333;
    border: 1px solid #ddd;
}

.auth-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* 2. Account Dropdown Styles */
.account-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.account-dropdown {
    position: absolute;
    top: 150%;
    right: 0;
    width: 210px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1500;
    padding: 10px 0;
}

.account-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    border-left: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
}

.account-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none !important;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
    text-transform: none;
    font-weight: 500;
}

.account-dropdown li a i {
    width: 16px;
    text-align: center;
    color: #666;
}

.account-dropdown li a:hover {
    background-color: #f9f9f9;
    color: #4285F4;
}

.account-dropdown li a.logout-btn {
    border-top: 1px solid #eee;
    color: #d32f2f;
}

.account-dropdown li a.logout-btn:hover {
    background-color: #ffebee;
}

/* Mobile Account Dropdown (Bottom Sheet Style) */
@media (max-width: 767px) {
    .account-dropdown-wrapper {
        position: static; /* Let it break out of relative constraints */
    }
    .account-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 20px 0 30px 0;
        transform: translateY(110%);
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
        z-index: 9999;
    }
    .account-dropdown.active {
        transform: translateY(0);
    }
    .account-dropdown::before {
        display: none;
    }
    .account-dropdown::after {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #e0e0e0;
        border-radius: 2px;
    }
    .account-dropdown li a {
        padding: 16px 25px;
        font-size: 16px;
    }
    .account-dropdown li a i {
        font-size: 18px;
        margin-right: 10px;
    }
}

/* 3. Navbar Badge Styles */
.nav-icons a {
    position: relative;
    display: inline-flex;
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ef4444;
    /* KICKSLAB Red */
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0);
    opacity: 0;
}

.badge-count.visible {
    transform: scale(1);
    opacity: 1;
}

/* Adjust for mobile menu if needed */
.mobile-nav-links a {
    position: relative;
    display: inline-block;
}

.mobile-nav-links .badge-count {
    right: -20px;
    top: 50%;
    transform: translateY(-50%) scale(0);
}

.mobile-nav-links .badge-count.visible {
    transform: translateY(-50%) scale(1);
}

/* 4. Global Navbar & Mobile Menu Styles (Parity) */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2100;
    display: none;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 2200;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    height: auto;
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-header {
    margin-bottom: 20px;
    padding: 0;
    border: none;
    background: transparent;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
}

.mobile-nav-links li {
    margin-bottom: 5px;
}

.mobile-nav-links a {
    font-weight: 500;
    font-size: 16px;
    display: block;
    color: #1a1a1a;
    text-transform: capitalize;
    font-family: 'Inter', sans-serif;
    padding: 8px 0;
    border-bottom: none;
}

.mobile-menu-btn {
    display: none;
    font-size: 22px;
    color: #000;
    cursor: pointer;
}

.close-menu-btn {
    font-size: 20px;
    color: #000;
    background: none;
    border: none;
    cursor: pointer;
}


/* 5. Responsive Account Menu (New Side Drawer Design) */
.account-drawer-toggle-wrapper,
.account-side-drawer,
.account-drawer-overlay {
    display: none;
}

@media (max-width: 1023px) {
    /* Hide the static sidebar on account pages */
    .account-sidebar {
        display: none !important;
    }

    /* Adjust layout for single column */
    .account-layout {
        display: block !important;
    }

    /* Toggle Bar (Above Hello User) - Styled like a clean bar */
    .account-drawer-toggle-wrapper {
        display: block; /* Explicitly restored for responsive */
        margin-bottom: 25px;
        width: 100%;
        padding: 0;
    }

    .account-drawer-toggle {
        display: flex;
        align-items: center;
        width: 100% !important;
        background: #fbfbfb;
        border: 1px solid #eeeeee;
        padding: 16px 22px; /* Increased from 12x18 */
        border-radius: 8px;
        gap: 15px;
        cursor: pointer;
        transition: all 0.2s;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    }

    .account-drawer-toggle:active {
        background: #f5f5f5;
        transform: scale(0.995);
    }

    .account-drawer-toggle i {
        font-size: 18px; /* Increased from 16px */
        color: #333;
    }

    .account-drawer-toggle span {
        font-weight: 700; /* Bolder */
        font-size: 16px; /* Increased from 14px */
        color: #333;
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }

    /* 
       SIDE DRAWER 
       High z-index to stay above everything but the navbar if needed.
       Sliding from left.
    */
    .account-side-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: 290px;
        height: 100%;
        background: #ffffff;
        z-index: 5000; /* Above navbar (3500) */
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        display: flex; /* Enable on responsive */
        flex-direction: column;
        box-shadow: 10px 0 40px rgba(0,0,0,0.12);
    }

    .account-side-drawer.active {
        transform: translateX(0);
    }

    .drawer-header-premium {
        padding: 22px 25px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f8f8f8;
    }

    .drawer-header-premium h3 {
        font-size: 18px;
        font-weight: 800;
        color: #000;
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .drawer-close-premium {
        background: #f5f5f5;
        border: none;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #000;
        font-size: 15px;
        transition: background 0.2s;
    }

    .drawer-close-premium:hover {
        background: #e0e0e0;
    }

    .drawer-scroll-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px 0;
    }

    .drawer-nav-section {
        margin-bottom: 30px;
    }

    .drawer-nav-label {
        display: block;
        padding: 0 25px;
        font-size: 11px;
        font-weight: 700;
        color: #999;
        letter-spacing: 1.2px;
        margin-bottom: 12px;
        text-transform: uppercase;
    }

    .drawer-nav-links a {
        display: flex;
        align-items: center;
        padding: 15px 25px;
        gap: 15px;
        color: #444;
        font-weight: 600;
        font-size: 14px;
        text-decoration: none;
        transition: all 0.2s;
        border-left: 4px solid transparent;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .drawer-nav-links a i {
        width: 20px;
        text-align: center;
        font-size: 16px;
        color: #888;
    }

    /* Active State (Premium Green - Image 3/4 Style) */
    .drawer-nav-links a.active {
        background: #f0fdf4; /* Match image 3/4 light green */
        color: #10b981; /* Premium Emerald */
        border-left: 4px solid #10b981;
    }

    .drawer-nav-links a.active i {
        color: #10b981;
    }

    .drawer-footer-premium {
        padding: 20px 0 40px 0;
        border-top: 1px solid #f8f8f8;
    }

    .logout-link-premium {
        display: flex !important;
        align-items: center;
        padding: 15px 25px;
        gap: 15px;
        color: #ef4444; /* Red for logout */
        font-weight: 700;
        font-size: 14px;
        text-transform: uppercase;
        text-decoration: none;
    }

    /* Overlay overlay */
    .account-drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 4999;
        backdrop-filter: blur(4px);
    }

    .account-drawer-overlay.active {
        display: block; /* Shown only when active on responsive */
    }

}