/* Region switcher. The details/summary foundation remains functional without JS. */
.region-selector {
    position: relative;
    z-index: 80;
    box-sizing: border-box;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: #081b33;
    font-family: Arial, sans-serif;
}

.region-selector *,
.region-selector *::before,
.region-selector *::after {
    box-sizing: border-box;
}

.region-selector .container {
    position: relative;
    width: min(1240px, calc(100% - 48px));
    margin-inline: auto;
}

.region-selector__popover {
    position: relative;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
}

.region-selector__inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: rgba(255, 255, 255, 0.72);
    border: 0;
    outline: 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.region-selector__inner::-webkit-details-marker {
    display: none;
}

.region-selector__inner:focus-visible {
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(113, 230, 208, 0.38);
}

.region-selector__pin {
    width: 26px;
    height: 26px;
    display: grid;
    flex: none;
    place-items: center;
    color: #71e6d0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.region-selector__pin svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.region-selector__label {
    font-size: 12px;
    font-weight: 550;
}

.region-selector__current {
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.region-selector__arrow {
    width: 17px;
    height: 17px;
    display: grid;
    flex: none;
    place-items: center;
    transition: transform 0.18s ease;
}

.region-selector__arrow svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transform: rotate(90deg);
}

.region-selector__popover[open] .region-selector__arrow {
    transform: rotate(180deg);
}

.region-selector__list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    width: min(370px, calc(100vw - 28px));
    overflow: hidden;
    color: #22374c;
    border: 1px solid #dce6ed;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 65px rgba(4, 18, 35, 0.22);
    text-align: left;
}

.region-selector__list-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 19px 20px 16px;
    border-bottom: 1px solid #e3ebf0;
    background: linear-gradient(135deg, #f8fcfd, #edf8f8);
}

.region-selector__list-head strong {
    color: #081b33;
    font-size: 16px;
    font-weight: 850;
}

.region-selector__list-head small {
    color: #64778a;
    font-size: 11px;
    line-height: 1.45;
}

.region-selector__items {
    display: grid;
    gap: 6px;
    padding: 8px;
}

.region-selector__item {
    min-width: 0;
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 12px;
    align-items: center;
    padding: 11px 12px 11px 14px;
    color: #22374c;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #ffffff;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.region-selector__item:hover,
.region-selector__item:focus-visible {
    color: #087b96;
    border-color: rgba(8, 123, 150, 0.22);
    outline: 0;
    background: #f1fafb;
    transform: translateX(2px);
    text-decoration: none;
}

.region-selector__item.is-active {
    color: #081b33;
    border-color: rgba(25, 185, 154, 0.25);
    background: #effaf8;
}

.region-selector__item > span:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.region-selector__item strong {
    font-size: 13px;
    font-weight: 800;
}

.region-selector__item small {
    overflow: hidden;
    color: #697c8e;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.region-selector__item-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #087b96;
    border-radius: 10px;
    background: #e4f5f7;
}

.region-selector__item.is-active .region-selector__item-mark {
    color: #08745f;
    background: #d9f5ef;
}

.region-selector__item-mark svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

@media (max-width: 700px) {
    .region-selector .container {
        width: calc(100% - 32px);
    }

    .region-selector__popover {
        width: 100%;
    }

    .region-selector__inner {
        width: 100%;
        min-height: 42px;
    }

    .region-selector__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .region-selector__current {
        font-size: 12px;
    }

    .region-selector__arrow {
        margin-left: auto;
    }

    .region-selector__list {
        right: 0;
        left: 0;
        width: 100%;
    }
}

@media (max-width: 390px) {
    .region-selector .container {
        width: calc(100% - 26px);
    }

    .region-selector__list {
        width: calc(100vw - 26px);
    }
}
