#locationModalOverlay {
    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);
}

#locationModalOverlay.active {
    display: flex;
}

#locationModalOverlay .location-modal-content {
    width: min(720px, calc(100vw - 32px));
    max-width: none;
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    padding: 0;
    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;
}

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

#locationModalOverlay .modal-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.01em;
}

#locationModalOverlay .location-modal-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;
    font: 400 22px/1 Arial, sans-serif;
    cursor: pointer;
    transition: .2s;
}

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

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

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

#locationModalOverlay .location-country-dropdown {
    position: relative;
    width: 190px;
    min-width: 190px;
    height: 44px;
    flex: none;
}

#locationModalOverlay .location-country-dropdown .dropdown-selected {
    height: 44px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 0 40px 0 16px;
    border: 1px solid #e8e4e1;
    border-radius: 14px;
    background: #fff;
    color: #1a1a1a;
    font: 600 14px Montserrat, Arial, sans-serif;
    cursor: pointer;
}

#locationModalOverlay .location-country-dropdown .dropdown-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 12px;
    height: auto;
    transform: translateY(-50%);
    pointer-events: none;
}

#locationModalOverlay .location-country-dropdown .dropdown-list {
    z-index: 20;
    margin-top: 6px;
    overflow: hidden;
    border: 1px solid #e8e4e1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(26, 26, 26, .12);
}

#locationModalOverlay .location-country-dropdown .dropdown-list li {
    padding: 11px 16px;
    color: #1a1a1a;
    font: 500 14px Montserrat, Arial, sans-serif;
    cursor: pointer;
}

#locationModalOverlay .location-country-dropdown .dropdown-list li:hover {
    background: rgba(var(--site-accent-rgb, 156, 28, 79), .07);
}

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

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

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

#locationModalOverlay .location-modal-search img {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    opacity: .55;
    pointer-events: none;
}

#locationModalOverlay .location-modal-subtitle,
#locationModalOverlay .location-modal-list-title {
    color: #8a8480;
    font-size: 13px;
    font-weight: 600;
}

#locationModalOverlay .location-modal-subtitle {
    margin-bottom: 10px;
}

#locationModalOverlay .location-modal-list-title {
    margin: 20px 0 8px;
    color: var(--site-accent, #9C1C4F);
    font-weight: 700;
}

#locationModalOverlay .quick-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

#locationModalOverlay .quick-city {
    padding: 10px 16px;
    border: 1px solid #e8e4e1;
    border-radius: 999px;
    background: #fff;
    color: #1a1a1a;
    font: 600 14px Montserrat, Arial, sans-serif;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: .2s;
}

#locationModalOverlay .quick-city:hover {
    border-color: rgba(var(--site-accent-rgb, 156, 28, 79), .5);
    background: #fff;
}

#locationModalOverlay .quick-city.active {
    border-color: var(--site-accent, #9C1C4F);
    background: rgba(var(--site-accent-rgb, 156, 28, 79), .1);
    color: var(--site-accent, #9C1C4F);
    font-weight: 700;
    text-decoration: none;
}

#locationModalOverlay .location-grid {
    columns: 3 180px;
    column-gap: 24px;
    display: block;
    max-height: none;
    margin: 0;
    overflow: visible;
}

#locationModalOverlay .letter-column {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0 8px;
    margin-bottom: 18px;
    padding: 0;
    break-inside: avoid;
    background: transparent;
}

#locationModalOverlay .letter-header {
    min-width: 0;
    margin: 0;
    padding-top: 6px;
    border: 0;
    color: rgba(var(--site-accent-rgb, 156, 28, 79), .28);
    font: 800 26px/1 Montserrat, Arial, sans-serif;
    text-align: left;
}

#locationModalOverlay .location-list {
    flex: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

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

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

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

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

#locationModalOverlay .location-modal-foot .filter-clear:hover {
    color: var(--site-accent, #9C1C4F);
    background: rgba(var(--site-accent-rgb, 156, 28, 79), .06);
}

#locationModalOverlay .location-modal-foot .filter-search {
    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) {
    #locationModalOverlay {
        align-items: flex-end;
        padding: 0;
    }

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

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

    #locationModalOverlay .location-modal-top-row {
        flex-wrap: wrap;
    }

    #locationModalOverlay .location-country-dropdown,
    #locationModalOverlay .location-modal-search {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }

    #locationModalOverlay .location-grid {
        columns: 2 140px;
    }
}
