/* Shared offer/coupon search + location filter (toolbar, bottom sheet, responsive modal). */

.offer-list-filter-toolbar {
    min-width: 0;
}

.offer-list-filter-toolbar .icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Mobile / default: bottom sheet */
.location-filter-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.45);
}

.location-filter-bottom-sheet {
    width: 100%;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.location-filter-sheet-handle {
    width: 44px;
    height: 4px;
    flex: 0 0 auto;
    align-self: center;
    margin-top: 10px;
    border-radius: 999px;
    background-color: #ced4da;
}

.location-filter-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.location-filter-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
}

.location-filter-sheet-section {
    min-width: 0;
}

.location-filter-sheet-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0));
    border-top: 1px solid #e9ecef;
    background-color: #fff;
}

.location-filter-sheet-footer .btn {
    flex: 1 1 0;
}

.location-filter-tree {
    min-width: 0;
}

/* md+: centered modal instead of bottom sheet */
@media (min-width: 768px) {
    .location-filter-sheet-backdrop {
        align-items: center;
    }

    .location-filter-bottom-sheet {
        max-width: 560px;
        margin-bottom: 0;
        border-radius: 1rem;
        max-height: min(82vh, 720px);
    }

    .location-filter-sheet-handle {
        display: none;
    }
}
