.phone-mask-container {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    transition: ring 0.2s;
}

.phone-mask-container.focused {
    outline: none;
    ring: 2px; /* Fallback */
    box-shadow: 0 0 0 2px #B91C1C; /* brand-primary */
}

.country-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    align-self: stretch; /* Растягиваем на всю высоту контейнера */
    background: transparent;
    border-right: 1px solid #D9CAC8;
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    color: #2D2422;
    transition: background-color 0.2s;
    min-width: 85px;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    line-height: 1; /* Предотвращаем смещение из-за line-height */
}

.country-selector:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.current-flag {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.current-code {
    line-height: 1;
    display: flex;
    align-items: center;
}

.chevron {
    margin-left: auto;
    transition: transform 0.2s;
    color: #7A5F5B;
}

.country-dropdown.show + .country-selector .chevron {
    transform: rotate(180deg);
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 250px;
    max-height: 300px;
    background: #FFFFFF;
    border: 1px solid #D9CAC8;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Увеличено для надежности */
    overflow-y: auto;
    display: none;
    padding: 8px 0;
}

.country-dropdown.show {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.country-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.country-item:hover {
    background-color: #F3EEED;
}

.country-flag {
    font-size: 20px;
}

.country-name {
    flex: 1;
    font-size: 14px;
    color: #2D2422;
}

.country-code {
    font-size: 14px;
    color: #776461;
    font-weight: 500;
}

/* Стили для инпута внутри контейнера */
.phone-mask-container input[type="tel"] {
    flex: 1;
    border: none !important;
    padding-left: 12px !important;
    background: transparent !important;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Специфичные фиксы для форм */

/* Стили для кнопок submit */
button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}
