/* Home search: use the shared brand palette. */
.search-panel-wrap {
    margin-top: -40px;
}

.search-panel {
    --search-tint: #edf5f5;
    --search-muted: #526b77;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgb(6 75 97 / 9%);
    overflow: visible;
}

.search-panel-heading {
    display: flex;
    margin-bottom: 10px;
    justify-content: space-between;
}

.search-panel .search-tabs {
    display: flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid #dfebec;
    border-radius: 9999999px;
    background: var(--search-tint);
}

.search-panel .search-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 14px;
    border: 0;
    border-radius: 9999999px;
    background: transparent;
    color: var(--search-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
    transition: background .18s, color .18s;
}

.search-panel .search-tab i {
    font-size: 15px;
}

.search-panel .search-tab:hover {
    background: #dcebed;
    color: var(--navy);
}

.search-panel .search-tab.is-active {
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 3px 8px rgb(6 75 97 / 14%);
}

.search-panel .search-form {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.25fr) minmax(0, .75fr) 150px;
    align-items: stretch;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.search-panel .search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 60px;
    padding: 9px 12px;
    border: 1px solid #d7e3e7;
    border-radius: 9999999px;
    background: #fafcfc;
    transition: border-color .18s, box-shadow .18s;
}

.search-panel .search-field:hover {
    border-color: #8eafb7;
}

.search-panel .search-field:focus-within {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgb(6 75 97 / 10%);
    background: var(--white);
}

.search-panel .search-field[hidden] {
    display: none !important;
}

.search-panel .search-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    height: 24px;
    background: transparent;
    color: var(--navy);
    font-size: 17px;
}

.search-panel .search-field-content {
    flex: 1;
    min-width: 0;
}

.search-panel .search-field-content label {
    display: block;
    margin: 0 0 3px;
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.search-panel .search-field-content input[type="text"],
.search-panel .duration-trigger,
.search-panel .guest-summary {
    display: block;
    width: 100%;
    min-width: 0;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    caret-color: var(--navy);
    text-align: left;
    box-shadow: none;
}

.search-panel .search-field-content input::placeholder {
    color: #81969f;
    font-size: 13px;
    font-weight: 400;
    opacity: 1;
}

.search-panel .search-field-content input:focus {
    outline: none;
}

.search-panel .search-field-content input[readonly], .search-panel .duration-trigger {
    cursor: pointer;
}

.search-panel .search-field-arrow {
    position: absolute;
    top: 50%;
    right: 16px;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    color: #7b929b;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-panel .search-field-arrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .18s ease;
}

.search-panel .search-field:has([aria-expanded="true"]) > .search-field-arrow::before,
.search-panel [aria-expanded="true"] .search-field-arrow::before {
    transform: translateY(2px) rotate(225deg);
}

.search-panel .location-field .search-field-content,
.search-panel .duration-field .search-field-content,
.search-panel .guest-field .search-field-content {
    padding-right: 22px;
}

.search-panel .guest-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.search-panel .search-field span {
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.search-panel .search-submit {
    grid-column: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    min-height: 52px;
    padding: 12px;
    border: 0;
    border-radius: 9999999px;
    background: var(--orange);
    color: var(--white);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgb(200 90 11 / 16%);
    transition: background .18s, transform .18s;
}

.search-panel .search-submit:hover {
    background: #a84908;
}

.search-panel .search-submit:active {
    transform: translateY(1px);
}

.search-panel button:focus-visible, .search-panel #shortTermDate:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
}

.search-panel .location-suggestions-message {
    margin: 0;
    padding: 12px 10px;
    color: var(--search-muted);
    font-size: 13px;
    line-height: 1.6;
}

.search-panel .search-error {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff2eb;
    color: #963d06;
    font-size: 13px;
}

.search-panel .search-field:has([aria-invalid="true"]) {
    border-color: var(--orange);
}

.search-panel .location-suggestions, .search-panel .duration-dropdown, .search-panel .guest-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1050;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 12px 32px rgb(6 75 97 / 15%);
}

.search-panel .location-suggestions[hidden], .search-panel .duration-dropdown[hidden] {
    display: none;
}

.search-panel .location-suggestions {
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.search-panel .location-suggestions-title, .search-panel .duration-dropdown-title {
    padding: 8px 10px 12px;
    color: var(--search-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
}

.search-panel .location-suggestion, .search-panel .duration-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-align: left;
}

.search-panel .location-suggestion:hover, .search-panel .duration-option:hover, .search-panel .duration-option.is-selected {
    background: var(--search-tint);
    color: var(--navy);
}

.search-panel .location-suggestion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--search-tint);
    color: var(--navy);
}

.search-panel .location-suggestion-text {
    flex: 1;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.search-panel .location-highlight {
    display: inline;
    padding: 0;
    border-radius: 2px;
    background: #fff0de;
    color: #a84908;
    font-weight: 700;
}

.search-panel .duration-option i {
    display: none;
    color: var(--navy);
}

.search-panel .duration-option.is-selected i {
    display: inline-block;
}

.search-panel .guest-dropdown {
    display: none;
    left: auto;
    width: 300px;
}

.search-panel .guest-dropdown.show {
    display: block;
}

.search-panel .guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 4px 18px;
}

.search-panel .guest-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-panel .guest-info strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
}

.search-panel .guest-info small {
    color: var(--search-muted);
    font-size: 12px;
}

.search-panel .guest-counter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-panel .guest-counter span {
    min-width: 18px;
    text-align: center;
    font-size: 14px;
}

.search-panel .guest-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #8eafb7;
    border-radius: 50%;
    background: var(--white);
    color: var(--navy);
    font-size: 23px;
    line-height: 1;
}

.search-panel .guest-btn:hover:not(:disabled) {
    background: var(--search-tint);
    border-color: var(--navy);
}

.search-panel .guest-btn:disabled {
    border-color: var(--line);
    color: #a8b7bf;
    cursor: not-allowed;
}

.search-panel .guest-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 4px 2px;
    border-top: 1px solid var(--line);
    color: var(--search-muted);
    font-size: 13px;
}

.search-panel .guest-total strong {
    color: var(--navy);
}

.search-panel .guest-done {
    min-height: 40px;
    padding: 8px 18px;
    border: 0;
    border-radius: 9999999px;
    background: var(--navy);
    color: var(--white);
    font-size: 13px;
    font-weight: 650;
}

@media (max-width: 1100px) {
    .search-panel .search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .search-panel .search-tab {
        white-space: nowrap;
    }
}

@media (max-width: 767px) {
    .search-panel-wrap {
        margin-top: -30px;
    }
    .search-panel {
        padding: 12px;
        border-radius: 14px;
    }
    .search-panel .search-tabs {
        width: 100%;
    }
    .search-panel .search-tab {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .search-panel {
        padding: 12px;
    }
    .search-panel .search-form {
        grid-template-columns: minmax(0, 1fr);
    }
    .search-panel .search-field {
        min-height: 60px;
        padding: 9px 12px;
    }
    .search-panel .search-field-content input[type="text"] {
        font-size: 16px;
    }
    .search-panel .search-tab {
        gap: 8px;
        min-height: 38px;
        padding: 6px 8px;
        font-size: 12px;
    }
    .search-panel .guest-dropdown {
        width: 100%;
    }
    .search-panel .datepicker-calendar {
        min-width: 0;
        width: 100%;
        padding: 12px 8px;
    }
}


.search-panel .location-field {
    position: relative;
    overflow: visible;
}

.search-panel .location-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: -10px;
    width: min(760px, calc(100vw - 32px));
    box-sizing: border-box;
    z-index: 1050;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 20px;

    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}

.search-panel .location-suggestions.only-areas,
.search-panel .location-suggestions.only-buildings {
    grid-template-columns: minmax(0, 1fr);
}

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

.search-panel .autocomplete-column {
    min-width: 0;
}

.search-panel .autocomplete-heading {
    margin-bottom: 14px;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
}

.search-panel .autocomplete-areas {
    padding-right: 12px;
    border-right: 1px solid #e5e7eb;
}

.search-panel .location-suggestions.only-areas .autocomplete-areas,
.search-panel .location-suggestions.only-buildings .autocomplete-areas {
    padding-right: 0;
    border-right: 0;
}

.search-panel .location-suggestions.only-buildings .autocomplete-areas {
    display: none;
}

.search-panel .location-suggestions.only-areas .autocomplete-buildings {
    display: none;
}

.search-panel .autocomplete-area,
.search-panel .autocomplete-building {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    text-align: left;
}

.search-panel .autocomplete-area:hover,
.search-panel .autocomplete-building:hover {
    background: #f3f6fa;
}

.search-panel .autocomplete-area-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: #066873 !important;
}
.search-panel .autocomplete-area-icon i{
    color: #a84908;
}

.search-panel .autocomplete-area-name {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.search-panel .autocomplete-buildings {
    max-height: 310px;
    overflow-y: auto;
}

.search-panel .autocomplete-building img {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
    background: #f3f4f6;
}

.search-panel .autocomplete-building-info {
    min-width: 0;
}

.search-panel .autocomplete-building-name,
.search-panel .autocomplete-building-address {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-panel .autocomplete-building-name {
    font-size: 14px;
    font-weight: 600;
}

.search-panel .autocomplete-building-address {
    margin-top: 5px;
    color: #778093;
    font-size: 12px;
}

.search-panel .autocomplete-empty {
    padding: 12px 8px;
    color: #89909c;
    font-size: 13px;
}

@media (max-width: 767px) {
    .search-panel .location-suggestions {
        width: calc(100vw - 32px);
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        max-height: 65vh;
        overflow-y: auto;
        padding: 14px;
    }

    .search-panel .autocomplete-areas {
        padding-right: 0;
        border-right: 0;
    }

    .search-panel .autocomplete-buildings {
        max-height: none;
        padding-top: 12px;
        border-top: 1px solid #e5e7eb;
    }
}
.search-panel .location-suggestions.only-message {
    display: block;
}

.search-panel .only-message .autocomplete-column {
    display: none;
}

.search-panel .location-suggestions-message[hidden] {
    display: none;
}

.search-panel .autocomplete-area:focus-visible,
.search-panel .autocomplete-building:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: -2px;
}
