.city-selector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    color: #1f2d3d;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
}

.city-selector__label {
    color: #4f5d75;
    font-weight: 500;
}

.city-selector__button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #1f2d3d;
    border: 1px solid rgba(31, 45, 61, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
}

.city-selector__button:hover,
.city-selector__button:focus {
    background: #f2fbfb;
    border-color: #4cc2c0;
    color: #0f766e;
    box-shadow: 0 8px 18px rgba(76, 194, 192, 0.22);
}

.city-selector__chevron {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
}

.city-selector__name {
    min-width: 82px;
    max-width: 150px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-selector__hint {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(31, 45, 61, 0.06);
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.city-prompt {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    display: none;
    max-width: calc(100vw - 32px);
}

.city-prompt--visible {
    display: block;
}

.city-prompt__card {
    position: relative;
    padding: 18px 20px;
    width: min(320px, calc(100vw - 32px));
    max-width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(76, 194, 192, 0.35);
}

.city-prompt__text {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2d3d;
}

.city-prompt__text--secondary {
    margin-top: -4px;
    color: #4f5d75;
    font-size: 14px;
    font-weight: 600;
}

.city-prompt__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.city-prompt__close {
    position: absolute;
    right: 10px;
    top: 10px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6c7a89;
}

.city-button {
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.city-button--primary {
    background: #4cc2c0;
    color: #fff;
    border-color: #4cc2c0;
    box-shadow: 0 10px 24px rgba(76, 194, 192, 0.35);
}

.city-button--primary:hover,
.city-button--primary:focus {
    background: #31a39f;
}

.city-button--ghost {
    background: #f6f9fb;
    color: #1f2d3d;
    border-color: rgba(31, 45, 61, 0.15);
}

.city-button--ghost:hover,
.city-button--ghost:focus {
    color: #0f766e;
    border-color: #4cc2c0;
}

.city-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

body.city-modal-open {
    overflow: hidden;
}

.city-modal--open {
    display: flex;
}

.city-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.city-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 92vw);
    max-height: 90vh;
    overflow: hidden;
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.city-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #1f2d3d;
}

.city-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f1f5f9;
    border: 1px solid rgba(31, 45, 61, 0.12);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.2s ease;
}

.city-modal__close:hover,
.city-modal__close:focus {
    background: #e2e8f0;
    color: #0f766e;
    border-color: #4cc2c0;
}

.city-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.city-modal__option {

    border-radius: 12px;

    background: #fff;
    color: #1f2d3d;

    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.city-modal__option:hover,
.city-modal__option:focus {
    background: #e7f6f6;
    border-color: #4cc2c0;
    color: #0f766e;
    box-shadow: 0 12px 26px rgba(76, 194, 192, 0.2);
}

.city-selector--aside {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 2px 8px 0;
    margin: 4px 0 14px;
    border-bottom: 1px solid rgba(31, 45, 61, 0.08);
}

.city-selector--aside .city-selector__label {
    color: #6b7280;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.city-selector--aside .city-selector__button {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px;
    box-shadow: none;
    border-color: rgba(31, 45, 61, 0.08);
    background: #ffffff;
    color: #111827;
}

.city-selector--aside .city-selector__name {
    font-weight: 700;
}

.city-selector--aside .city-selector__hint {
    margin-left: auto;
    background: rgba(12, 74, 110, 0.08);
    color: #0f172a;
}

.right-menu .city-selector--aside {
    margin-top: 6px;
}

.mob-menu-city {
    display: none;
    padding: 6px 10px;
    background: transparent;
    border: none;
    color: #111827;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(0%);
    text-align: right;
    max-width: 55%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mob-menu-city__label {
    margin-right: 6px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    font-size: 11px;
}

.mob-menu-city__value {
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .city-prompt {
        left: 12px;
        right: 12px;
        bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        max-width: none;
        z-index: 2147483000;
    }

    .city-prompt__card {
        width: 100%;
        padding: 16px;
        border-radius: 14px;
    }

    .city-prompt__actions {
        gap: 8px;
        padding-right: 0;
    }

    .city-button {
        padding: 10px 12px;
        min-height: 44px;
    }

    .city-selector {
        width: 100%;
        justify-content: flex-start;
        padding: 8px 12px;
    }

    .city-selector__button {
        flex: 1 1 auto;
        justify-content: space-between;
    }

    .mob-menu-city {
        display: block;
        padding-right: 0;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 108px;
        max-width: 108px;
        text-align: right;
    }

    .mob-menu-city__label {
        display: none;
    }

    .mob-menu-city__value {
        display: block;
        max-width: 108px;
        font-size: 12px;
    }

    .primary-menu {
        position: relative;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }

    .primary-menu .showhide {
        padding-right: 118px;
    }

    .city-modal__dialog {
        width: 94vw;
        padding: 18px;
    }
}
