
.catalog-location-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(26, 26, 26, .55);
    backdrop-filter: blur(4px);
}

.catalog-location-modal-overlay.active {
    display: flex;
}

.catalog-location-modal {
    width: min(720px, calc(100vw - 32px));
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 30px 80px -20px rgba(26, 26, 26, .45);
    font-family: Montserrat, Arial, sans-serif;
}

.catalog-location-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    padding: 24px 28px 8px;
}

.catalog-location-modal-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.01em;
}

.catalog-location-close {
    width: 38px;
    height: 38px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e8e4e1;
    border-radius: 50%;
    background: #fff;
    color: #8a8480;
    cursor: pointer;
    transition: .2s;
}

.catalog-location-close:hover {
    color: var(--site-accent, #9C1C4F);
    border-color: rgba(var(--site-accent-rgb, 156, 28, 79), .5);
}

.catalog-location-modal-body {
    flex: 1 1 auto;
    min-height: min(440px, 55vh);
    overflow-y: auto;
    padding: 12px 28px 20px;
}

.catalog-location-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.catalog-location-country {
    min-width: 190px;
    height: 44px;
    padding: 0 40px 0 16px;
    border: 1px solid #e8e4e1;
    border-radius: 14px;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238A8480' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
    color: #1a1a1a;
    font: 600 14px Montserrat, Arial, sans-serif;
    cursor: pointer;
}

.catalog-location-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.catalog-location-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a8480;
    font-size: 14px;
    pointer-events: none;
}

.catalog-location-search input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    border: 1px solid #e8e4e1;
    border-radius: 14px;
    background: #f8f7f5;
    color: #1a1a1a;
    font: 500 14px Montserrat, Arial, sans-serif;
    outline: none;
    transition: .2s;
}

.catalog-location-search input:focus {
    border-color: var(--site-accent, #9C1C4F);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--site-accent-rgb, 156, 28, 79), .1);
}

.catalog-location-subtitle {
    margin-bottom: 10px;
    color: #8a8480;
    font-size: 13px;
    font-weight: 600;
}

.catalog-location-popular {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-location-quick {
    padding: 10px 16px;
    border: 1px solid #e8e4e1;
    border-radius: 999px;
    background: #fff;
    color: #1a1a1a;
    font: 600 14px Montserrat, Arial, sans-serif;
    cursor: pointer;
    transition: .2s;
}

.catalog-location-quick:hover {
    border-color: rgba(var(--site-accent-rgb, 156, 28, 79), .5);
}

.catalog-location-quick.is-selected {
    border-color: var(--site-accent, #9C1C4F);
    background: rgba(var(--site-accent-rgb, 156, 28, 79), .1);
    color: var(--site-accent, #9C1C4F);
}

.catalog-location-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 8px;
    padding: 10px 4px;
    border: 0;
    background: none;
    color: var(--site-accent, #9C1C4F);
    font: 700 14px Montserrat, Arial, sans-serif;
    cursor: pointer;
}

.catalog-location-more i {
    font-size: 11px;
    transition: transform .2s ease;
}

.catalog-location-more[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.catalog-location-cities {
    columns: 3 180px;
    column-gap: 24px;
}

.catalog-location-group {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0 8px;
    margin-bottom: 18px;
    break-inside: avoid;
}

.catalog-location-letter {
    padding-top: 6px;
    color: rgba(var(--site-accent-rgb, 156, 28, 79), .28);
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
}

.catalog-location-city {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #1a1a1a;
    text-align: left;
    font: 500 14px Montserrat, Arial, sans-serif;
    cursor: pointer;
    transition: .15s;
}

.catalog-location-city:hover {
    background: rgba(var(--site-accent-rgb, 156, 28, 79), .07);
}

.catalog-location-city.is-selected {
    background: rgba(var(--site-accent-rgb, 156, 28, 79), .12);
    color: var(--site-accent, #9C1C4F);
    font-weight: 700;
}

.catalog-location-empty {
    padding: 40px 0;
    color: #8a8480;
    text-align: center;
    font-size: 14px;
}

.catalog-location-modal-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 16px 28px;
    border-top: 1px solid #e8e4e1;
    background: #fff;
}

.catalog-location-current {
    margin-right: auto;
    color: #8a8480;
    font-size: 13px;
    font-weight: 600;
}

.catalog-location-link {
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #8a8480;
    font: 600 13px Montserrat, Arial, sans-serif;
    cursor: pointer;
}

.catalog-location-link:hover {
    color: var(--site-accent, #9C1C4F);
    background: rgba(var(--site-accent-rgb, 156, 28, 79), .06);
}

.catalog-location-apply {
    height: 44px;
    padding: 0 26px;
    border: 0;
    border-radius: 14px;
    background: var(--site-accent, #9C1C4F);
    color: #fff;
    font: 700 14px Montserrat, Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 14px -4px var(--site-accent, #9C1C4F);
}

@media (max-width: 640px) {
    .catalog-location-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .catalog-location-modal {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
    }

    .catalog-location-modal-head,
    .catalog-location-modal-body,
    .catalog-location-modal-foot {
        padding-left: 20px;
        padding-right: 20px;
    }

    .catalog-location-top-row {
        flex-wrap: wrap;
    }

    .catalog-location-country,
    .catalog-location-search {
        flex: 1 1 100%;
        width: 100%;
    }

    .catalog-location-cities {
        columns: 2 140px;
    }
}
