/* frontend styles */

/* Dark mode variables */
[data-theme="dark"] {
    --primary-gold: #F4D03F;
    --secondary-gold: #F7DC6F;
    --light-gold: #FCF3CF;
    --text-dark: #F8F9FA;
    --text-medium: #E5E5E5;
    --bg-cream: #1a1a1a;
    --shadow-light: rgba(244, 208, 63, 0.1);
    --shadow-medium: rgba(244, 208, 63, 0.3);
    --border-light: rgba(244, 208, 63, 0.2);
}

/* Theme toggle button styles */
.theme-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-light);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 2px;
    flex-shrink: 0;
}

.theme-toggle::before {
    content: '\f185'; /* FontAwesome sun icon */
font-family: "Font Awesome 6 Free";
font-weight: 900;
    position: absolute;
    left: 4px;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.theme-toggle::after {
    content: '\f186'; /* FontAwesome moon icon */
font-family: "Font Awesome 6 Free";
font-weight: 900;
    position: absolute;
    right: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .theme-toggle::before {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle::after {
    opacity: 1;
}

.theme-toggle-slider {
    width: 18px;
    height: 18px;
    background: var(--primary-gold);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(20px);
}

/* Full width navbar styling - matching Payhawk design */
header {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--bg-cream);
    transition: background-color 0.3s ease;
}

header .navbar-container {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px var(--shadow-medium) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
    padding: 1rem 2rem !important;
    min-height: 70px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
}

[data-theme="dark"] header .navbar-container {
    background: rgba(26, 26, 26, 0.95) !important;
    border-bottom: 1px solid rgba(244, 208, 63, 0.15) !important;
}

header .navbar-inner {
    max-width: 1400px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

/* Logo styling */
header .w-28 {
    width: 155px !important;
}

header .w-28 img {
    max-height: 50px !important;
    width: auto !important;
}

/* FIXED - Remove space-between and control spacing */
header .lg\:flex {
    justify-content: flex-start !important;
    gap: 1.5rem !important;
}

/* Navigation links styling */
header nav a {
    color: #444 !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

[data-theme="dark"] header nav a {
    color: var(--text-dark) !important;
}

header nav a:hover {
    color: var(--primary-gold) !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

/* Language dropdown button */
header .dropdownbtn {
    color: #444 !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

[data-theme="dark"] header .dropdownbtn {
    color: var(--text-dark) !important;
}

header .dropdownbtn:hover {
    color: var(--primary-gold) !important;
}

/* Dropdown content */
header .dropdown-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 4px 15px var(--shadow-light) !important;
}

[data-theme="dark"] header .dropdown-content {
    background: rgba(26, 26, 26, 0.95) !important;
}

header .dropdown-content li:hover {
    background: var(--shadow-light) !important;
}

header .dropdown-content a:hover {
    color: var(--primary-gold) !important;
}

/* Dashboard/Login button - FIXED spacing */
header .bg-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%) !important;
    color: white !important;
    padding: 0.875rem 2rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25) !important;
    min-width: 140px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    margin: 0 0 0 1rem !important;
}

header .bg-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.35) !important;
}

/* Mobile hamburger button */
header #open-sidebar {
    background: var(--primary-gold) !important;
    color: white !important;
    padding: 0.75rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

header #open-sidebar:hover {
    background: var(--secondary-gold) !important;
    transform: translateY(-1px) !important;
}

/* Hamburger lines styling */
header .hamburger {
    width: 20px !important;
    height: 2px !important;
    background: white !important;
    margin: 3px 0 !important;
    transition: 0.3s !important;
    border-radius: 2px !important;
    display: block !important;
}

/* Mobile sidebar styling */
.sidebar-content {
    background: linear-gradient(135deg, var(--bg-cream) 0%, #f5f2ed 100%) !important;
    box-shadow: -4px 0 15px var(--shadow-medium) !important;
    width: 320px !important;
    position: fixed !important;
    right: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease !important;
    z-index: 1000 !important;
}

[data-theme="dark"] .sidebar-content {
    background: linear-gradient(135deg, var(--bg-cream) 0%, #2c2c2c 100%) !important;
}

.sidebar-open .sidebar-content {
    transform: translateX(0) !important;
}

.sidebar-header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border-light) !important;
    padding: 1.5rem !important;
    backdrop-filter: blur(10px) !important;
}

[data-theme="dark"] .sidebar-header {
    background: rgba(26, 26, 26, 0.95) !important;
}

.logo-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.logo-link {
    width: 80px !important;
}

.close-btn {
    background: var(--primary-gold) !important;
    color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.close-btn:hover {
    background: var(--secondary-gold) !important;
    transform: rotate(90deg) !important;
}

.mobile-nav-content {
    padding: 0.75rem !important;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 110px) !important;
    overflow-y: auto;
    min-height: 0 !important;
}

.mobile-nav-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1rem 0 !important;
    flex: 0 0 auto !important;
}

.mobile-nav-links li {
    margin-bottom: 0.75rem !important;
}

.mobile-nav-links a {
    display: flex !important;
    align-items: center !important;
    padding: 1rem !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
}

.mobile-nav-links a:hover {
    background: var(--shadow-light) !important;
    color: var(--primary-gold) !important;
    transform: translateX(5px) !important;
}

.mobile-dropdown {
    margin-bottom: 1rem !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    flex: 0 0 auto !important;
}

[data-theme="dark"] .mobile-dropdown {
    background: rgba(26, 26, 26, 0.95) !important;
}

.mobile-dropdown .dropdownbtn {
    width: 100% !important;
    padding: 1rem !important;
    background: none !important;
    border: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.mobile-dropdown .dropdownbtn:hover {
    color: var(--primary-gold) !important;
}

.mobile-dropdown .dropdown-content {
    border-top: 1px solid var(--border-light) !important;
    padding: 0.5rem 0 !important;
    background: none !important;
    box-shadow: none !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
}

.mobile-dropdown .dropdown-content li {
    margin: 0 !important;
}

.mobile-dropdown .dropdown-content a {
    padding: 0.75rem 1rem !important;
    margin: 0 !important;
    transform: none !important;
}

.mobile-action-btn {
    display: block !important;
    text-align: center !important;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%) !important;
    color: white !important;
    padding: 0.875rem 1rem !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 12px var(--shadow-medium) !important;
    margin: 1rem 0 0 0 !important;
    flex-shrink: 0 !important;
    max-width: calc(100% - 1rem) !important;
    width: calc(100% - 1rem) !important;
}

.mobile-action-btn:hover {
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4) !important;
}

/* Ensure mobile nav content uses available space properly */
.mobile-nav-links {
    flex: 0 0 auto;
    margin-bottom: 1rem !important;
}

.mobile-dropdown {
    flex: 0 0 auto;
    margin-bottom: 1rem !important;
}

/* Theme controls container */
.theme-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    max-width: 100%;
    box-sizing: border-box;
}

[data-theme="dark"] .theme-controls {
    background: rgba(0, 0, 0, 0.1);
}

.theme-controls span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Responsive fixes */
@media (min-width: 1024px) and (max-width: 1280px) {
    header nav a {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    header .dropdownbtn {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    header .bg-primary {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
        min-width: 120px !important;
    }
}

@media (max-width: 768px) {
    header .navbar-container {
        padding: 1rem 1.5rem !important;
    }
    
    .sidebar-content {
        width: 280px !important;
    }
    
    .mobile-nav-content {
        height: calc(100vh - 110px) !important;
        padding: 0.75rem !important;
    }
    
    .mobile-action-btn {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
        margin: 0.75rem 0 0.25rem 0 !important;
    }
    
    .mobile-nav-links {
        margin-bottom: 0.5rem !important;
        max-height: none !important;
    }
    
    .theme-controls {
        padding: 0.5rem 2rem !important;
    }
}

@media (max-width: 480px) {
    .sidebar-content {
        width: 100vw !important;
    }
    
    header .w-28 {
        width: 100px !important;
    }
    
    header .navbar-container {
        padding: 0.75rem 1rem !important;
    }
    
    .mobile-nav-content {
        height: calc(100vh - 140px) !important;
        padding: 0.75rem !important;
    }
    
    .mobile-action-btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        border-radius: 16px !important;
        margin-bottom: 2rem !important;
    }
}

/* Ensure content starts after navbar */
.main {
    margin-top: 0 !important;
    padding-top: 1rem !important;
    background: var(--bg-cream);
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* Global dark mode styles */
body {
    background: var(--bg-cream);
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}