/* Location chip, soft prompt, city picker */

.tb-loc-chip {
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #24272c;
    border-radius: 999px;
    min-height: 36px;
    padding: 0 12px 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    max-width: 160px;
    flex-shrink: 0;
    transition: border-color .15s, color .15s, background .15s;
}

.tb-loc-chip:hover,
.tb-loc-chip:focus {
    border-color: #d81416;
    color: #d81416;
    outline: none;
}

.tb-loc-chip__pin {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    flex-shrink: 0;
}

.tb-loc-chip.is-set .tb-loc-chip__pin {
    background: #d81416;
}

.tb-loc-chip__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-loc-chip__caret {
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    opacity: 0.7;
    flex-shrink: 0;
}

.tb-header__loc {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Soft bottom prompt */
.tb-loc-soft {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1150;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .22s ease, transform .22s ease;
}

.tb-loc-soft.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.tb-loc-soft__inner {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(18, 24, 38, 0.16);
    padding: 14px 14px 12px;
    max-width: 520px;
    margin: 0 auto;
}

.tb-loc-soft__title {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: #12263a;
}

.tb-loc-soft__sub {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.tb-loc-soft__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tb-loc-btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.tb-loc-btn--primary {
    background: #d81416;
    color: #fff;
}

.tb-loc-btn--secondary {
    background: #fff;
    color: #d81416;
    border: 1.5px solid #d81416;
}

.tb-loc-btn--ghost {
    background: transparent;
    color: #6b7280;
    font-weight: 600;
}

/* Sheet */
.tb-loc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(18, 24, 38, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.tb-loc-overlay[hidden] {
    display: none !important;
}

.tb-loc-sheet {
    width: min(480px, 100%);
    max-height: min(88vh, 640px);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tb-loc-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f2f5;
}

.tb-loc-sheet__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #12263a;
}

.tb-loc-sheet__close {
    appearance: none;
    border: 0;
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #4b5563;
    cursor: pointer;
}

.tb-loc-sheet__body {
    padding: 14px 16px 20px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.tb-loc-gps-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    appearance: none;
    border: 1px solid #e8ecf0;
    background: #fafbfc;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    margin-bottom: 14px;
}

.tb-loc-gps-row strong {
    display: block;
    font-size: 14px;
    color: #12263a;
}

.tb-loc-gps-row small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #6b7280;
}

.tb-loc-gps-row__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff5f5;
    border: 1px solid #f3c6c7;
    position: relative;
    flex-shrink: 0;
}

.tb-loc-gps-row__icon::before {
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 50%;
    background: #d81416;
}

.tb-loc-sheet__label {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
}

.tb-loc-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tb-loc-city {
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #24272c;
    border-radius: 999px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tb-loc-city:hover,
.tb-loc-city:focus {
    border-color: #d81416;
    color: #d81416;
}

.tb-loc-search-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.tb-loc-search {
    width: 100%;
    min-height: 42px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    margin-bottom: 8px;
}

.tb-loc-search:focus {
    outline: none;
    border-color: #d81416;
}

.tb-loc-search-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.tb-loc-search-item {
    appearance: none;
    border: 0;
    background: #f8f9fb;
    text-align: left;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #12263a;
    cursor: pointer;
}

.tb-loc-search-item span {
    font-weight: 400;
    color: #6b7280;
    margin-left: 6px;
    font-size: 12px;
}

.tb-loc-search-empty {
    margin: 0;
    padding: 8px 4px;
    font-size: 13px;
    color: #6b7280;
}

.tb-loc-search-loading {
    margin: 6px 0 0;
    padding: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.tb-loc-status {
    margin: 10px 0 0;
    font-size: 13px;
    color: #059669;
}

.tb-loc-status.is-error {
    color: #d81416;
}

body.tb-loc-open {
    overflow: hidden;
}

/* Detail price city affordance */
.hero-price-meta[data-tb-loc-open],
.tb-loc-price-link {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (min-width: 768px) {
    .tb-loc-overlay {
        align-items: center;
        padding: 24px;
    }

    .tb-loc-sheet {
        border-radius: 16px;
        max-height: 80vh;
    }

    .tb-loc-soft {
        left: auto;
        right: 24px;
        bottom: 24px;
        width: 380px;
    }
}

@media (max-width: 767px) {
    .tb-header__loc {
        margin-left: 0;
        max-width: 120px;
    }

    .tb-loc-chip {
        max-width: 100%;
        min-height: 32px;
        padding: 0 10px 0 8px;
        font-size: 12px;
    }

    body.has-detail-sticky-cta .tb-loc-soft {
        bottom: 76px;
    }
}
