/* assets/css/header.css - Premium Solid Full-Width Header styling */

.kt-wrapper-header-offset {
    padding-top: 102px !important; /* 70px header height + 32px spacing */
}

#header {
    position: fixed;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    z-index: 9999 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode compatibility */
.dark #header {
    background: #121214;
    border-bottom: 1px solid #27272a;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

/* Sticky state */
#header.header-sticky {
    height: 64px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dark #header.header-sticky {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Centered Header Content Container */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 48px; /* Equivalent to px-12 */
}

@media (max-width: 1024px) {
    .header-container {
        padding: 0 24px; /* Equivalent to px-6 */
    }
}

/* Centered Navigation Menu */
.header-nav-menu {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 32px; /* Set layout spacing to 32px */
    margin: 0 auto;
    font-weight: 700;
    font-size: 0.8125rem; /* Equivalent to text-sm */
    letter-spacing: 0.05em;
}

@media (min-width: 1024px) {
    .header-nav-menu {
        display: flex;
    }
}

/* Logo styling */
.header-logo {
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
}
.header-logo img {
    height: 34px !important; /* Proper logo scale */
}
.header-logo:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

/* Premium Navigation Links */
.nav-menu-link {
    position: relative;
    color: hsl(var(--foreground));
    font-weight: 600; /* Font weight 600 */
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    padding: 0.6rem 0;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-menu-link:hover {
    color: hsl(var(--primary));
}

/* Hover underline animation */
.nav-menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: hsl(var(--primary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Active navigation link */
.nav-menu-link.active-link {
    color: hsl(var(--primary));
}
.nav-menu-link.active-link::after {
    transform: scaleX(1);
}

/* Dropdown styling */
.nav-dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .nav-dropdown-menu,
.relative:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* User profile triggers & dropdowns */
.user-balance-badge {
    background: rgba(59, 130, 246, 0.1);
    color: hsl(var(--primary));
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.775rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.user-balance-badge:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

/* Login button redesign */
.btn-login-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1.5px solid rgba(229, 231, 235, 0.8);
    color: hsl(var(--foreground));
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.dark .btn-login-modern {
    border-color: rgba(63, 63, 70, 0.6);
}

@media (hover: hover) {
    .btn-login-modern:hover {
        background-color: color-mix(in srgb, var(--primary, #3b82f6) 12%, transparent) !important;
        border-color: color-mix(in srgb, var(--primary, #3b82f6) 30%, transparent) !important;
        color: var(--primary, #3b82f6) !important;
        box-shadow: none !important;
        transform: translateY(-1px);
    }
}

/* Avatar Border and Glow */
.user-avatar-container {
    position: relative;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, rgba(59, 130, 246, 0.3) 100%);
    transition: transform 0.2s ease;
}

.user-avatar-container:hover {
    transform: scale(1.05);
}

/* Premium Search Box */
.header-search-input {
    border: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(243, 244, 246, 0.8);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .header-search-input {
    border-color: rgba(63, 63, 70, 0.6);
    background: rgba(39, 39, 42, 0.8);
}

.header-search-input:focus {
    background: #ffffff;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    width: 220px !important;
}

.dark .header-search-input:focus {
    background: rgba(24, 24, 27, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Mobile Sidebar enhancements */
.mobile-sidebar-drawer {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Premium User Profile Dropdown Card */
.profile-dropdown-card {
    background-color: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    width: 250px;
    padding: 16px;
    animation: dropdownFadeIn 0.2s ease-out;
}

.dark .profile-dropdown-card {
    background-color: #151521;
    border: 1px solid #27272a;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* User Balance Box inside Profile Dropdown */
.profile-balance-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 10px 14px;
    text-align: left;
}

.dark .profile-balance-box {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Menu Items inside Profile Dropdown */
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8125rem; /* text-xs */
    font-weight: 600;
    color: #475569;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out;
    text-align: left;
}

.dark .profile-menu-item {
    color: #a1a1aa;
}

.profile-menu-item:hover {
    background: #e0f2fe;
    color: #0284c7;
}

.dark .profile-menu-item:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.profile-menu-icon {
    font-size: 1.125rem;
    color: #64748b;
    transition: color 0.15s ease-in-out;
}

.dark .profile-menu-icon {
    color: #71717a;
}

.profile-menu-item:hover .profile-menu-icon {
    color: #0284c7;
}

.dark .profile-menu-item:hover .profile-menu-icon {
    color: #3b82f6;
}

/* Danger Item override */
.profile-menu-item-danger:hover {
    background: #fee2e2;
    color: #ef4444;
}

.dark .profile-menu-item-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.profile-menu-item-danger:hover .profile-menu-icon {
    color: #ef4444;
}
