/* -----------------------------
   NomadRoute Search
----------------------------- */

.nr-explore-dropdown {
    display: none;
}

.nr-explore-dropdown.is-open {
    display: flex;
}

.nr-explore-dropdown-inner {
    background: #ffffff;
}

/* -----------------------------
   Mobile Search Overlay
----------------------------- */

.nr-mobile-search-header,
.nr-mobile-search-field,
.nr-mobile-search-close {
    display: none;
}

@media (max-width: 921px) {
    body.nr-search-open {
        overflow: hidden !important;
        touch-action: none;
    }

    .nr-explore-dropdown {
        position: fixed;
        inset: 0;
        align-items: stretch;
        justify-content: flex-end;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(11, 25, 54, 0.55);
        backdrop-filter: blur(5px);
        z-index: 999999;
    }

    .nr-explore-dropdown-inner {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        padding:
            max(22px, env(safe-area-inset-top))
            18px
            max(18px, env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
    }

    .nr-mobile-search-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 22px;
    }

    .nr-mobile-search-intro {
        min-width: 0;
    }

    .nr-mobile-search-intro h2 {
        margin: 0;
        color: #0b1936;
        font-size: 25px;
        line-height: 1.2;
    }

    .nr-mobile-search-intro p {
        max-width: 420px;
        margin: 7px 0 0;
        color: #64748b;
        font-size: 14px;
        line-height: 1.5;
    }

    .nr-mobile-search-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        padding: 0;
        border: 1px solid #dbe4f0;
        border-radius: 50%;
        background: #f8fbff;
        color: #0b1936;
        font-size: 32px;
        font-weight: 300;
        line-height: 1;
        cursor: pointer;
    }

    .nr-mobile-search-close:hover,
    .nr-mobile-search-close:focus {
        border-color: #2563eb;
        background: #ffffff;
        color: #2563eb;
    }

    .nr-mobile-search-field {
        display: block;
        flex: 0 0 auto;
    }

    .nr-destination-search-input {
        height: 58px;
        border-radius: 14px !important;
        background-color: #f8fbff !important;
        font-size: 17px;
    }

    .nr-explore-dropdown .nr-destination-results {
        flex: 1 1 auto;
        max-height: none;
        margin-top: 16px;
        padding-bottom: 20px;
        overflow-y: auto;
    }

    .nr-explore-dropdown .nr-search-group {
        padding: 5px 0;
    }

    .nr-explore-dropdown .nr-destination-result-item {
        padding: 13px 14px;
    }
}

@media (min-width: 922px) {
    .nr-explore-dropdown {
        display: none !important;
    }
}

.nr-destination-search-input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 46px !important;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    outline: none;
    background-color: #f8fbff;
    background-repeat: no-repeat !important;
    background-position: 16px center !important;
    background-size: 18px 18px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230B1936' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cpath d='M21 21l-4.3-4.3'%3E%3C/path%3E%3C/svg%3E") !important;
    color: #0b1936;
    font-size: 15px;
}

.nr-destination-search-input:focus {
    border-color: #2563eb;
    background-color: #ffffff;
    outline: none !important;
    box-shadow: none !important;
}

.nr-destination-results {
    margin-top: 12px;
}

.nr-destination-result-item {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: #0b1936 !important;
    text-decoration: none !important;
}

.nr-destination-result-item:hover,
.nr-destination-result-item.is-active {
    background: #f1f6ff;
}

.nr-result-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.nr-result-meta {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 13px;
}

.nr-search-empty {
    padding: 12px 14px;
    color: #64748b;
    font-size: 14px;
}

/* Astra Explore menu trigger */

.nr-menu-explore > a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.nr-menu-explore > a::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.9;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230B1936' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cpath d='M21 21l-4.3-4.3'%3E%3C/path%3E%3C/svg%3E");
}

.nr-menu-explore > a:hover::before {
    opacity: 1;
}
/* -----------------------------
   Grouped Search Results
----------------------------- */

.nr-destination-results {
    max-height: min(520px, calc(100vh - 180px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nr-search-group + .nr-search-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eef2f7;
}

.nr-search-group-title {
    padding: 6px 14px 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.nr-search-empty {
    padding: 14px;
}

.nr-search-empty-title {
    color: #0b1936;
    font-size: 15px;
    font-weight: 700;
}

.nr-search-empty-help {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.nr-search-flight-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 14px;
    padding: 9px 15px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
}

.nr-search-flight-link:hover {
    background: #1d4ed8;
    color: #ffffff !important;
}

/* -----------------------------
   Persistent Desktop Search
----------------------------- */

.nr-header-search {
    display: none;
}

@media (min-width: 922px) {
    .nr-menu-explore > a {
        display: none !important;
    }

    .nr-menu-explore {
        position: relative;
        display: flex;
        align-items: center;
    }

    .nr-header-search {
        position: relative;
        display: block;
        width: clamp(320px, 42vw, 620px);
        margin-left: auto;
    }

    .nr-header-search-field {
        position: relative;
    }

    .nr-header-search-input {
        width: 100%;
        height: 44px;
        padding: 0 16px 0 44px !important;
        border: 1px solid #dbe4f0 !important;
        border-radius: 12px !important;
        outline: none !important;
        background-color: #f8fbff !important;
        background-repeat: no-repeat !important;
        background-position: 15px center !important;
        background-size: 18px 18px !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230B1936' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cpath d='M21 21l-4.3-4.3'%3E%3C/path%3E%3C/svg%3E") !important;
        box-shadow: none !important;
        color: #0b1936 !important;
        font-size: 14px;
        line-height: 1;
    }

    .nr-header-search-input::placeholder {
        color: #64748b;
        opacity: 1;
    }

    .nr-header-search-input:focus {
        border-color: #2563eb !important;
        background-color: #ffffff !important;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    }

    .nr-header-search-results {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: auto;
        width: 100%;
        max-height: min(500px, calc(100vh - 130px));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 10px;
        border: 1px solid #dbe4f0;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 18px 45px rgba(11, 25, 54, 0.16);
        z-index: 99999;
    }

    .nr-header-search-results.is-open {
        display: block;
    }
}

@media (max-width: 921px) {
    .nr-header-search {
        display: none !important;
    }
}
/* -----------------------------
   Desktop Header Refinements
----------------------------- */

@media (min-width: 922px) {
    /* Astra Above Header */
    .ast-above-header-wrap,
    .ast-above-header-bar {
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    .ast-above-header-bar {
        background: #0B1936 !important;
    }

    /* Search dropdown follows input width */
    .nr-header-search-results {
        left: 0;
        right: auto;
        width: 100%;
        box-sizing: border-box;
    }
}