.phone-with-region {
    width: 100%;
}

.phone-with-region__row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.phone-with-region__input {
    flex: 1;
    min-width: 0;
}

.region-code-select {
    position: relative;
    flex: 0 0 118px;
    width: 118px;
}

.region-code-select__trigger {
    width: 100%;
    height: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.region-code-select__trigger:hover,
.region-code-select.is-open .region-code-select__trigger {
    border-color: #9A7B2F;
    box-shadow: 0 0 0 3px rgba(154, 123, 47, 0.12);
}

.region-code-select__value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.region-code-select__caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #6b7280;
    flex-shrink: 0;
}

.region-code-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
}

.region-code-modal.is-open {
    display: block;
}

body.region-code-modal-open {
    overflow: hidden;
}

.region-code-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.region-code-modal__panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 32px));
    max-height: min(560px, calc(100vh - 48px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.region-code-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #f3f4f6;
}

.region-code-modal__header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.region-code-modal__close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.region-code-modal__search-wrap {
    padding: 12px 18px;
    border-bottom: 1px solid #f3f4f6;
}

.region-code-modal__search {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}

.region-code-modal__search:focus {
    border-color: #9A7B2F;
    box-shadow: 0 0 0 3px rgba(154, 123, 47, 0.12);
}

.region-code-modal__body {
    display: flex;
    min-height: 0;
    flex: 1;
}

.region-code-modal__az {
    width: 30px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid #f3f4f6;
    background: #fafafa;
    padding: 8px 0;
}

.region-code-modal__az-btn {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    padding: 2px 0;
    cursor: pointer;
}

.region-code-modal__az-btn:hover {
    color: #9A7B2F;
}

.region-code-modal__list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.region-code-modal__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.region-code-modal__item:hover,
.region-code-modal__item.is-selected {
    background: #fff8eb;
}

.region-code-modal__item-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.region-code-modal__item-code {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: #9A7B2F;
}

.region-code-modal__empty {
    padding: 28px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.pc-auth-page .form_group .phone-with-region {
    margin-top: 4px;
}

.pc-auth-page .form_group .phone-with-region__input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.pc-auth-page .form_group .phone-with-region__input:focus {
    outline: none;
    border-color: #9A7B2F;
    box-shadow: 0 0 0 3px rgba(154, 123, 47, 0.12);
}

.pc-auth-page .region-code-select__trigger {
    min-height: 48px;
}

@media (max-width: 768px) {
    .region-code-select {
        flex-basis: 104px;
        width: 104px;
    }

    .region-code-modal__panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-height: 78vh;
        border-radius: 18px 18px 0 0;
    }
}
