/* ======================================================================
   Staff Template UI — Slim Header Nav + Hide WP chrome on staff pages
   RUN_ID: QLB-STAFF-NAV-TEMPLATE-CLEANUP-01

   @author    Qulbay Airport Services
   @copyright 2026 Qulbay.com Ltd
   @license   MIT
   ====================================================================== */

/* ======================================================================
   HIDE WORDPRESS THEME ELEMENTS ON STAFF PAGES
   ====================================================================== */

.qlb-hide-theme-header {
    margin-top: 0 !important;
}

.qlb-hide-theme-header html {
    margin-top: 0 !important;
}

.qlb-staff-template #wpadminbar {
    display: none !important;
}

.qlb-hide-theme-header #site-navigation {
    display: none !important;
}

/* Hide TT25 theme header + footer blocks — all known selector patterns */
body.qlb-hide-theme-header .wp-site-blocks > header,
body.qlb-hide-theme-header .wp-site-blocks > footer,
body.qlb-hide-theme-header .wp-site-blocks > header.wp-block-template-part,
body.qlb-hide-theme-header .wp-site-blocks > footer.wp-block-template-part,
body.qlb-hide-theme-header .wp-site-blocks > .wp-block-template-part,
body.qlb-hide-theme-header header.wp-block-template-part,
body.qlb-hide-theme-header footer.wp-block-template-part {
    display: none !important;
}

/* Remove default body top padding WP adds for admin bar */
.qlb-hide-theme-header body,
.qlb-hide-theme-header .wp-site-blocks {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Override WP CSS variables that cause gaps */
.qlb-hide-theme-header,
.qlb-hide-theme-header * {
    --wp--preset--spacing--60: 0px !important;
    --wp--preset--spacing--50: 0px !important;
    --wp--preset--spacing--40: 0px !important;
}

/* ======================================================================
   STAFF HEADER — max 150px, golden yellow SVG background
   ====================================================================== */

.qlb-staff-header {
    width: 100%;
    max-height: 150px;
    min-height: 64px;
    background-color: #F5C518; /* golden yellow fallback */
    background-image: url('../img/book-ahead-bg.svg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 100;
    overflow: hidden;
    box-sizing: border-box;
}

.qlb-staff-header__inner {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
}

/* ======================================================================
   BRAND + PAGE BADGE (left side)
   ====================================================================== */

.qlb-staff-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.qlb-staff-header__logo-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

/* Green pill badge — replaces the big H1 page heading */
.qlb-staff-header__page-badge {
    display: inline-flex;
    align-items: center;
    background: #059669;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.35);
    white-space: nowrap;
    line-height: 1.4;
}

/* ======================================================================
   NAV LINKS (right side)
   ====================================================================== */

.qlb-staff-header__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.qlb-staff-header__link {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.qlb-staff-header__link:hover {
    background: rgba(255, 255, 255, 0.85);
    color: #000000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.qlb-staff-header__link:focus {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

/* Active/current page link */
.qlb-staff-header__link--active,
.qlb-staff-header__link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.85);
    font-weight: 700;
}

/* Logout link */
.qlb-staff-header__link--logout {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.3);
    color: #b91c1c;
}

.qlb-staff-header__link--logout:hover {
    background: rgba(220, 38, 38, 0.22);
    color: #7f1d1d;
}

/* ======================================================================
   SUPPRESS WP THEME PAGE TITLE (h1) on staff pages
   The badge in the header replaces it — hide the theme-rendered title
   ====================================================================== */

.qlb-hide-theme-header .entry-title,
.qlb-hide-theme-header .wp-block-post-title,
.qlb-hide-theme-header h1.page-title {
    display: none !important;
}

/* ======================================================================
   PAGE CONTENT OFFSET (so content starts below our header)
   ====================================================================== */

.qlb-hide-theme-header .wp-site-blocks > main,
.qlb-hide-theme-header .wp-site-blocks > .wp-block-group:not(:first-child) {
    padding-top: 24px;
}

/* ======================================================================
   LEGACY — keep .qlb-staff-footer-nav visible if still rendered
   ====================================================================== */

.qlb-staff-footer-nav {
    display: none;
}

/* ======================================================================
   RESPONSIVE
   ====================================================================== */

@media (max-width: 900px) {
    .qlb-staff-header__inner {
        padding: 0 16px;
        gap: 12px;
    }

    .qlb-staff-header__link {
        font-size: 12px;
        padding: 5px 10px;
    }

    .qlb-staff-header__logo-text {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .qlb-staff-header {
        max-height: none;
    }

    .qlb-staff-header__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        gap: 10px;
    }

    .qlb-staff-header__nav {
        flex-wrap: wrap;
        gap: 6px;
    }

    .qlb-staff-header__link {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* ======================================================================
   ACCESSIBILITY
   ====================================================================== */

.qlb-staff-header__link:active {
    position: relative;
    top: 1px;
}

.qlb-staff-header * {
    box-sizing: border-box;
}
