﻿.international-phone-input {
    width: 100%;
}

.phone-input-container {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.country-selector-btn {
    min-width: 120px;
    height: 56px;
}

.country-selector-menu {
    min-width: 280px;
}

.country-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    width: 100%;
}

.country-flag {
    font-size: 1.25rem;
    min-width: 24px;
}

.country-name {
    flex: 1;
    text-align: left;
}

.country-dial-code {
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

.country-code {
    margin-left: 8px;
    font-weight: 500;
}

.phone-number-input {
    flex: 1;
}

/* The MudField supplies the single outlined border. */
.phone-number-field .phone-number-input {
    width: 100% !important;
    height: 22px;
    min-height: 22px;
    margin: 0;
    padding: 0 12px 0 52px;
    border: 0 !important;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}

.phone-number-field .iti,
.phone-number-field .iti--allow-dropdown {
    width: 100% !important;
    height: 22px;
    min-height: 22px;
    margin: 0 !important;
}

.phone-number-field .iti__flag-container,
.phone-number-field .iti__selected-flag {
    height: 22px;
}

.phone-number-field .iti__selected-flag {
    padding: 0 8px 0 12px;
}

.phone-number-field .phone-number-input:focus {
    border: 0 !important;
    outline: 0;
    box-shadow: none;
}

.phone-field {
    width: 100%;
}

.validation-message {
    margin-top: 4px;
    margin-left: 8px;
}

.selected-country {
    background-color: var(--mud-palette-action-selected);
}

/* Responsive design */
@media (max-width: 600px) {
    .phone-input-container {
        flex-direction: column;
    }

    .country-selector-btn {
        width: 100%;
    }
}
