/*
 * Copyright (c) 2026 Philip Necsulescu.
 * All rights reserved.
 */

.menu-bar {
    min-width: 0;
    background: var(--menu-bar-background);
    color: var(--menu-bar-action-color);
    font-size: var(--menu-bar-font-size);
    line-height: var(--menu-bar-line-height);
}

.menu-bar-action {
    min-width: 0;
    border: 0;
    background: var(--menu-bar-action-background);
    color: var(--menu-bar-action-color);
}

.menu-bar-action:hover,
.menu-bar-action:focus,
.menu-bar-action:focus-visible,
.menu-bar-action:focus-within {
    background: var(--menu-bar-hover-background);
    color: var(--menu-bar-hover-color);
    outline: none;
}

.menu-bar-field {
    min-width: 0;
    border: var(--menu-bar-border-width) solid var(--menu-bar-action-background);
    border-radius: 0;
    background: var(--menu-bar-field-background);
    color: var(--menu-bar-field-color);
}

.menu-bar-field:focus-within {
    border-color: var(--menu-bar-action-background);
}

.menu-bar :where(input, select, button) {
    font: inherit;
}

.menu-bar :where(label, button, select) {
    cursor: pointer;
}

.menu-bar-icon {
    display: block;
    width: var(--menu-bar-desktop-icon-size);
    height: var(--menu-bar-desktop-icon-size);
    fill: currentColor;
    flex: 0 0 auto;
}

.menu-bar-check-input {
    width: var(--menu-bar-desktop-icon-size);
    height: var(--menu-bar-desktop-icon-size);
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--ball-dot-yellow);
}

.mobile-menu-bar {
    min-width: 0;
}

.location-navbar {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.location-navbar-shell {
    display: grid;
    grid-template-columns:
        var(--menu-bar-desktop-action-width)
        repeat(3, var(--location-navbar-location-width))
        var(--location-navbar-search-width);
    gap: 0;
    width: var(--location-navbar-width);
    max-width: calc(100% - 32px);
    min-width: 0;
    min-height: var(--location-navbar-row-height);
    margin: 0 auto;
    padding: 0;
    align-items: stretch;
}

.location-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--menu-bar-desktop-action-width);
    min-height: var(--location-navbar-row-height);
    padding: 0;
    border: 0;
    font-weight: 700;
    text-decoration: none;
}

.location-home-link:hover,
.location-home-link:focus-visible {
    outline: none;
}

.location-navbar .filter-field {
    gap: 0;
    height: 100%;
}

.location-navbar-search-cluster {
    min-width: 0;
    min-height: var(--location-navbar-row-height);
    display: grid;
    grid-template-columns:
        calc(var(--location-navbar-search-width) - var(--location-navbar-search-button-width) - var(--menu-bar-border-width) - var(--menu-bar-border-width))
        var(--location-navbar-search-button-width);
    align-items: stretch;
    background: var(--menu-bar-action-background);
    overflow: visible;
}

.location-navbar-field {
    position: relative;
    min-width: 0;
    min-height: var(--location-navbar-row-height);
    display: flex;
    align-items: stretch;
    border: 0;
}

.location-navbar-search-field {
    position: relative;
    min-width: 0;
    min-height: var(--menu-bar-desktop-field-height);
    display: flex;
    align-items: stretch;
    background: var(--menu-bar-field-background);
}

.catalog-search-combobox {
    position: relative;
    width: 100%;
    min-width: 0;
    display: block;
}

.location-navbar-search-field input {
    width: 100%;
    min-width: 0;
    min-height: var(--menu-bar-desktop-field-height);
    height: 100%;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--menu-bar-field-color);
    font: inherit;
    font-weight: 400;
}

.location-navbar-search-field input:focus-visible {
    outline: none;
}

.location-navbar-search-field input::placeholder {
    color: var(--menu-bar-field-color);
    opacity: 1;
}

.location-navbar-search-button {
    align-self: stretch;
    justify-self: stretch;
    min-height: var(--menu-bar-desktop-field-height);
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.location-navbar-search-button:hover,
.location-navbar-search-button:focus-visible {
    outline: none;
}

.catalog-search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 0;
    padding: 4px;
    background: var(--panel-bright);
    border: 2px solid var(--accent-dark);
    box-shadow: 0 14px 28px var(--shadow-strong);
}

.catalog-search-suggestions[hidden] {
    display: none !important;
}

.catalog-search-suggestion {
    width: 100%;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--ink);
    display: grid;
    gap: 4px;
    text-align: left;
    cursor: pointer;
}

.catalog-search-suggestion:hover,
.catalog-search-suggestion:focus-visible,
.catalog-search-suggestion--active {
    background: var(--accent-soft);
    outline: none;
}

.catalog-search-suggestion-value {
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    overflow-wrap: anywhere;
}

.catalog-search-suggestion-meta {
    min-width: 0;
    font-size: 12px;
    line-height: 16px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.location-navbar-field::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 8px;
    height: 4px;
    background: currentColor;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform: translateY(-50%);
    pointer-events: none;
}

.location-navbar .filter-field select {
    width: 100%;
    min-width: 0;
    min-height: var(--location-navbar-row-height);
    height: 100%;
    padding: 8px 40px 8px 16px;
    border: 0;
    background-color: transparent;
    color: inherit;
    font-size: var(--menu-bar-font-size);
    font-weight: 700;
    line-height: var(--menu-bar-line-height);
    text-align: left;
    text-align-last: left;
    appearance: none;
    background-image: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-navbar .filter-field select:hover,
.location-navbar .filter-field select:focus-visible {
    background-color: transparent;
    color: inherit;
    outline: none;
}

.location-navbar .filter-field select:disabled {
    color: var(--white-62);
    background-color: transparent;
    cursor: not-allowed;
}

.location-navbar .filter-field select option {
    color: var(--menu-bar-action-color);
    background: var(--menu-bar-action-background);
    text-align: left;
}

.location-navbar .filter-field select option:checked,
.location-navbar .filter-field select option:hover,
.location-navbar .filter-field select option:focus,
.location-navbar .filter-field select option:active {
    background: var(--menu-bar-hover-background);
    color: var(--menu-bar-hover-color);
    outline: none;
}

.table-filter-shell-content {
    display: grid;
    gap: 0;
    width: 100%;
    min-width: 0;
    padding: 0;
    background: var(--menu-bar-background);
    border-radius: 0;
    box-shadow: 0 18px 40px var(--shadow-soft);
}

.menu-bar--filters {
    display: grid;
    grid-template-columns:
        minmax(0, 2.9fr)
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(0, 1.1fr);
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: var(--catalog-table-header-height);
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.table-filter-top-booking-option {
    min-width: 0;
    height: var(--catalog-table-header-height);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-size: var(--menu-bar-font-size);
    font-weight: 800;
    line-height: var(--menu-bar-line-height);
}

.table-filter-top-booking-option span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.table-filter-search-field {
    position: relative;
    min-width: 0;
    height: var(--catalog-table-header-height);
    display: grid;
    grid-template-columns: var(--menu-bar-desktop-icon-size) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 4px;
}

.table-filter-leading-icon {
    color: var(--muted);
    opacity: 0.9;
}

.table-filter-search-input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--menu-bar-field-color);
    font: inherit;
    font-size: 16px;
}

.table-filter-search-input:focus-visible {
    outline: none;
}

.table-filter-search-input::placeholder {
    color: rgba(74, 55, 38, 0.7);
    opacity: 1;
}

.table-filter-toggle-button {
    position: relative;
    height: var(--catalog-table-header-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    padding: 0 24px;
    font-size: var(--menu-bar-font-size);
    font-weight: 800;
    line-height: var(--menu-bar-line-height);
    box-shadow: none;
}

.table-filter-toggle-button:hover,
.table-filter-toggle-button:focus-visible {
    outline: none;
}

.table-filter-toggle-button[aria-expanded="true"]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: var(--menu-bar-background);
    transform: translateX(-50%) rotate(45deg);
}

.mobile-results-toolbar-content {
    display: none;
}

@media (min-width: 801px) and (max-width: 1152px) {
    .location-navbar-shell {
        --location-navbar-width: 768px;
        --location-navbar-location-width: 140px;
        --location-navbar-search-width: 300px;
        --location-navbar-search-button-width: var(--menu-bar-desktop-action-width);
    }

    .menu-bar--filters {
        height: var(--catalog-table-header-height);
    }
}

@media (max-width: 800px) {
    .mobile-menu-bar {
        height: var(--menu-bar-mobile-height);
        min-height: var(--menu-bar-mobile-height);
        font-size: var(--menu-bar-mobile-font-size);
        line-height: var(--menu-bar-mobile-line-height);
        letter-spacing: 0;
    }

    .mobile-menu-bar .menu-bar-action,
    .mobile-menu-bar .menu-bar-field {
        height: var(--menu-bar-mobile-height);
        min-height: var(--menu-bar-mobile-height);
    }

    .mobile-menu-bar :where(label, span, input, select, button),
    .mobile-menu-bar input::placeholder {
        font-size: var(--mobile-small-font-size);
        line-height: var(--mobile-small-line-height);
        letter-spacing: 0;
    }

    .mobile-menu-bar :where(input, select, button) {
        height: 100%;
        min-height: 0;
    }

    .mobile-menu-bar .menu-bar-icon,
    .mobile-menu-bar .menu-bar-check-input {
        width: var(--menu-bar-mobile-icon-size);
        height: var(--menu-bar-mobile-icon-size);
    }

    .location-navbar {
        --location-navbar-row-height: 24px;
        --menu-bar-mobile-height: 24px;
        --menu-bar-mobile-field-height: 16px;
        font-size: var(--menu-bar-mobile-font-size);
        line-height: var(--menu-bar-mobile-line-height);
    }

    .location-navbar.mobile-menu-bar.menu-bar--location,
    .location-navbar.mobile-menu-bar.menu-bar--location :where(label, span, input, select, button),
    .location-navbar.mobile-menu-bar.menu-bar--location input::placeholder {
        font-size: var(--mobile-small-font-size);
        line-height: var(--mobile-small-line-height);
        letter-spacing: 0;
    }

    .location-navbar-shell {
        --location-navbar-search-button-width: 24px;
        display: grid;
        grid-template-columns:
            var(--menu-bar-mobile-action-width)
            minmax(48px, 0.8fr)
            minmax(76px, 1.1fr)
            minmax(48px, 0.8fr)
            minmax(96px, 1.4fr);
        width: 100%;
        max-width: 100vw;
        height: var(--location-navbar-row-height);
        min-height: var(--location-navbar-row-height);
        margin: 0;
        padding: 0;
        position: relative;
    }

    .location-home-link {
        width: var(--menu-bar-mobile-action-width);
        height: var(--location-navbar-row-height);
        min-height: var(--location-navbar-row-height);
    }

    .location-navbar-shell > .location-navbar-field,
    .location-navbar-shell > .location-navbar-search-cluster {
        min-width: 0;
    }

    .location-navbar-shell > .location-navbar-search-cluster {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--location-navbar-search-button-width);
        align-items: stretch;
        justify-items: stretch;
        width: auto;
        min-width: 0;
        border: var(--menu-bar-border-width) solid var(--menu-bar-action-background);
        background: var(--menu-bar-action-background);
        color: var(--menu-bar-action-color);
    }

    .location-navbar-shell .location-navbar-field,
    .location-navbar-shell .location-navbar-search-cluster {
        height: var(--location-navbar-row-height);
        min-height: var(--location-navbar-row-height);
    }

    .location-navbar-shell .location-navbar-field {
        grid-column: auto;
    }

    .location-navbar-field::after {
        right: 4px;
        width: var(--menu-bar-mobile-icon-size);
        height: 4px;
    }

    .location-navbar .filter-field select {
        padding: 4px 8px 4px 4px;
        font-size: var(--mobile-small-font-size);
        line-height: var(--mobile-small-line-height);
        white-space: nowrap;
    }

    .location-navbar.mobile-menu-bar.menu-bar--location .location-navbar-search-field {
        display: flex;
        align-self: stretch;
        height: 100%;
        min-height: 0;
        max-height: none;
    }

    .location-navbar.mobile-menu-bar.menu-bar--location .location-navbar-search-field .catalog-search-combobox {
        height: 100%;
        min-height: 0;
        max-height: none;
    }

    .location-navbar.mobile-menu-bar.menu-bar--location .location-navbar-search-field input {
        display: block;
        height: 100%;
        min-height: 0;
        max-height: none;
        padding: 0 4px;
        font-size: var(--mobile-small-font-size);
        line-height: var(--mobile-small-line-height);
    }

    .location-navbar-shell .location-navbar-search-cluster {
        grid-column: auto;
        grid-template-columns: minmax(0, 1fr) var(--location-navbar-search-button-width);
    }

    .mobile-menu-bar .location-navbar-search-button {
        position: relative;
        align-self: stretch;
        justify-self: stretch;
        height: 100%;
        min-height: 0;
        max-height: none;
        width: 100%;
        background: var(--menu-bar-action-background);
        color: var(--menu-bar-action-color);
        transform: none;
    }

    .mobile-menu-bar .location-navbar-search-icon {
        display: block;
        width: 12px;
        height: 12px;
    }

    .location-navbar .catalog-search-suggestion-value,
    .location-navbar .catalog-search-suggestion-meta {
        font-size: var(--mobile-small-font-size);
        line-height: var(--mobile-small-line-height);
    }

    .menu-bar--filters {
        --catalog-table-header-height: var(--menu-bar-mobile-height);
        grid-template-columns:
            minmax(68px, 1.2fr)
            minmax(80px, 1fr)
            minmax(80px, 1fr)
            minmax(68px, 0.9fr);
        width: 100%;
        max-width: 100%;
        height: var(--catalog-table-header-height);
        min-height: var(--catalog-table-header-height);
    }

    .table-filter-shell-content {
        width: 100%;
        padding: 0;
    }

    .table-filter-search-field {
        grid-column: auto;
        height: var(--catalog-table-header-height);
        min-height: var(--catalog-table-header-height);
        grid-template-columns: var(--menu-bar-mobile-icon-size) minmax(0, 1fr);
        gap: 4px;
        padding: 0 4px;
        border-width: 4px;
    }

    .table-filter-search-input {
        font-size: var(--menu-bar-font-size);
        line-height: var(--menu-bar-line-height);
    }

    .table-filter-top-booking-option,
    .table-filter-toggle-button {
        width: 100%;
        min-width: 0;
        min-height: var(--catalog-table-header-height);
        height: var(--catalog-table-header-height);
        justify-content: center;
        padding: 0 4px;
        gap: 4px;
        font-size: var(--menu-bar-font-size);
        line-height: var(--menu-bar-line-height);
        white-space: nowrap;
    }

    .table-filter-toggle-button[aria-expanded="true"]::after {
        bottom: -4px;
        width: 4px;
        height: 4px;
    }

    .menu-bar--sort.mobile-results-toolbar-content {
        --catalog-table-header-height: var(--menu-bar-mobile-height);
        --sort-menu-label-width: 48px;
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0;
        min-width: 0;
        padding: 0;
        border-bottom: 0;
    }

    .mobile-results-sort-field {
        position: relative;
        display: grid;
        grid-template-columns: var(--sort-menu-label-width) minmax(0, 1fr);
        gap: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: var(--catalog-table-header-height);
        min-height: var(--catalog-table-header-height);
    }

    .mobile-results-sort-field::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 8px;
        width: 0;
        height: 0;
        border-right: 4px solid transparent;
        border-left: 4px solid transparent;
        border-top: 4px solid var(--menu-bar-field-color);
        pointer-events: none;
        transform: translateY(-1px);
    }

    .mobile-results-sort-label {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        height: var(--catalog-table-header-height);
        min-height: var(--catalog-table-header-height);
        padding: 0 4px;
        font-weight: 800;
        text-transform: none;
        white-space: nowrap;
    }

    .mobile-results-sort-select {
        width: 100%;
        height: var(--catalog-table-header-height);
        min-height: var(--catalog-table-header-height);
        padding: 0 20px 0 4px;
        -webkit-appearance: none;
        appearance: none;
        background-image: none;
        font-weight: 800;
    }

    .mobile-results-sort-select:focus-visible {
        outline: 3px solid rgba(163, 21, 21, 0.22);
        outline-offset: 2px;
    }
}

@media (max-width: 640px) {
    .location-navbar-search-cluster {
        grid-template-columns: minmax(0, 1fr) var(--location-navbar-search-button-width);
    }

    .location-navbar-search-button {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .menu-bar--sort.mobile-results-toolbar-content {
        --sort-menu-label-width: 48px;
    }
}
