/* ==========================================================================
   Search location picker (_SearchLocationModal.cshtml)
   The standard .listing-about-modal pattern, styled here because the page CSS that styles
   that pattern (listing.css, my-profile.css) is not loaded on every page. Two-class
   selectors so these rules win over that page CSS where it is loaded.
   White and black; the brand yellow only on the main action.
   ========================================================================== */

.search-location-modal.listing-about-modal {
    position: fixed;
    inset: 0;
    z-index: 10005; /* above the header, hero and sticky bars */
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.search-location-modal.listing-about-modal:not(.hidden) {
    display: flex;
}

.search-location-modal .search-location-modal__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgb(0 0 0 / .5);
    cursor: pointer;
    opacity: 0;
    transition: opacity .25s ease;
}

.search-location-modal .search-location-modal__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    padding: 20px 16px 16px;
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 24px 64px rgb(0 0 0 / .18);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

.search-location-modal.is-open .search-location-modal__backdrop {
    opacity: 1;
}

.search-location-modal.is-open .search-location-modal__panel {
    transform: translateY(0);
}

@media (min-width: 640px) {
    .search-location-modal.listing-about-modal {
        align-items: center;
        padding: 24px 16px;
    }

    .search-location-modal .search-location-modal__panel {
        max-width: 560px;
        max-height: min(865px, 90vh);
        padding: 32px;
        border-radius: 30px;
        opacity: 0;
        transform: translateY(12px);
        transition: opacity .25s ease, transform .25s ease;
    }

    .search-location-modal.is-open .search-location-modal__panel {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-location-modal__close {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.search-location-modal__close img {
    transform: rotate(-90deg);
}

.search-location-modal__title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -1.5px;
    color: #0B0B0B;
}

.search-location-modal__desc {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #71717A;
    overflow-wrap: anywhere;
}

@media (min-width: 640px) {
    .search-location-modal__title {
        font-size: 28px;
    }
}

.search-location-modal__body {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
}

/* "Use my current location" */
.search-location-gps {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    background: #fff;
    color: #0B0B0B;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.search-location-gps:hover {
    background: #F7F7F7;
    border-color: #D4D4D4;
}

.search-location-gps:disabled {
    cursor: progress;
    opacity: .7;
}

.search-location-gps__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0B0B0B;
    color: #fff;
}

.search-location-gps__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.search-location-gps__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.search-location-gps__hint {
    font-size: 13px;
    line-height: 1.4;
    color: #71717A;
}

.search-location-gps__chevron {
    flex-shrink: 0;
    color: #71717A;
}

/* "or choose an area" */
.search-location-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    font-size: 13px;
    color: #71717A;
}

.search-location-divider::before,
.search-location-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #E5E5E5;
}

/* Division / district / thana */
.search-location-fields {
    display: grid;
    gap: 12px;
}

.search-location-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0B0B0B;
}

.search-location-optional {
    font-weight: 400;
    color: #71717A;
}

.search-location-select-wrap {
    position: relative;
}

.search-location-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #0B0B0B;
    border-bottom: 1.5px solid #0B0B0B;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.search-location-select {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    background: #fff;
    font-size: 15px; /* 15px+ keeps iOS from zooming on focus */
    color: #0B0B0B;
    appearance: none;
    outline: none;
    transition: border-color .15s ease;
}

.search-location-select:focus {
    border-color: #0B0B0B;
}

.search-location-select:disabled {
    background: #F7F7F7;
    color: #A1A1AA;
    cursor: not-allowed;
}

/* "Use this location for my future searches" */
.search-location-remember {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #F7F7F7;
    font-size: 14px;
    line-height: 1.4;
    color: #0B0B0B;
    cursor: pointer;
    user-select: none;
}

.search-location-remember input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #0B0B0B;
    cursor: pointer;
}

.search-location-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #F0F0F0;
}

/* The one highlighted action: brand yellow */
.search-location-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    padding: 13px 24px;
    border: 0;
    border-radius: 9999px;
    background: var(--color-secondary, #ffc107);
    color: #0B0B0B;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease;
}

.search-location-apply:hover:not(:disabled) {
    background: #F5B400;
}

.search-location-apply:disabled {
    background: #F0F0F0;
    color: #A1A1AA;
    cursor: not-allowed;
}

.search-saved-location__action:focus-visible,
.search-location-apply:focus-visible,
.search-location-gps:focus-visible,
.search-location-modal__close:focus-visible {
    outline: 2px solid #0B0B0B;
    outline-offset: 2px;
}

/* Search page: "Searching in Uttara, your saved location · Change · Don't use it" */
.search-saved-location {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #71717A;
}

.search-saved-location[hidden] {
    display: none;
}

.search-saved-location strong {
    font-weight: 600;
    color: #0B0B0B;
}

.search-saved-location__action {
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: #0B0B0B;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* Place picker: "Which mirpur?" — one row per place */
.search-place-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.search-place-option {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    background: #fff;
    color: #0B0B0B;
    text-decoration: none;
}

.search-place-option:hover {
    background: #F7F7F7;
    border-color: #D4D4D4;
    color: #0B0B0B;
}

.search-place-option:focus-visible {
    outline: 2px solid #0B0B0B;
    outline-offset: 2px;
}

.search-place-option__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.search-place-option__name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.search-place-option__meta {
    font-size: 13px;
    line-height: 1.4;
    color: #71717A;
}

.search-place-option__chevron {
    flex-shrink: 0;
    color: #71717A;
}

/* "Search all places named Mirpur", under the scrolling list */
.search-place-all {
    flex-shrink: 0;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F0F0F0;
}

.search-place-all:has(> [hidden]) {
    display: none;
}

.search-place-all__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    background: #0B0B0B;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.search-place-all__btn[hidden] {
    display: none;
}

.search-place-all__btn:hover {
    background: #27272A;
    color: #fff;
}

.search-place-all__btn:focus-visible {
    outline: 2px solid #0B0B0B;
    outline-offset: 2px;
}

/* "No listings in Kalaroa yet. Showing 12 results in Satkhira." */
.search-saved-location__link {
    font-weight: 600;
    color: #0B0B0B;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.search-saved-location__link:hover,
.search-saved-location__action:hover {
    color: #52525B;
}

@media (prefers-reduced-motion: reduce) {
    .search-location-modal .search-location-modal__backdrop,
    .search-location-modal .search-location-modal__panel {
        transition: none;
    }
}
