/* Search forms of the stay pages: fields with a clear button, Jalali date fields, city suggestions. */

.stay-field {
    position: relative;
}

/* Room for the clear button on the END side (left in RTL, right in LTR), the side the text does not start on. */
.stay-field .form-control {
    padding-inline-end: 2.25rem;
}

.stay-clear {
    position: absolute;
    inset-inline-end: .4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.stay-clear:hover,
.stay-clear:focus-visible {
    background: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-body-color, #212529);
}

.stay-clear[hidden] {
    display: none;
}

.stay-date-text {
    cursor: pointer;
    background-color: var(--bs-body-bg, #fff);
}

.stay-suggest {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    margin-top: .25rem;
    z-index: 1050;
    max-height: 19rem;
    overflow-y: auto;
    padding: 0;
    list-style: none;
    /* the rows are plain <li>, not .list-group-item, so the box has to paint its own background */
    background-color: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--bs-border-radius, .375rem);
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .18);
}

.stay-suggest[hidden] {
    display: none;
}

.stay-suggest .stay-suggest-head {
    font-size: .75rem;
    color: var(--bs-secondary-color, #6c757d);
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.stay-suggest .stay-suggest-item {
    cursor: pointer;
}

.stay-suggest .stay-suggest-item + .stay-suggest-item {
    border-top: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, .175));
}

.stay-suggest .stay-suggest-item.active,
.stay-suggest .stay-suggest-item:hover {
    background: var(--bs-primary-bg-subtle, #cfe2ff);
}

/* the date picker pops up above the hero and the sticky price card */
.datepicker-plot-area {
    z-index: 1060 !important;
    font-family: inherit;
}

/*
 * Pagination of the stay pages. Bootstrap rounds .page-item:first-child on the LEFT and overlaps buttons with
 * margin-left, which is wrong when the page is RTL (page 1 is on the right). Logical properties follow the direction:
 * the first button is rounded on its start side, the last one on its end side, and the 1px overlap is on the start side.
 */
.pagination.stay-pagination {
    padding: 0;
}

.pagination.stay-pagination .page-item .page-link {
    margin-left: 0;
    margin-inline-start: -1px;
    border-radius: 0;
}

.pagination.stay-pagination .page-item:first-child .page-link {
    margin-inline-start: 0;
    border-start-start-radius: var(--bs-pagination-border-radius, .375rem);
    border-end-start-radius: var(--bs-pagination-border-radius, .375rem);
}

.pagination.stay-pagination .page-item:last-child .page-link {
    border-start-end-radius: var(--bs-pagination-border-radius, .375rem);
    border-end-end-radius: var(--bs-pagination-border-radius, .375rem);
}

/* soft badges: the site's Bootstrap build has no *-subtle colours */
.badge.stay-badge-green {
    background-color: #d1e7dd;
    color: #0a3622;
}

.badge.stay-badge-red {
    background-color: #f8d7da;
    color: #58151c;
}

/* "showing the stored copy" notice of the refresh status line */
.stay-status-warn {
    color: #997404;
}
