/**
 * B2C Site Header — Flighta navbar (Figma "The filghta", 1440 frame)
 * Isolated from legacy new_style.css via #header.b2c-header
 */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap");

#header.b2c-header {
    --hdr-brand: #531724;
    --hdr-brand-dark: #3d101b;
    --hdr-brand-soft: rgba(83, 21, 36, 0.08);
    --hdr-register-bg: #FDF0E8;
    --hdr-register-text: #531524;
    --hdr-text: #000000;
    --hdr-muted: #64748b;
    --hdr-border: #EEEEEE;
    --hdr-height: 66px;
    --hdr-font: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;

    position: sticky;
    top: 0;
    z-index: 1100;
    font-family: var(--hdr-font);
    background: #FFFFFF;
    border-bottom: 1px solid var(--hdr-border);
    transition: box-shadow 0.25s ease;
}

#header.b2c-header.is-scrolled {
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

#header.b2c-header .b2c-header__shell {
    width: 100%;
}

#header.b2c-header .container {
    width: 100%;
    max-width: 1440px;
    padding-right: 64px;
    padding-left: 64px;
}

@media (max-width: 1279px) {
    #header.b2c-header .container {
        padding-right: 32px;
        padding-left: 32px;
    }
}

@media (max-width: 991px) {
    #header.b2c-header .container {
        padding-right: 16px;
        padding-left: 16px;
    }
}

#header.b2c-header .b2c-header__navbar {
    min-height: var(--hdr-height);
    align-items: center;
}

/* Logo */
#header.b2c-header .b2c-header__brand {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

#header.b2c-header .b2c-header__brand img {
    display: block;
    width: 89px;
    height: 47px;
    max-width: none;
}

/* Mobile toggler — hidden on desktop */
#header.b2c-header .b2c-header__toggler {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-right: auto;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
}

@media (min-width: 992px) {
    #header.b2c-header .b2c-header__toggler {
        display: none !important;
    }
}

#header.b2c-header .b2c-header__toggler:hover {
    background: var(--hdr-brand-soft);
}

#header.b2c-header .b2c-header__toggler span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    background: var(--hdr-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

#header.b2c-header .b2c-header__toggler.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(-45deg);
}

#header.b2c-header .b2c-header__toggler.is-open span:nth-child(2) {
    opacity: 0;
}

#header.b2c-header .b2c-header__toggler.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(45deg);
}

/* Menu layout */
#header.b2c-header .b2c-header__menu {
    align-items: center;
}

@media (min-width: 992px) {
    #header.b2c-header .b2c-header__menu {
        flex-grow: 1;
    }
}

/* Nav links — left-aligned after the logo (design: 101px from logo, 24px apart) */
#header.b2c-header .b2c-header__links {
    gap: 2px;
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) {
    #header.b2c-header .b2c-header__links {
        gap: 24px;
        margin-right: 40px;
    }
}

@media (min-width: 1280px) {
    #header.b2c-header .b2c-header__links {
        margin-right: 101px;
    }
}

#header.b2c-header .b2c-header__links .nav-item {
    margin: 0;
}

#header.b2c-header .b2c-header__link {
    position: relative;
    padding: 0 !important;
    font-family: var(--hdr-font);
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    letter-spacing: 0;
    color: var(--hdr-text) !important;
    transition: color 0.15s ease;
    white-space: nowrap;
}

#header.b2c-header .b2c-header__link:hover,
#header.b2c-header .b2c-header__link:focus {
    color: var(--hdr-brand) !important;
    background: transparent !important;
}

/* Actions — flag + Eng, Register, Sign in */
#header.b2c-header .b2c-header__actions {
    gap: 8px;
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) {
    #header.b2c-header .b2c-header__actions {
        margin-right: auto;
    }
}

#header.b2c-header .b2c-header__actions .nav-item {
    display: flex;
    align-items: center;
    margin: 0;
}

#header.b2c-header .b2c-header__lang {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 0 !important;
    margin-left: 3px;
    font-family: var(--hdr-font);
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    color: var(--hdr-text) !important;
    transition: color 0.15s;
}

#header.b2c-header .b2c-header__flag {
    display: block;
    width: 29px;
    height: 20.5px;
    max-width: none;
}

#header.b2c-header .b2c-header__lang:hover {
    color: var(--hdr-brand) !important;
    background: transparent !important;
}

#header.b2c-header .b2c-header__register {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 101px;
    height: 34px;
    padding: 0 16px !important;
    font-family: var(--hdr-font);
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 20px !important;
    color: var(--hdr-register-text) !important;
    background: var(--hdr-register-bg) !important;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.15s ease;
}

#header.b2c-header .b2c-header__register:hover,
#header.b2c-header .b2c-header__register:focus {
    color: var(--hdr-register-text) !important;
    background: #FAE2D4 !important;
}

#header.b2c-header .b2c-header__signin {
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--hdr-text) !important;
    border-radius: 10px;
    transition: color 0.15s, background 0.15s;
}

#header.b2c-header .b2c-header__signin:hover {
    color: var(--hdr-brand) !important;
    background: var(--hdr-brand-soft) !important;
}

#header.b2c-header .b2c-header__cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    height: 34px;
    padding: 0 16px !important;
    font-family: var(--hdr-font);
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 20px !important;
    color: #fff !important;
    background: var(--hdr-brand) !important;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.15s ease;
}

#header.b2c-header .b2c-header__cta:hover,
#header.b2c-header .b2c-header__cta:focus {
    color: #fff !important;
    background: var(--hdr-brand-dark) !important;
}

/* User profile */
#header.b2c-header .b2c-header__profile {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 4px 14px !important;
    border: 1px solid var(--hdr-border);
    border-radius: 999px;
    background: #fff !important;
    color: var(--hdr-text) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#header.b2c-header .b2c-header__profile:hover,
#header.b2c-header .b2c-header__profile:focus {
    border-color: rgba(83, 21, 36, 0.25);
    box-shadow: 0 0 0 3px var(--hdr-brand-soft);
    outline: none;
    color: var(--hdr-text) !important;
    text-decoration: none;
}

#header.b2c-header .b2c-header__profile.dropdown-toggle::after {
    margin-right: 2px;
    border-top-color: var(--hdr-muted);
}

#header.b2c-header .b2c-header__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(-145deg, var(--hdr-brand) 0%, #7a2127 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#header.b2c-header .b2c-header__avatar--lg {
    width: 42px;
    height: 42px;
    font-size: 16px;
}

#header.b2c-header .b2c-header__name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#header.b2c-header .b2c-header__dropdown {
    min-width: 240px;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid var(--hdr-border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

#header.b2c-header .b2c-header__dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 4px;
}

#header.b2c-header .b2c-header__dropdown-head strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hdr-text);
    line-height: 1.3;
}

#header.b2c-header .b2c-header__dropdown-head small {
    display: block;
    font-size: 12px;
    color: var(--hdr-muted);
}

#header.b2c-header .b2c-header__dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    border-radius: 8px;
}

#header.b2c-header .b2c-header__dropdown .dropdown-item i {
    width: 16px;
    color: var(--hdr-muted);
    font-size: 14px;
}

#header.b2c-header .b2c-header__dropdown .dropdown-item:hover {
    background: var(--hdr-brand-soft);
    color: var(--hdr-brand);
}

#header.b2c-header .b2c-header__dropdown .dropdown-item:hover i {
    color: var(--hdr-brand);
}

#header.b2c-header .b2c-header__dropdown .dropdown-item.text-danger:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626 !important;
}

#header.b2c-header .b2c-header__dropdown .dropdown-divider {
    margin: 6px 0;
    border-color: var(--hdr-border);
}

/* Mobile */
@media (max-width: 991px) {
    #header.b2c-header {
        --hdr-height: 64px;
    }

    #header.b2c-header .b2c-header__menu {
        padding: 12px 0 16px;
        margin-top: 8px;
        border-top: 1px solid var(--hdr-border);
    }

    #header.b2c-header .b2c-header__links {
        margin-bottom: 8px;
    }

    #header.b2c-header .b2c-header__link {
        padding: 12px 4px !important;
        font-size: 15px !important;
    }

    #header.b2c-header .b2c-header__link.is-active::after {
        right: 4px;
        bottom: 8px;
    }

    #header.b2c-header .b2c-header__actions {
        padding-top: 12px;
        border-top: 1px solid var(--hdr-border);
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }

    #header.b2c-header .b2c-header__actions .nav-item {
        width: 100%;
    }

    #header.b2c-header .b2c-header__lang,
    #header.b2c-header .b2c-header__signin,
    #header.b2c-header .b2c-header__register,
    #header.b2c-header .b2c-header__cta {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    #header.b2c-header .b2c-header__lang {
        padding: 8px 0 !important;
        margin-left: 0;
    }

    #header.b2c-header .b2c-header__register,
    #header.b2c-header .b2c-header__cta {
        height: 44px;
    }

    #header.b2c-header .b2c-header__profile {
        width: 100%;
        justify-content: flex-start;
    }

    #header.b2c-header .b2c-header__name {
        max-width: none;
        flex: 1;
    }
}

/* ==========================================================================
   Language switcher
   --------------------------------------------------------------------------
   Replaces the static "flag + Eng" chip. It reuses the header's own tokens
   (--hdr-font / --hdr-text / --hdr-brand) rather than inventing a palette, so
   it matches the rest of the bar on both the transparent and scrolled states.
   ========================================================================== */

#header.b2c-header .fh-lang .dropdown {
    position: relative;
}

#header.b2c-header .fh-lang__toggle {
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

/* Bootstrap draws its own caret on .dropdown-toggle; this uses an icon instead
   so the chevron can be rotated when the menu is open. */
#header.b2c-header .fh-lang__toggle::after {
    display: none !important;
}

#header.b2c-header .fh-lang__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    font-size: 15px;
    line-height: 1;
    letter-spacing: 0;
    border-radius: 4px;
    /* The fallback when a language has no country flag set is its code, which
       needs to read as a label rather than as body text. */
    font-weight: 700;
}

#header.b2c-header .fh-lang__glyph:not(:empty) {
    font-size: 15px;
}

#header.b2c-header .fh-lang__label {
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
}

#header.b2c-header .fh-lang__caret {
    font-size: 9px;
    opacity: .6;
    transition: transform .18s ease;
}

#header.b2c-header .fh-lang .dropdown.show .fh-lang__caret {
    transform: rotate(-180deg);
}

#header.b2c-header .fh-lang__menu {
    min-width: 232px;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
    background: #fff;
}

#header.b2c-header .fh-lang__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 10px;
    font-family: var(--hdr-font);
    color: #0f172a;
    transition: background .15s, color .15s;
}

#header.b2c-header .fh-lang__item:hover,
#header.b2c-header .fh-lang__item:focus {
    background: rgba(15, 23, 42, .05);
    color: #0f172a;
}

#header.b2c-header .fh-lang__item.is-current {
    background: rgba(83, 21, 36, .07);
}

#header.b2c-header .fh-lang__names {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    flex: 1;
    min-width: 0;
}

#header.b2c-header .fh-lang__names b {
    font-size: 13.5px;
    font-weight: 600;
}

#header.b2c-header .fh-lang__names small {
    font-size: 11.5px;
    color: #64748b;
}

#header.b2c-header .fh-lang__tick {
    font-size: 11px;
    color: var(--hdr-brand, #531524);
}

/* The header flips to a stacked mobile menu below 992px; the switcher follows
   the same full-width treatment as the sign-in and register buttons, and the
   dropdown becomes part of the flow rather than an overlay. */
@media (max-width: 991.98px) {
    #header.b2c-header .fh-lang,
    #header.b2c-header .fh-lang .dropdown {
        width: 100%;
    }

    #header.b2c-header .fh-lang__toggle {
        width: 100%;
        justify-content: center;
        padding: 8px 0 !important;
    }

    #header.b2c-header .fh-lang__menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 6px;
        transform: none !important;
        box-shadow: none;
        border-radius: 12px;
    }
}

/* Right-to-left: the menu aligns to the other edge and the rows mirror. */
html[dir="rtl"] #header.b2c-header .fh-lang__menu {
    right: auto;
    left: 0;
    text-align: right;
}

html[dir="rtl"] #header.b2c-header .fh-lang__item {
    flex-direction: row-reverse;
}

html[dir="rtl"] #header.b2c-header .fh-lang__names {
    text-align: right;
}
