@import url('/assets/site.css');
@import url('/assets/book-picker.css');

/* ── Shared header scale (homepage + guest pages) ── */
:root {
    --header-height: 56px;
    --header-logo: 36px;
    --header-nav-size: 11px;
    --header-cta-size: 11px;
    --header-cta-min-height: 36px;
    --header-cta-pad-y: 9px;
    --header-cta-pad-x: 14px;
    --topbar-height: var(--header-height);
    --brand-200: #e1e7de;
    --brand-800: #5e6360;
    --brand-900: #343836;
    --brand-accent: #7a8c66;
    --white: #ffffff;
}

@media (min-width: 768px) {
    :root {
        --header-height: 80px;
        --header-logo: 44px;
    }
}

@media (min-width: 1024px) {
    :root {
        --header-nav-size: 12px;
        --header-cta-size: 12px;
        --header-cta-min-height: 38px;
        --header-cta-pad-y: 10px;
        --header-cta-pad-x: 16px;
    }
}

/* Book a Stay + nav CTA buttons (homepage + topbar) */
.header-cta-btn,
.nav-cta-btn,
.site-nav .btn.primary.book-picker-btn,
.topbar .btn.primary.book-picker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: var(--header-cta-size);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    line-height: 1.2;
    min-height: var(--header-cta-min-height);
    padding: var(--header-cta-pad-y) var(--header-cta-pad-x);
    border-radius: 9999px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-cta-btn--mobile {
    font-size: 10px;
    padding: 8px 11px;
    min-height: 34px;
    max-width: 9.5rem;
}

.nav-cta-btn--mobile span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Guest nav links in topbar (balanced header) */
.guest-nav-slot {
    display: none;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}

@media (min-width: 768px) {
    .guest-nav-slot {
        display: flex;
    }
}

.guest-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 0 8px;
}

.guest-nav__link {
    font-size: var(--header-nav-size);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--brand-800);
    white-space: nowrap;
    transition: color 0.15s ease;
}

.guest-nav__link:hover {
    color: var(--brand-accent);
}

.guest-nav__link.is-active {
    color: var(--brand-accent);
}

/* ── Guest / inner-page topbar ── */
.topbar {
    height: var(--header-height);
    min-height: var(--header-height);
    max-height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--brand-200);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--header-height);
    flex-wrap: nowrap;
    overflow: visible;
}

.brand-link,
.topbar__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 0 0 auto;
    overflow: hidden;
    text-decoration: none;
    color: var(--brand-900);
}

.brand-link > div,
.topbar__heading {
    min-width: 0;
}

/* Logo-only header on guest pages (matches homepage) */
.topbar:not(.topbar--titled) .brand-link > div {
    display: none;
}

.topbar--titled .brand-link {
    flex: 1 1 0%;
}

.brand-link img {
    height: var(--header-logo);
    width: auto;
    flex-shrink: 0;
    display: block;
}

.title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--brand-800);
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-shrink: 0;
}

.topbar .btn {
    font-size: var(--header-cta-size);
    font-weight: 700;
    text-decoration: none;
    border-radius: 9999px;
    padding: var(--header-cta-pad-y) var(--header-cta-pad-x);
    min-height: var(--header-cta-min-height);
    border: 1px solid var(--brand-200);
    color: var(--brand-900);
    background: var(--white);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    flex-shrink: 0;
    font-family: inherit;
}

.topbar .btn.primary {
    background: var(--brand-accent);
    color: var(--white);
    border-color: var(--brand-accent);
}

.topbar .book-picker-btn.primary {
    padding-right: 12px;
}

.frame-wrap {
    height: calc(100dvh - var(--header-height));
}

.topbar .lang-slot,
.site-nav .lang-slot,
.nav-lang-slot {
    margin-left: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--brand-200);
    flex-shrink: 0;
}

.nav-lang-slot--mobile {
    margin-left: 2px;
    padding-left: 6px;
}

@media (max-width: 767px) {
    .topbar .topbar__btn-secondary {
        display: none;
    }

    .topbar .lang-slot {
        margin-left: 0;
        padding-left: 6px;
    }

    .topbar--titled .subtitle {
        display: none;
    }

    .topbar--titled .title {
        font-size: 12px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ── Homepage fixed nav (same scale as topbar) ── */
.nav-home {
    position: fixed;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--brand-200);
}

.nav-home__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    min-height: var(--header-height);
    max-height: var(--header-height);
}

.nav-home__logo {
    height: var(--header-logo);
    max-height: var(--header-logo);
    width: auto;
    object-fit: contain;
}

.nav-home-offset {
    padding-top: var(--header-height);
}

.nav-home .guest-nav__link,
.nav-home a[data-i18n="nav.signature"],
.nav-home a[data-i18n="nav.extended"],
.nav-home a[data-i18n="nav.concierge"],
.nav-home a[data-i18n="nav.listProperty"] {
    font-size: var(--header-nav-size);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
