.mokkirinki-search-host {
    position: relative;
}

.mokkirinki-search-host:focus-within {
    z-index: 30;
}

.mokkirinki-search-dropdown {
    position: absolute;
    z-index: 10020;
    top: calc(100% + 8px);
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    width: min(720px, calc(100vw - 32px));
    max-height: min(68vh, 560px);
    overflow: auto;
    padding: 8px;
    border: 1px solid #e7ebe8;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(24, 42, 32, .18);
    color: #303a34;
    text-align: left;
}

.mokkirinki-search-dropdown--search-row {
    position: fixed;
}

.mokkirinki-search-dropdown[hidden] {
    display: none;
}

.mokkirinki-search-group:nth-child(even) {
    padding: 8px;
    border-left: 1px solid #edf0ee;
}

.mokkirinki-search-group:nth-child(n+3) {
    border-top: 1px solid #edf0ee;
}

.mokkirinki-search-group-title {
    margin: 4px 10px 6px;
    color: #738077;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.4;
    text-transform: uppercase;
}

.mokkirinki-search-option {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: none;
    transition: background-color .15s ease;
}

.mokkirinki-search-option:hover,
.mokkirinki-search-option:focus,
.mokkirinki-search-option[aria-selected="true"] {
    outline: 0;
    background: #f2f7f3;
    color: #214d34;
    text-decoration: none;
}

.mokkirinki-search-option-image,
.mokkirinki-search-option-icon {
    display: flex;
    width: 54px;
    height: 48px;
    flex: 0 0 54px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #edf4ef;
    color: #3b6a4d;
    font-size: 22px;
    object-fit: cover;
}

.mokkirinki-search-option--owner .mokkirinki-search-option-image {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 50%;
}

.mokkirinki-search-option-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.mokkirinki-search-option-title {
    overflow: hidden;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mokkirinki-search-option-detail {
    overflow: hidden;
    color: #78827c;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mokkirinki-search-option-arrow {
    color: #839087;
    font-size: 24px;
    line-height: 1;
}

.mokkirinki-search-message {
    grid-column: 1 / -1;
    margin: 0;
    padding: 18px 12px;
    color: #68746c;
    font-size: 14px;
    text-align: left;
}

.mokkirinki-search-message--loading {
    color: #526e5b;
}

.mokkirinki-search-message--error {
    color: #a23939;
}

body.mokkirinki-search-active .pac-container,
body.mokkirinki-search-active .ui-autocomplete {
    display: none !important;
}

@media (max-width: 767px) {
    .mokkirinki-search-dropdown {
        grid-template-columns: minmax(0, 1fr);
        width: min(560px, calc(100vw - 24px));
        max-height: 60vh;
    }

    .mokkirinki-search-group:nth-child(even) {
        padding: 8px 0 0;
        border-left: 0;
    }

    .mokkirinki-search-group:nth-child(n+2) {
        border-top: 1px solid #edf0ee;
    }

    .mokkirinki-search-option {
        min-height: 50px;
        gap: 10px;
        padding: 7px 8px;
    }
}

@media (min-width: 992px) {
    .mokkirinki-search-dropdown--search-row {
        max-width: none;
    }

    .mokkirinki-search-group:nth-child(even) {
        padding-left: 16px;
    }

    .mokkirinki-search-group:nth-child(odd) {
        padding-right: 16px;
    }

    .main-search.without-filters #search-desktop {
        table-layout: fixed;
    }

    .main-search.without-filters #search-desktop > .search-destination {
        width: 62%;
        min-width: 0;
    }

    .main-search.without-filters #search-desktop > .search-date-range {
        width: 17%;
    }

    .main-search.without-filters #search-desktop > .search-guests {
        width: 9%;
    }

    .main-search.without-filters #search-desktop > .search-button {
        width: 12%;
        min-width: 100px;
    }

    .main-search.without-filters #search-desktop .search-date-range-arrive,
    .main-search.without-filters #search-desktop .search-date-range-depart {
        width: 50%;
    }

    /* !important: theme/Elementor rules otherwise force equal field widths. */
    .search-banner.search-banner-desktop form {
        display: flex !important;
        align-items: center;
    }

    /* Tied to the date range, guests and button widths below; ends at the Search button. */
    .search-banner.search-banner-desktop form > .mokkirinki-search-host .mokkirinki-search-dropdown {
        width: calc(100% + 570px);
    }

    .search-banner.search-banner-desktop form > .search-destination {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .search-banner.search-banner-desktop form > .search-date-range {
        flex: 0 0 330px !important;
        width: 330px !important;
        min-width: 0 !important;
        max-width: 330px !important;
    }

    .search-banner.search-banner-desktop form > .search-date-range .search-date-range-arrive,
    .search-banner.search-banner-desktop form > .search-date-range .search-date-range-depart {
        width: calc(50% - 5px) !important;
        min-width: 0 !important;
    }

    .search-banner.search-banner-desktop form > .search-guests {
        flex: 0 0 140px !important;
        width: 140px !important;
        min-width: 0 !important;
        max-width: 140px !important;
    }

    .search-banner.search-banner-desktop form > .search-button {
        flex: 0 0 110px !important;
        width: 110px !important;
        min-width: 0 !important;
        max-width: 110px !important;
    }
}
