/*
 * geo_picker — baseline-стили.
 * Триггер в шапке (иконка + текущий город) + полноэкранная тёмная шторка
 * со списком городов в несколько колонок, сгруппированных по первой букве.
 * Число колонок задаётся через CSS custom-property --geo-picker-cols-*.
 */

.geo_picker {
    --geo-picker-ink:            #ffffff;
    --geo-picker-muted:          rgba(255, 255, 255, 0.75);
    --geo-picker-accent:         #e34c26;
    --geo-picker-backdrop:       rgba(0, 0, 0, 0.9);
    --geo-picker-panel-bg:       transparent;
    --geo-picker-trigger-ink:    inherit;
    --geo-picker-trigger-accent: #e34c26;
    --geo-picker-cols-desktop:   4;
    --geo-picker-cols-tablet:    3;
    --geo-picker-cols-mobile:    1;

    display: inline-flex;
    align-items: center;
    font-family: inherit;
}

/* ---- trigger --------------------------------------------------------- */
.geo_picker__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--geo-picker-trigger-ink);
    font: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: color 0.15s ease;
}

.geo_picker__trigger:hover {
    color: var(--geo-picker-trigger-accent);
}

.geo_picker__trigger-label {
    border-bottom: 1px dotted currentColor;
    line-height: 1.2;
}

.geo_picker__icon {
    flex: 0 0 auto;
    color: currentColor;
}

/* ---- overlay --------------------------------------------------------- */
.geo_picker__overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.geo_picker__overlay[hidden] {
    display: none;
}

.geo_picker__backdrop {
    position: fixed;
    inset: 0;
    background: var(--geo-picker-backdrop);
    z-index: 0;
}

.geo_picker__panel {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px 48px;
    color: var(--geo-picker-ink);
    background: var(--geo-picker-panel-bg);
}

/* ---- head (title + close + search) ---------------------------------- */
.geo_picker__head {
    position: relative;
    padding-bottom: 0;
    margin-bottom: 28px;
}

.geo_picker__title {
    margin: 0;
    padding-right: 64px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.geo_picker__close {
    position: absolute;
    top: -6px;
    right: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--geo-picker-ink);
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.15s ease;
}

.geo_picker__close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.geo_picker__search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.geo_picker__search-icon {
    color: var(--geo-picker-muted);
    flex: 0 0 auto;
}

.geo_picker__search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--geo-picker-ink);
    font: inherit;
    font-size: 15px;
    padding: 4px 0;
}

.geo_picker__search-input::placeholder {
    color: var(--geo-picker-muted);
    opacity: 1;
}

.geo_picker__search-input:focus {
    outline: none;
}

/* ---- cities list: multi-column via CSS columns (A-Z flow сверху вниз) */
.geo_picker__cities {
    column-count: var(--geo-picker-cols-mobile);
    column-gap: 28px;
}

@media (min-width: 640px) {
    .geo_picker__cities {
        column-count: var(--geo-picker-cols-tablet);
    }
}

@media (min-width: 1024px) {
    .geo_picker__cities {
        column-count: var(--geo-picker-cols-desktop);
    }
}

.geo_picker__group {
    display: inline-block;
    width: 100%;
    margin-bottom: 24px;
    break-inside: avoid-column;
    page-break-inside: avoid;
}

.geo_picker__group[hidden] {
    display: none;
}

.geo_picker__letter {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--geo-picker-ink);
}

.geo_picker__city-row[hidden] {
    display: none;
}

.geo_picker__city-link {
    display: inline-block;
    padding: 4px 0;
    color: var(--geo-picker-ink);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.geo_picker__city-link:hover {
    color: var(--geo-picker-accent);
    text-decoration: underline;
}

.geo_picker__empty {
    margin-top: 24px;
    text-align: center;
    color: var(--geo-picker-muted);
    font-size: 14px;
}

.geo_picker__empty[hidden] {
    display: none;
}

/* ---- body lock when overlay open ------------------------------------ */
body.is-geo-picker-open {
    overflow: hidden;
}
