/**
 * Phone Input Styling
 * 
 * Shared CSS for international phone input with country flags.
 * Used across client and supplier registration forms.
 */

/* International Phone Input Container */
.iti {
    width: 100%;
    position: relative;
}

.iti__flag-container {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    border-radius: 8px 0 0 8px;
}

.iti__selected-flag {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0.75rem 1rem;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.iti__selected-flag:hover {
    background-color: #e9ecef;
}

.iti__arrow {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #555;
    margin-left: 8px;
}

.iti__country-list {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    z-index: 1000;
}

.iti__country {
    padding: 8px 12px;
}

.iti__country:hover {
    background-color: #f8f9fa;
}

.iti__country.iti__active {
    background-color: #007bff;
    color: white;
}

/* Phone input field styling - generic for all phone inputs */
.phone-input-field {
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding-left: 100px !important; /* Force padding to prevent overlap */
    width: 100%;
    position: relative;
}

.phone-input-field:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Ensure proper spacing for separate dial code mode */
.iti--separate-dial-code .phone-input-field {
    padding-left: 100px !important;
}

/* Override any conflicting styles */
.iti--separate-dial-code .iti__flag-container {
    width: auto;
    min-width: 90px;
}

/* Ensure the input field starts after the flag container */
.iti--separate-dial-code input[type="tel"] {
    padding-left: 100px !important;
    margin-left: 0;
}

/* Phone input container styling */
.phone-input-container {
    position: relative;
    width: 100%;
}

/* Ensure proper positioning of the ITI container */
.iti--separate-dial-code {
    position: relative;
    width: 100%;
}

