/* Prevent horizontal page scroll from overflowing nav */
html,
body {
    overflow-x: clip;
    max-width: 100%;
}

@media only screen and (min-width: 1100px) {
    .Navigation-bar {
        overflow: hidden;
    }

    .Navigation-linksContainer {
        overflow: hidden;
    }

    .Navigation-mainLinksContainer {
        overflow: hidden;
        max-width: 100%;
    }
}

/* Keep Four Seasons logo in the main nav bar (not wrapped below links) */
@media only screen and (min-width: 1100px) {
    .Navigation-bar {
        flex-wrap: nowrap;
    }

    .Navigation-logoContainer {
        flex: 0 0 auto;
        align-self: center;
        max-width: 72px;
    }

    .Navigation-logo {
        display: flex;
        align-items: center;
        line-height: 1;
        margin: 0 15px 0 0;
    }

    .Navigation-logo:before {
        display: block;
        flex-shrink: 0;
    }

    .Navigation-linksContainer {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* Four Seasons tree logo (logo-4seasons.png) */
.Navigation-logo:before,
.Navigation-sm .Navigation-logo:before {
    display: none !important;
    content: none !important;
    background: none !important;
}

.Navigation-logo,
.Navigation-sm .Navigation-logo {
    display: flex !important;
    align-items: center !important;
    line-height: normal !important;
    min-height: 44px;
    overflow: visible !important;
}

.Navigation-sm .Navigation-logo {
    flex: 0 0 auto;
}

.Navigation-sm > a:first-child {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 2;
}

.fs-header-logo {
    display: block !important;
    width: 44px !important;
    height: 44px !important;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Header branco (mobile): silhueta preta forte */
.Navigation-sm .fs-header-logo,
.nav-sm .fs-header-logo {
    filter: brightness(0) !important;
}

/* Nav preta (desktop): árvore branca */
@media only screen and (min-width: 1100px) {
    .Navigation-bar .fs-header-logo {
        width: 48px !important;
        height: 48px !important;
        filter: brightness(0) invert(1) !important;
    }

    .Navigation--hasHero .Navigation-bar .fs-header-logo {
        filter: brightness(0) invert(1) !important;
    }
}

/* CAW bar: visible when open, positioned under the header */
@media only screen and (min-width: 1100px) {
    .Navigation-background {
        position: relative;
    }

    #NavigationCAW {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        width: 100%;
        z-index: 1;
    }

    #TopNav-mainNav.caw-open #NavigationCAW,
    #NavigationCAW.NavigationCAW--open,
    #NavigationCAW.fs-caw-visible {
        display: block !important;
        visibility: visible !important;
        min-height: 108px;
    }

    #NavigationCAW .CAW-react-ssr-placeholder:not(.CAW-react-ssr-rendered) {
        min-height: 72px;
    }

    #NavigationCAW .CAW-react-ssr-placeholder[data-caw-fallback-injected="true"] {
        min-height: 108px;
    }

    /* Frosted booking bar (matches production NavigationCAW styles) */
    #NavigationCAW .caw-comp__wrapper .App-wrapper .container .row .cawComponent.horizontal,
    #NavigationCAW .fs-caw-fallback-component {
        background-color: hsla(0, 0%, 100%, .85);
        background: linear-gradient(180deg, hsla(0, 0%, 100%, .65), hsla(0, 0%, 100%, .85) 30%);
        box-shadow: 0 25px 51px -30px #000;
        height: 108px;
        padding: 50px 0 18px;
        position: relative;
    }

    @supports (backdrop-filter: blur(1px)) {
        #NavigationCAW .caw-comp__wrapper .App-wrapper .container .row .cawComponent.horizontal,
        #NavigationCAW .fs-caw-fallback-component {
            backdrop-filter: blur(13px);
            -webkit-backdrop-filter: blur(13px);
            background: linear-gradient(180deg, hsla(0, 0%, 100%, .55), hsla(0, 0%, 100%, .75) 30%);
        }
    }

    /* Fixed header + CAW while scrolling */
    #TopNav-mainNav.is-Stick .Navigation-lg.is-Stick.is-StickExpanded {
        transform: translateY(0) !important;
    }

    #TopNav-mainNav.is-Stick .Navigation-lg.is-Stick {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9;
    }
}

/* Static CAW fallback layout */
.fs-caw-fallback-component .cawFieldsContainer {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 145px;
    box-sizing: border-box;
}

.fs-caw-fallback-component .fs-caw-field {
    flex: 0 0 auto;
    padding-right: 10px;
    box-sizing: border-box;
}

.fs-caw-fallback-component .fs-caw-field--dates {
    width: 30%;
    min-width: 200px;
}

.fs-caw-fallback-component .fs-caw-field--guests {
    width: 20%;
    min-width: 180px;
}

.fs-caw-fallback-component .fs-caw-field--promo {
    width: 14%;
    min-width: 120px;
}

.fs-caw-fallback-component .fs-caw-field--submit {
    width: 15%;
    min-width: 168px;
    max-width: 185px;
    padding-right: 0;
}

.fs-caw-fallback-component .fs-caw-label {
    display: block;
    font-family: Neue Helvetica, helvetica, sans-serif;
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    line-height: 1.33333em;
    text-transform: uppercase;
    color: #4d4d4d;
    margin-bottom: 6px;
}

.fs-caw-fallback-component .fs-caw-value,
.fs-caw-fallback-component .fs-caw-input {
    display: block;
    width: 100%;
    font-family: Neue Helvetica, helvetica, sans-serif;
    font-size: 1.125rem;
    line-height: 1.4;
    color: #1f1f1f;
    border: 1px solid #d8d8d8;
    background: #fff;
    padding: 10px 12px;
    box-sizing: border-box;
}

.fs-caw-fallback-component .fs-caw-submit {
    display: block;
    width: 100%;
    font-family: Neue Helvetica, helvetica, sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    line-height: 1;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
    background: #1f1f1f;
    border: 1px solid #1f1f1f;
    padding: 14px 16px;
    cursor: pointer;
    text-decoration: none;
}

.fs-caw-fallback-component .fs-caw-submit:hover {
    background: #4d4d4d;
    border-color: #4d4d4d;
}

.fs-caw-fallback-component .fs-caw-brg {
    position: absolute;
    right: 30px;
    bottom: 18px;
    font-family: Neue Helvetica, helvetica, sans-serif;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.fs-caw-fallback-component .fs-caw-brg a {
    color: #1f1f1f;
    text-decoration: underline;
}
