/* Excursy custom header menu (topmenu.phtml) */

@media only screen and (min-width: 768px) {
    /* White bar above the banner: logo on the left, nav + currency on the right, one row */
    .header-container.simple-header {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        display: flex;
        align-items: center;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
    }

    /* Home search box: centered instead of spanning the whole page */
    .banner-container .search-page.custom_search_box {
        float: none;
        width: 60%;
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }

    .banner-container .search-page.custom_search_box .home-info-book.search-content {
        float: none;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    /* Both filter groups plus the search button share the full box width */
    .custom_search_box .input-daterange.main-head-form {
        display: flex;
        align-items: flex-end;
        gap: 15px;
        padding-right: 0;
    }

    .custom_search_box .input-daterange.main-head-form > .row-flex {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        margin: 0;
        gap: 15px;
    }

    .custom_search_box .input-daterange.main-head-form > .row-flex > * {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .custom_search_box #booking-button-search {
        position: static;
        flex: 0 0 auto;
        margin: 0;
    }

    /* Magento default nav: still used by the mobile off-canvas menu */
    .nav-sections {
        display: none;
    }

    /* The logo stays over the banner, right below the bar */
    .header-container.simple-header .desktop-logo {
        position: absolute;
        top: 100%;
        left: 0;
        padding: 14px 0 0;
        z-index: 5;
    }

    .header-container.simple-header .desktop-logo .logo img {
        max-height: 110px;
        width: auto;
        height: auto;
    }

    .header-container.simple-header > .header {
        position: relative;
        order: 1;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .header-container.simple-header .panel.wrapper {
        position: static;
        order: 2;
        flex: 0 0 auto;
        width: auto;
        background: none;
        border: 0;
    }

    .header-container.simple-header .panel.header {
        display: flex;
        align-items: center;
        height: 52px;
        position: static;
        width: auto;
        padding: 0 20px 0 0;
        background: none;
        border: 0;
        box-shadow: none;
    }

    .header-container.simple-header .header .f_right {
        float: right;
    }

    .header-container.simple-header .header:after {
        content: "";
        display: table;
        clear: both;
    }

    /*
     * Magento renders the link lists as <ul class="header links">, which collides
     * with the theme rule .simple-header .header { position: absolute; width: 100% }
     * and collapses the lists onto the banner.
     */
    .header-container.simple-header ul.header.links {
        position: static;
        width: auto;
    }

    .custom-excursy-header-menu {
        position: relative;
        z-index: 20;
    }

    .custom-excursy-header-menu .custom-nav-list {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        list-style: none;
        margin: 0;
        padding: 0 20px 0 0;
    }

    .custom-excursy-header-menu .custom-nav-list > .nav-item {
        position: relative;
        display: flex;
        align-items: center;
        height: 52px;
        margin: 0 0 0 26px;
        padding: 0;
        line-height: 1;
    }

    .custom-excursy-header-menu .custom-nav-list li a.nav-link {
        display: inline-block;
        padding: 0;
        color: #00559f;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .02em;
        text-decoration: none;
        white-space: nowrap;
    }

    .custom-excursy-header-menu .custom-nav-list li a.nav-link:hover,
    .custom-excursy-header-menu .custom-nav-list li a.nav-link:focus {
        color: #f0a500;
        text-decoration: none;
    }

    .custom-excursy-header-menu .nav-link .fa {
        margin-left: 6px;
        font-size: 12px;
    }

    /* Dropdown "Escolha Seu Destino" */
    .custom-excursy-header-menu .destinos-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        display: none;
        min-width: 250px;
        padding: 8px 0;
        background: #fff;
        border-radius: 4px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
        text-align: left;
        z-index: 30;
    }

    .custom-excursy-header-menu .nav-destinos:hover .destinos-dropdown-menu,
    .custom-excursy-header-menu .nav-destinos.open .destinos-dropdown-menu {
        display: block;
    }

    .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list {
        display: block;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list li {
        position: relative;
        float: none;
        width: auto;
        height: auto;
        margin: 0;
        padding: 0;
        line-height: 1.4;
    }

    .header-container.simple-header .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list li a,
    .header-container.simple-header .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list li a.level-top {
        display: block;
        padding: 8px 32px 8px 20px;
        color: #00559f;
        font-size: 14px;
        font-weight: 500;
        text-transform: none;
        text-decoration: none;
    }

    .header-container.simple-header .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list li a:hover,
    .header-container.simple-header .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list li a.level-top:hover,
    .header-container.simple-header .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list li:hover > a {
        color: #666;
        background: #f7f7f7;
    }

    .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list li.parent > a:after {
        content: "\f105";
        font-family: FontAwesome;
        position: absolute;
        top: 8px;
        right: 14px;
        font-size: 14px;
        line-height: 1.4;
    }

    /* Cascading submenus: one level opens next to its parent on hover */
    .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list ul.submenu {
        position: absolute;
        top: -8px;
        left: 100%;
        display: none;
        list-style: none;
        min-width: 230px;
        margin: 0;
        padding: 8px 0;
        background: #fff;
        border: 0;
        border-radius: 4px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
        z-index: 31;
    }

    .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list li:hover > ul.submenu {
        display: block;
    }

    .header-container.simple-header .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list ul.submenu li a {
        color: #00559f;
        font-size: 13px;
        font-weight: 400;
    }

    .header-container.simple-header .custom-excursy-header-menu .destinos-dropdown-menu ul.destinos-cats-list ul.submenu li a:hover {
        color: #666;
        background: #f7f7f7;
    }

    /* E-commerce actions */
    .custom-excursy-header-menu .ecomm-user-actions {
        display: flex;
        align-items: center;
        line-height: 1;
        white-space: nowrap;
    }

    .custom-excursy-header-menu .custom-nav-list li a.ecomm-link {
        padding: 0;
        color: #00559f;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
    }

    .custom-excursy-header-menu .custom-nav-list li a.ecomm-link:hover {
        color: #f0a500;
        text-decoration: none;
    }

    .custom-excursy-header-menu .ecomm-divider {
        color: #00559f;
        margin: 0 6px;
        opacity: .7;
    }

    .custom-excursy-header-menu .custom-nav-list li a.ecomm-link.checkout-btn {
        margin-left: 18px;
        padding: 7px 16px;
        background: #00559f;
        border-radius: 8px;
        color: #fff;
        text-transform: uppercase;
        text-shadow: none;
        font-size: 12px;
    }

    .custom-excursy-header-menu .custom-nav-list li a.ecomm-link.checkout-btn:hover {
        background: #00457f;
        color: #fff;
    }

    /* Magento default top.links: everything it offers is already in the custom menu */
    .header-container.simple-header .header > .f_right:not(.custom-excursy-header-menu) {
        display: none;
    }

    /* Currency switcher */
    .header-container.simple-header .switcher-currency {
        margin: 0;
        padding: 0;
    }

    .header-container.simple-header .switcher-currency .switcher-label {
        display: none;
    }

    .header-container.simple-header .switcher-currency .switcher-options {
        position: relative;
        display: inline-block;
        background: none;
        border: 0;
    }

    .header-container.simple-header .switcher-currency .switcher-trigger {
        cursor: pointer;
        background: none;
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .header-container.simple-header .switcher-currency .switcher-trigger strong {
        color: #00559f;
        font-size: 13px;
        font-weight: 600;
        background: none;
        border: 0;
        padding: 0;
    }

    .header-container.simple-header .switcher-currency .switcher-trigger strong:after {
        content: "\f107";
        font-family: "FontAwesome";
        margin-left: 6px;
        font-size: 12px;
    }

    .header-container.simple-header .switcher-currency .action.toggle:after {
        display: none;
    }

    .header-container.simple-header .switcher-currency .switcher-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        min-width: 190px;
        margin: 6px 0 0;
        padding: 8px 0;
        list-style: none;
        background: #fff;
        border-radius: 4px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
        z-index: 40;
    }

    .header-container.simple-header .switcher-currency .switcher-options:hover .switcher-dropdown,
    .header-container.simple-header .switcher-currency .switcher-options.active .switcher-dropdown {
        display: block;
    }

    .header-container.simple-header .switcher-currency .switcher-dropdown li {
        margin: 0;
        padding: 0;
        background: none;
    }

    .header-container.simple-header .switcher-currency .switcher-dropdown li a {
        display: block;
        padding: 6px 16px;
        color: #00559f;
        font-size: 13px;
        text-decoration: none;
    }

    .header-container.simple-header .switcher-currency .switcher-dropdown li a:hover {
        color: #f0a500;
        background: #f7f7f7;
    }

    @media (max-width: 1199px) {
        .custom-excursy-header-menu .custom-nav-list > .nav-item {
            margin-left: 16px;
        }

        .custom-excursy-header-menu .destinos-dropdown-menu {
            min-width: 230px;
        }
    }
}

@media only screen and (max-width: 767px) {
    /* Search box: full width, centered, inside the viewport */
    .banner-container .search-page.custom_search_box,
    .search-page.custom_search_box {
        float: none;
        width: 100%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding: 20px 15px 25px;
        box-sizing: border-box;
    }

    .search-page.custom_search_box .home-info-book.search-content,
    .search-page.custom_search_box #booking-search,
    .custom_search_box .input-daterange.main-head-form {
        float: none;
        width: 100%;
        max-width: none;
        margin: 0;
        padding-right: 0;
    }

    .custom_search_box .input-daterange.main-head-form > .row-flex {
        margin-left: 0;
        margin-right: 0;
    }

    .custom_search_box .row-flex > [class*="cfl-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .custom_search_box .row-flex > [class*="cfl-"] + [class*="cfl-"] {
        margin-top: 12px;
    }

    .custom_search_box #booking-button-search {
        position: static;
        float: none;
        width: 100%;
        margin-top: 15px;
    }

    /* Logo bar above the banner: keep it compact */
    .header-container.simple-header .mobile-logo {
        margin: 0;
        padding: 6px 0;
    }

    .header-container.simple-header .mobile-logo .logo img {
        max-height: 42px;
        width: auto;
        height: auto;
    }

    /* Category/product banner: show the whole image instead of cropping it */
    #photos-modal .bg-cover {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }
}

/* Currency switcher inside the category/search toolbar */
.toolbar .cat-currency {
    float: none;
    display: inline-block;
    vertical-align: middle;
    margin: 0 0 0 20px;
}

.cat-currency .switcher-currency {
    margin: 0;
}

.cat-currency .switcher-currency .switcher-label {
    display: none;
}

.cat-currency .switcher-options {
    position: relative;
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
}

.cat-currency #top-switcher-currency-trigger {
    width: auto;
    padding: 0;
    cursor: pointer;
}

.cat-currency .switcher-trigger strong {
    color: #00559f;
    font-size: 13px;
    font-weight: 600;
}

.cat-currency .switcher-trigger strong:after {
    content: "\f107";
    font-family: "FontAwesome";
    margin-left: 6px;
    font-size: 12px;
}

.cat-currency .switcher-trigger:after,
.cat-currency .action.toggle:after {
    display: none;
}

.cat-currency .switcher-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    z-index: 40;
}

.cat-currency .switcher-options:hover .switcher-dropdown,
.cat-currency .switcher-options.active .switcher-dropdown {
    display: block;
}

.cat-currency .switcher-dropdown li {
    margin: 0;
    padding: 0;
    background: none;
}

.cat-currency .switcher-dropdown li a {
    display: block;
    padding: 6px 16px;
    color: #00559f;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.cat-currency .switcher-dropdown li a:hover {
    color: #f0a500;
    background: #f7f7f7;
}
