/* Обертка телефона - маска */
.phone-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.phone-input {
    flex: 1;
}

/* Кастомный dropdown стран */
.country-dropdown {
    position: relative;
    min-width: 110px;
}

.country-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: white;
    cursor: pointer;
    user-select: none;
    height: 100%;
    transition: all 0.2s;
}

.country-selected:hover {
    border-color: #adb5bd;
}

.country-dropdown.open .country-selected {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.country-flag {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.country-code {
    font-size: 14px;
    color: #495057;
    flex: 1;
    white-space: nowrap;
}

.country-selected svg {
    color: #6c757d;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.country-dropdown.open .country-selected svg {
    transform: rotate(180deg);
}

/* Список стран */
.country-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.country-option:hover {
    background: #f8f9fa;
}

.country-option .country-flag {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.country-name {
    flex: 1;
    font-size: 14px;
    color: #212529;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-code-text {
    font-size: 13px;
    color: #6c757d;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 12px;
}

.country-separator {
    height: 1px;
    background: #dee2e6;
    margin: 4px 0;
}

/* Скроллбар */
.country-list::-webkit-scrollbar {
    width: 6px;
}

.country-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.country-list::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 3px;
}

.country-list::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}
