/**
 * ============================================================================
 * PHONE INPUT STYLES
 * ============================================================================
 * Stili per il componente di input telefono con dropdown prefissi
 * ============================================================================
 */

.phone-input-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    position: relative;
}

.phone-country-select {
    flex-shrink: 0;
    width: 120px;
    max-width: 120px;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.phone-country-select:hover {
    border-color: var(--brand-primary);
}

.phone-country-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.phone-number-input {
    flex: 1;
    padding: 0.625rem 2.5rem 0.625rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.phone-number-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.phone-number-input.valid {
    border-color: #10b981;
    padding-right: 2.5rem;
}

.phone-number-input.invalid {
    border-color: #ef4444;
    padding-right: 2.5rem;
}

.phone-validation-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    font-weight: 600;
    pointer-events: none;
    transition: all 0.2s ease;
}

.phone-number-input.valid + .phone-validation-icon {
    color: #10b981;
}

.phone-number-input.invalid + .phone-validation-icon {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 640px) {
    .phone-input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .phone-country-select {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .phone-country-select,
    .phone-number-input {
        background: #1f2937;
        color: #f9fafb;
        border-color: #374151;
    }

    .phone-country-select:hover,
    .phone-number-input:hover {
        border-color: #6366f1;
    }
}
