/**
 * Final Layout Lock
 * Prevents ALL layout shifts from login, modals, and dynamic content
 */

/* Lock body padding regardless of state */
body {
    padding-top: 60px !important; /* Base for navbar */
    transition: none !important; /* No transitions */
    margin: 0 !important;
}

/* When happy hour exists, adjust padding */
body.has-happy-hour {
    padding-top: 100px !important; /* Navbar + happy hour */
}

/* Override ALL state-based padding changes */
body.has-banner,
body.logged-in,
body.logged-in.has-banner,
body.modal-open,
body.logged-in.modal-open,
body.guest,
body.authenticated {
    /* Keep same padding as base */
    padding-top: 60px !important;
}

body.has-happy-hour.has-banner,
body.has-happy-hour.logged-in,
body.has-happy-hour.modal-open {
    padding-top: 100px !important;
}

/* Prevent modal-open from adding padding-right */
body.modal-open {
    padding-right: 0 !important;
    overflow-y: auto !important; /* Keep scrollbar to prevent shift */
}

/* Fixed navbar */
.compact-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 60px !important;
    z-index: 999990 !important;
}

/* Fixed happy hour below navbar */
.funky-happy-hour {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    height: 40px !important;
    z-index: 999989 !important;
}

/* Banner flows in document - no padding, with top margin for spacing */
.stable-banner-wrapper {
    position: relative !important;
    width: 100%;
    margin: 10px 0 0 0 !important; /* Top margin only, no bottom margin */
    padding: 0 !important; /* No padding */
    background: transparent !important; /* Remove gradient background */
    height: 200px !important; /* Fixed height to prevent gap */
    overflow: hidden !important;
}

/* Ensure same height for all auth states */
.logged-in .stable-banner-wrapper,
.logged-out .stable-banner-wrapper,
body.logged-in .stable-banner-wrapper {
    height: 200px !important; /* Keep consistent height */
    margin: 10px 0 0 0 !important;
}

.stable-banner-container {
    width: 100%;
    height: 100% !important; /* Take full wrapper height */
    position: relative;
    background: #1a1a2e;
    border-radius: 0 !important; /* No rounded corners for full width */
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin: 0 !important;
}

/* Remove gaps between elements */
.stable-banner-wrapper + *,
.container-fluid,
main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Bonus modal should not affect layout */
.bonus-modal-overlay {
    position: fixed !important;
    z-index: 1050 !important;
}

/* Phone auth modal */
#phoneAuthModal {
    position: fixed !important;
    z-index: 1050 !important;
}

/* Force override inline styles */
body[style*="padding-top"]:not(.has-happy-hour) {
    padding-top: 60px !important;
}

body[style*="padding-top"].has-happy-hour {
    padding-top: 100px !important;
}

/* Prevent overflow changes from affecting layout */
body[style*="overflow"] {
    overflow-y: auto !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    body {
        padding-top: 60px !important;
    }

    body.has-happy-hour {
        padding-top: 90px !important;
    }

    .funky-happy-hour {
        height: 30px !important;
    }

    .stable-banner-wrapper {
        padding: 0 !important;
        margin: 8px 0 0 0 !important; /* Smaller margin on mobile */
        height: 150px !important; /* Fixed height on mobile */
    }

    .logged-in .stable-banner-wrapper,
    .logged-out .stable-banner-wrapper,
    body.logged-in .stable-banner-wrapper {
        height: 150px !important; /* Keep consistent height on mobile */
        margin: 8px 0 0 0 !important;
    }

    .stable-banner-container {
        height: 100% !important; /* Full wrapper height */
    }
}

/* High specificity overrides */
html body {
    padding-top: 60px !important;
}

html body.has-happy-hour {
    padding-top: 100px !important;
}