.geo-picker-trigger {
    cursor: pointer;
    caret-color: transparent;
    background-image: linear-gradient(45deg, transparent 50%, #717171 50%), linear-gradient(135deg, #717171 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 42px !important;
}

.geo-picker-trigger:focus {
    border-color: #ff7f00 !important;
    box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.12) !important;
    outline: none;
}

.geo-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    box-sizing: border-box;
    margin: 0;
    border: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: hidden;
    background: rgba(17, 17, 17, 0.64);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overscroll-behavior: none;
}

.geo-picker-backdrop::backdrop {
    background: transparent;
}

.geo-picker-backdrop.is-open {
    display: flex;
}

.geo-picker-sheet {
    width: min(560px, 100%);
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 18px 48px rgba(0, 0, 0, 0.18), 0 32px 90px rgba(0, 0, 0, 0.12);
    animation: geo-picker-enter 220ms ease-out;
}

.geo-picker-handle {
    width: 42px;
    height: 4px;
    margin: 10px auto 2px;
    border-radius: 99px;
    background: #d7d7d7;
}

.geo-picker-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 26px 16px;
}

.geo-picker-title {
    margin: 0;
    color: #222;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    text-wrap: balance;
}

.geo-picker-subtitle {
    margin: 6px 0 0;
    color: #717171;
    font-size: 14px;
}

.geo-picker-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition-property: background-color, scale;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
}

.geo-picker-close:hover {
    background: #ececec;
}

.geo-picker-close:active {
    scale: 0.96;
}

.geo-picker-search-wrap {
    position: relative;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 26px 18px;
    padding: 0 16px;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    background: #f8f8f8;
    transition-property: border-color, box-shadow, background-color;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
}

.geo-picker-search-wrap:focus-within {
    border-color: #ff7f00;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.12);
}

dialog.geo-picker-backdrop .geo-picker-search {
    flex: 1;
    min-width: 0;
    width: 100%;
    min-height: 50px;
    height: 50px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    color: #222;
    font: inherit;
    box-shadow: none !important;
    outline: none !important;
}

dialog.geo-picker-backdrop .geo-picker-search:focus {
    border: 0 !important;
    box-shadow: none !important;
    outline: none;
}

.geo-picker-search::-webkit-search-cancel-button,
.geo-picker-search::-webkit-search-decoration {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    -webkit-appearance: none !important;
}

.geo-picker-search::-ms-clear,
.geo-picker-search::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

.geo-picker-search-icon {
    position: static;
    width: 20px;
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    color: #777;
    pointer-events: none;
}

.geo-picker-list {
    max-height: min(420px, calc(100vh - 260px));
    max-height: min(420px, calc(100dvh - 260px));
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding: 0 26px 26px;
    overscroll-behavior: contain;
}

dialog.geo-picker-backdrop .geo-picker-option {
    width: 100%;
    min-height: 60px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px 10px 16px !important;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #292929;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
    transition-property: background-color, box-shadow, scale;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
}

dialog.geo-picker-backdrop .geo-picker-option:hover,
dialog.geo-picker-backdrop .geo-picker-option:focus-visible {
    background: #fff7ef;
    box-shadow: 0 0 0 1px rgba(255, 127, 0, 0.22), 0 4px 14px rgba(255, 127, 0, 0.08);
    outline: none;
}

dialog.geo-picker-backdrop .geo-picker-option:active {
    scale: 0.96;
}

.geo-picker-option-main {
    display: block;
    font-size: 15px;
    font-weight: 600;
}

.geo-picker-option-meta {
    display: none;
    margin-top: 3px;
    color: #717171;
    font-size: 13px;
    font-weight: 400;
}

.geo-picker-check {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #d5d5d5;
    border-radius: 50%;
    color: transparent;
}

.geo-picker-option.is-selected .geo-picker-check {
    border-color: #ff7f00;
    background: #ff7f00;
    color: #fff;
}

.geo-picker-state {
    min-height: 150px;
    padding: 46px 20px;
    color: #717171;
    text-align: center;
}

.geo-picker-retry {
    min-height: 44px;
    margin-top: 16px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #ff7f00;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

body.geo-picker-locked {
    overflow: hidden;
}

@keyframes geo-picker-enter {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .geo-picker-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .geo-picker-sheet {
        width: 100%;
        max-height: 88vh;
        max-height: 88dvh;
        border-width: 1px 0 0;
        border-radius: 22px 22px 0 0;
    }

    .geo-picker-header {
        padding-inline: 18px;
    }

    .geo-picker-search-wrap {
        margin-inline: 18px;
    }

    .geo-picker-list {
        padding-inline: 18px;
        padding-bottom: max(26px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .geo-picker-sheet {
        animation: none;
    }
}
