/**
 * Login Layout Fix
 * Prevents huge gap after login between banner and compact menu
 */

/* Override the dynamic padding changes completely */
body {
    padding-top: 60px !important; /* Only navbar height, no extra padding */
    transition: none !important;
}

/* Remove the has-banner class effect that causes the gap */
body.has-banner {
    padding-top: 60px !important; /* Keep same as normal, no change */
}

/* Remove logged-in class layout changes */
body.logged-in {
    padding-top: 60px !important; /* Same padding regardless of auth state */
}

/* Combination states should also not change */
body.logged-in.has-banner {
    padding-top: 60px !important; /* No extra padding */
}

/* Fix the top-banner positioning that causes issues */
.top-banner {
    display: none !important; /* Hide any top-banner elements */
}

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

/* Banner wrapper should flow normally without gaps */
.stable-banner-wrapper {
    margin-top: 0 !important;
    position: relative !important;
    width: 100%;
    height: 280px;
    min-height: 280px;
    padding: 15px;
}

/* Prevent any JavaScript from changing body padding */
body[style*="padding-top"] {
    padding-top: 60px !important;
}

/* Ensure no margin gaps between elements */
.compact-nav + * {
    margin-top: 0 !important;
}

.stable-banner-wrapper + * {
    margin-top: 0 !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    body,
    body.has-banner,
    body.logged-in,
    body.logged-in.has-banner {
        padding-top: 60px !important;
    }

    .stable-banner-wrapper {
        height: 200px;
        min-height: 200px;
    }
}

/* Force override any inline styles or late-loading CSS */
html body {
    padding-top: 60px !important;
}

html body.modal-open {
    padding-top: 60px !important;
}

/* Prevent content jump when modal opens */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}

/* Ensure consistent layout for all auth states - DISABLED (handled in final-layout-lock.css) */
/*
.logged-in .stable-banner-wrapper,
.logged-out .stable-banner-wrapper,
.guest .stable-banner-wrapper {
    margin-top: 0 !important;
    height: 280px !important;
}
*/