#cityModal .city-picker-dialog {
    width: min(1120px, calc(100vw - 40px));
    max-width: none;
    margin: 12px auto;
}

#cityModal .city-picker {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(22, 53, 71, 0.24);
}

#cityModal .city-picker .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px 16px;
    border-bottom: 1px solid #e4edf2;
}

#cityModal .city-picker .modal-title {
    margin: 0;
    color: #173d52;
    font-family: "PF DinText Cond Pro", Impact, "Arial Narrow", Helvetica, sans-serif;
    font-size: 29px;
    font-weight: 700;
    line-height: 1;
}

#cityModal .city-picker-subtitle {
    margin: 7px 0 0;
    color: #75909d;
    font-size: 14px;
    line-height: 1.35;
}

#cityModal .city-picker-close {
    margin: -7px -8px 0 12px;
    padding: 0 8px;
    color: #78919d;
    font-size: 31px;
    font-weight: 300;
    line-height: 1;
    opacity: 1;
}

#cityModal .city-picker-close:hover,
#cityModal .city-picker-close:focus {
    color: #007aad;
}

#cityModal .city-picker-toolbar {
    padding: 16px 24px 12px;
    background: #f7fafc;
}

#cityModal .city-picker-search {
    position: relative;
    display: flex;
    align-items: center;
}

#cityModal .city-picker-search-icon {
    position: absolute;
    left: 15px;
    z-index: 1;
    color: #6b8794;
    font-family: Arial, sans-serif;
    font-size: 25px;
    line-height: 1;
    transform: rotate(-20deg);
    pointer-events: none;
}

#cityModal .city-picker-search input {
    width: 100%;
    min-height: 48px;
    padding: 11px 44px 11px 43px;
    border: 1px solid #cbdce4;
    border-radius: 12px;
    outline: 0;
    background: #ffffff;
    color: #173d52;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(25, 69, 91, 0.04);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

#cityModal .city-picker-search input::placeholder {
    color: #91a6b0;
}

#cityModal .city-picker-search input:focus {
    border-color: #0084c4;
    box-shadow: 0 0 0 3px rgba(0, 132, 196, 0.14);
}

#cityModal .city-picker-search input[type="search"]::-webkit-search-cancel-button,
#cityModal .city-picker-search input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

#cityModal .city-picker-clear {
    position: absolute;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e8f1f5;
    color: #4f7281;
    font-size: 22px;
    line-height: 24px;
}

#cityModal .city-picker-clear:hover,
#cityModal .city-picker-clear:focus {
    background: #d7e8ef;
    color: #006a9e;
}

#cityModal .city-picker-meta {
    min-height: 18px;
    padding: 7px 2px 0;
    color: #78919d;
    font-size: 12px;
}

#cityModal .city-picker-list-wrap {
    display: block;
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: #b7cbd5 transparent;
    scrollbar-width: thin;
}

#cityModal .city-picker-list-wrap::-webkit-scrollbar {
    width: 8px;
}

#cityModal .city-picker-list-wrap::-webkit-scrollbar-thumb {
    border: 2px solid #ffffff;
    border-radius: 8px;
    background: #b7cbd5;
}

#cityModal .city-picker-section {
    min-height: 0;
}

#cityModal .city-picker-section-popular {
    flex: 0 0 auto;
}

#cityModal .city-picker-section-all {
    display: block;
    overflow: visible;
    border-top: 1px solid #e4edf2;
}

#cityModal .city-picker-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px 8px;
    color: #78919d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

#cityModal .city-picker-section-title::after {
    height: 1px;
    flex: 1;
    background: #d8e6ec;
    content: "";
}

#cityModal .city-picker-list {
    display: grid;
    gap: 9px;
    padding: 0 24px 14px;
    overscroll-behavior: contain;
}

#cityModal .city-picker-list-popular {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

#cityModal .city-picker-list-all {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-bottom: 22px;
    overflow: visible;
}

#cityModal .city-picker-item {
    display: flex;
    min-width: 0;
    min-height: 40px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #becbd0;
    border-radius: 0;
    background: #fbfcfc;
    color: #173d52;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

#cityModal .city-picker-item:hover,
#cityModal .city-picker-item:focus {
    border-color: #0084c4;
    background: #f0f8fc;
    color: #006a9e;
    text-decoration: none;
}

#cityModal .city-picker-item.active {
    border-color: #0084c4;
    background: #0084c4;
    color: #ffffff;
    text-decoration: none;
}

#cityModal .city-picker-item-title {
    overflow: hidden;
    flex: 1 1 auto;
    font-family: "PF DinText Cond Pro", Impact, "Arial Narrow", Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.05;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

#cityModal .city-picker-item-region {
    display: block;
    overflow: hidden;
    flex: 0 0 auto;
    margin: 0 0 0 8px;
    color: #78919d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cityModal .city-picker-item:hover .city-picker-item-region,
#cityModal .city-picker-item:focus .city-picker-item-region {
    color: #4f8298;
}

#cityModal .city-picker-item.active .city-picker-item-region {
    color: #ffffff;
}

#cityModal .city-picker-empty {
    display: flex;
    min-height: 180px;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #68828e;
    text-align: center;
}

#cityModal .city-picker-empty strong {
    color: #315a6b;
    font-size: 17px;
}

#cityModal .city-picker-empty-icon {
    display: block;
    margin-bottom: 2px;
    color: #91aab5;
    font-family: Arial, sans-serif;
    font-size: 33px;
    line-height: 1;
    transform: rotate(-20deg);
}

@media (max-width: 520px) {
    #cityModal .city-picker-dialog {
        width: calc(100vw - 16px);
        margin: 8px auto;
    }

    #cityModal .city-picker {
        height: calc(100vh - 16px);
        height: calc(100dvh - 16px);
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 15px;
    }

    #cityModal .city-picker .modal-header {
        padding: 18px 18px 13px;
    }

    #cityModal .city-picker .modal-title {
        font-size: 25px;
    }

    #cityModal .city-picker-subtitle {
        max-width: 235px;
        font-size: 13px;
    }

    #cityModal .city-picker-toolbar {
        padding: 12px 18px 9px;
    }

    #cityModal .city-picker-search input {
        min-height: 46px;
        font-size: 15px;
    }

    #cityModal .city-picker-section-title {
        padding-right: 18px;
        padding-left: 18px;
    }

    #cityModal .city-picker-list {
        padding-right: 18px;
        padding-left: 18px;
    }

    #cityModal .city-picker-list-popular,
    #cityModal .city-picker-list-all {
        grid-template-columns: 1fr;
    }

    #cityModal .city-picker-list-popular {
        padding-bottom: 10px;
    }

    #cityModal .city-picker-list-all {
        padding-bottom: 16px;
    }

    #cityModal .city-picker-item {
        min-height: 40px;
        padding: 7px 10px;
    }
}

@media (min-width: 521px) and (max-width: 900px) {
    #cityModal .city-picker-dialog {
        width: calc(100vw - 24px);
    }

    #cityModal .city-picker-list-popular,
    #cityModal .city-picker-list-all {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    #cityModal .city-picker-dialog {
        width: calc(100vw - 32px);
    }

    #cityModal .city-picker-list-all {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    #cityModal .city-picker-item,
    #cityModal .city-picker-search input {
        transition: none;
    }
}
