.region-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.region-combobox {
    position: relative;
    width: 100%;
}

.region-combobox-trigger {
    display: flex;
    width: 100%;
    height: 40px;
    padding: 0 11px 0 12px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    background: #fff;
    color: #71717a;
    cursor: pointer;
    font: inherit;
    font-size: 0.8125rem;
    text-align: left;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.region-combobox-trigger:hover:not(:disabled) {
    border-color: #a1a1aa;
}

.region-combobox-trigger:focus-visible,
.region-combobox.is-open .region-combobox-trigger {
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgb(138 0 0 / 0.1);
}

.region-combobox-trigger.has-value {
    color: #18181b;
}

.region-combobox-trigger:disabled {
    border-color: #e4e4e7;
    background: #f4f4f5;
    color: #a1a1aa;
    cursor: wait;
}

.region-combobox-trigger > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.region-combobox-trigger > svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 150ms ease;
}

.region-combobox.is-open .region-combobox-trigger > svg {
    transform: rotate(180deg);
}

.region-combobox-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 70;
    overflow: hidden;
    border: 1px solid #e4e4e7;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 12px 30px rgb(24 24 27 / 0.14), 0 2px 8px rgb(24 24 27 / 0.06);
    animation: region-popover-in 120ms ease-out;
}

.region-combobox-popover[hidden] {
    display: none;
}

.region-combobox-search {
    position: relative;
    padding: 7px;
    border-bottom: 1px solid #f4f4f5;
}

.region-combobox-search > svg {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 15px;
    height: 15px;
    color: #a1a1aa;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transform: translateY(-50%);
}

.region-combobox-search input {
    width: 100% !important;
    height: 34px !important;
    padding: 0 10px 0 34px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: #fafafa !important;
    color: #18181b !important;
    font: inherit !important;
    font-size: 0.75rem !important;
    outline: none !important;
    box-shadow: none !important;
}

.region-combobox-search input::placeholder {
    color: #a1a1aa;
}

.region-combobox-list {
    max-height: 230px;
    padding: 5px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #d4d4d8 transparent;
}

.region-combobox-item {
    display: flex;
    width: 100%;
    min-height: 34px;
    padding: 7px 8px 7px 10px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #3f3f46;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    text-align: left;
}

.region-combobox-item:hover,
.region-combobox-item:focus-visible {
    background: #f4f4f5;
    color: #18181b;
    outline: none;
}

.region-combobox-item.is-selected {
    background: #fef2f2;
    color: var(--brand-primary);
    font-weight: 700;
}

.region-combobox-item > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.region-combobox-item > svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

.region-combobox-item.is-selected > svg {
    opacity: 1;
}

.region-combobox-empty {
    padding: 20px 10px;
    color: #71717a;
    font-size: 0.75rem;
    text-align: center;
}

@keyframes region-popover-in {
    from { opacity: 0; transform: translateY(-3px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
    .region-combobox-popover {
        position: fixed;
        top: auto;
        right: 10px;
        bottom: calc(72px + env(safe-area-inset-bottom));
        left: 10px;
        border-radius: 12px;
        box-shadow: 0 20px 50px rgb(24 24 27 / 0.2);
    }

    .region-combobox-list {
        max-height: min(42vh, 300px);
    }

    .region-combobox-item {
        min-height: 40px;
        font-size: 0.8125rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .region-combobox-popover { animation: none; }
    .region-combobox-trigger > svg { transition: none; }
}
