/* CSS Variables for consistent spacing */
:root {
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* Header wrapper to prevent overflow */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 180px; /* Increased to show full header with shadows */
    overflow: hidden;
    pointer-events: none;
    z-index: 1000;
}

/* Global Decorative Header */
.global-header {
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    background: linear-gradient(135deg,
        rgba(15, 26, 46, 0.98) 0%,
        rgba(26, 41, 66, 0.96) 55%,
        rgba(34, 50, 77, 0.94) 100%);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 1.5rem 3rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.global-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(245, 184, 0, 0.18) 0%,
        rgba(245, 184, 0, 0.06) 22%,
        rgba(90, 176, 255, 0.12) 72%,
        rgba(90, 176, 255, 0.04) 100%);
    pointer-events: none;
}

.global-header > * {
    position: relative;
    z-index: 1;
}

/* Page wrapper to contain all content below header */
body.has-header .page-wrapper {
    padding-top: 0; /* Content starts at top */
    margin-top: 13px; /* Set to +13px */
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%; /* Prevent any overflow */
    display: flex;
    flex-direction: column;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    margin-left: 0;
    flex-shrink: 0;
    pointer-events: auto; /* Ensure header content is interactive */
}

.header-wordmark {
    color: var(--accent-gold);
    font-family: 'Big Bill', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.header-title {
    font-family: 'Big Bill', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    line-height: 1;
    margin: 0 0 0 0.125rem;
    font-weight: normal;
    text-shadow: none;
}

.btn-logout {
    background-color: var(--action-secondary-bg);
    color: var(--text-secondary);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Stainless', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    pointer-events: auto; /* Ensure logout button is clickable */
    border: none; /* Remove default button border */
    cursor: pointer; /* Show pointer cursor */
}

.btn-logout:hover {
    background-color: var(--action-secondary-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-wrapper {
        height: 140px; /* Adjusted height for mobile to show full header */
    }
    
    .global-header {
        top: 20px;
        left: 20px;
        right: 20px;
        padding: 1rem 1.5rem;
    }
    
    
    .btn-logout {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    .header-wordmark {
        font-size: 1.5rem;
    }
    
    .header-title {
        font-size: 1.25rem;
    }
}

/* Remove default main styling for pages with header */
body.has-header main {
    padding-top: 0;
    min-height: auto;
    flex: 1 0 auto; /* Make main element grow to fill available space */
}

/* Ensure containers are properly positioned */
body.has-header .register-container,
body.has-header .login-container,
body.has-header .verify-container,
body.has-header .setup-container {
    margin-top: 0;
}

/* Footer Styles */
.site-footer {
    font-family: 'Stainless', sans-serif;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto; /* Push footer to bottom */
    /* margin-left handled by responsive-layout.css */
    color: #808080; /* Medium gray */
    flex-shrink: 0; /* Prevent footer from shrinking */
}

.footer-help {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-help a {
    color: var(--brand-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-help a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #808080;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--brand-gold);
    text-decoration: none;
}

.footer-separator {
    color: #666666;
    margin: 0 1rem;
}

.footer-copyright {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive footer */
@media (max-width: 768px) {
    /* Footer margin-left now handled by responsive-layout.css */
    
    .footer-help {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
        padding: 0 1rem;
        line-height: 1.6;
    }
    
    .footer-help a {
        display: inline-block;
        white-space: nowrap;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-separator {
        display: none;
    }
    
    .footer-copyright {
        font-size: 0.7rem;
        padding: 0 1rem;
    }
}

/* Navigation Buttons */
.nav-buttons {
    position: absolute;
    left: 103px; /* Moved 3px more to the right from 100px */
    top: 0px; /* Moved to top of page-wrapper */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999; /* Maximum z-index to ensure it's above everything */
    /* Add min-width to ensure content knows how much space nav takes */
    min-width: 200px;
    pointer-events: auto !important; /* Force buttons to be clickable */
}

.nav-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    transition: all var(--transition-fast);
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
    pointer-events: auto !important; /* Ensure individual buttons are clickable */
    z-index: 9999; /* Match parent z-index */
}

.nav-button:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 200px; /* Approximate width to end of "Requests" text */
    height: 2px;
    background-color: white;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.nav-button i {
    font-size: 48px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    -webkit-text-stroke: 2px white;
    paint-order: stroke fill;
}

.nav-label {
    font-size: 1.44rem; /* 80% of 1.8rem */
    font-family: 'Stainless', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-button:hover {
    transform: translateX(5px);
    color: var(--brand-gold);
    text-decoration: none;
}

.nav-button:hover i,
.nav-button:hover .nav-label {
    color: var(--brand-gold);
}

/* Add intermediate breakpoint for tablets */
@media (max-width: 1024px) {
    .nav-buttons {
        left: 90px;
        top: 190px; /* Keep same as desktop since header doesn't change */
        gap: 0.75rem;
    }
    
    .nav-button i {
        font-size: 42px;
    }
    
    .nav-label {
        font-size: 1.35rem;
    }
}

/* Responsive adjustments for nav buttons */
@media (max-width: 768px) {
    .nav-buttons {
        left: 10px; /* Move closer to edge on mobile */
        top: 325px; /* Moved down 75px more (325px total) */
        gap: 0.5rem;
    }
    
    .nav-button {
        padding: 0.4rem 0;
        gap: 0.5rem; /* Reduce gap between icon and label */
    }
    
    .nav-button i {
        font-size: 36px; /* Smaller icons on mobile */
        -webkit-text-stroke: 1.5px white; /* Thinner stroke */
    }
    
    .nav-label {
        font-size: 1.1rem; /* Smaller text on mobile */
    }
    
    /* Hide the white separator lines on mobile to save space */
    .nav-button:not(:last-child)::after {
        display: none;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .nav-buttons {
        /* Show only icons on very small screens */
        left: 5px;
    }
    
    .nav-label {
        display: none; /* Hide labels on very small screens */
    }
    
    .nav-button {
        justify-content: center;
        width: 60px;
    }
}