/**
 * Stil pentru selectorul de prefix telefonic cu steaguri
 */

.phone-input-container {
    display: flex;
    width: 100%;
    position: relative;
    margin-bottom: 1rem;
}

.phone-prefix-container {
    position: relative;
    min-width: 90px; /* Reducem lățimea minimă */
    z-index: 10; /* Asigurăm că dropdownul apare deasupra altor elemente */
}

.phone-prefix-button {
    display: flex;
    align-items: center;
    gap: 3px; /* Reducem spațiul dintre elemente */
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px 0 0 8px;
    padding: 0.8rem 0.6rem; /* Reducem padding-ul lateral */
    background: #f8f9fa;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phone-prefix-button .country-code {
    font-weight: bold;
    font-size: 0.9rem;
}

.phone-prefix-button:hover,
.phone-prefix-button:focus {
    background: #f1f1f1;
}

.phone-prefix-button .flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.phone-prefix-button .arrow {
    margin-left: auto;
    color: #666;
    font-size: 0.8rem;
}

.phone-prefix-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px; /* Reducem lățimea */
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: none;
    padding: 0.3rem 0; /* Reducem padding-ul vertical */
    margin-top: 5px;
}

.phone-prefix-dropdown.active {
    display: block;
}

/* Am eliminat stilul pentru căsuța de căutare */

.phone-prefix-option {
    display: flex;
    align-items: center;
    gap: 5px; /* Reducem spațiul dintre elemente */
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.phone-prefix-option:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
}

.phone-prefix-option .flag {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    overflow: hidden;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.phone-prefix-option .country-code {
    font-size: 0.9rem;
    color: #444;
    font-weight: bold;
    flex-grow: 1;
    margin-left: 3px; /* Adăugăm un mic spațiu după steag */
}

.phone-prefix-option .prefix {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.phone-input {
    flex-grow: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.8rem 1rem;
    background: #f8f9fa;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.phone-input:focus {
    outline: none;
    background: #fff;
    border-color: rgba(var(--primary-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Scrollbar pentru dropdown */
.phone-prefix-dropdown::-webkit-scrollbar {
    width: 6px;
}

.phone-prefix-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.phone-prefix-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.phone-prefix-dropdown::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Stil pentru țările prioritare */
.phone-prefix-option[data-code="US"],
.phone-prefix-option[data-code="GB"],
.phone-prefix-option[data-code="IE"] {
    background-color: rgba(248, 249, 250, 0.5);
    border-bottom: 1px solid #eaeaea;
}