/**
 * phone-input.css — стили для компонента <phone-input>.
 *
 * Единая точка правды для вида поля телефона во всех SPA-формах.
 * Подключается ПОСЛЕДНИМ в index.html — перебивает конфликтующие
 * правила из dashboard.css / profile.css / business.css / client.css /
 * employee.css (там 5 разных версий .profile-phone-* / .client-phone-*).
 *
 * Дизайн: единый контейнер с рамкой; селектор слева + разделитель + input.
 * Focus подсвечивает весь контейнер, не только input.
 */

/* ─── Базовый контейнер (общий для всех вариантов) ─── */
.phone-input,
.profile-phone-wrapper,
.profile-phone-item,
.employee-phone-wrapper,
.client-phone-wrapper {
    /* обнуляем наследованные правила из старых файлов */
    position: relative;
}

/* ─── Единый «пилюльный» контейнер ─── */
.phone-input {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    overflow: hidden;
}

.phone-input[data-focused="true"] {
    border-color: #dd1847;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(221, 24, 71, 0.08);
}

/* ─── Селектор страны ─── */
.phone-input .phone-input__selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px 0 14px;
    cursor: pointer;
    background: transparent;
    border: none;
    border-right: 1.5px solid #e0e0e0;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease;
}

.phone-input .phone-input__selector:hover {
    background: rgba(0,0,0,0.03);
}

.phone-input[data-focused="true"] .phone-input__selector {
    border-right-color: #f0b3c1;
}

.phone-input .phone-input__flag {
    font-size: 18px;
    line-height: 1;
}

.phone-input .phone-input__code {
    font-variant-numeric: tabular-nums;
}

.phone-input .phone-input__chevron {
    opacity: 0.5;
    width: 10px;
    height: 10px;
}

/* ─── Input внутри контейнера ─── */
.phone-input .phone-input__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 14px 14px 14px 12px;
    font-size: 16px;
    font-family: inherit;
    color: #1f2937;
    outline: none;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
}

.phone-input .phone-input__input::placeholder {
    color: #b8bcc4;
    font-weight: 400;
    letter-spacing: normal;
}

.phone-input .phone-input__input:disabled {
    color: #999;
    cursor: not-allowed;
}

.phone-input[data-focused="true"] .phone-input__input:disabled {
    color: #666;
}

/* ─── Мобильная адаптация ─── */
@media (max-width: 767px) {
    .phone-input .phone-input__selector {
        padding: 0 10px 0 12px;
        font-size: 15px;
    }
    .phone-input .phone-input__input {
        padding: 12px 12px 12px 10px;
        font-size: 16px;
    }
}
