/* International Phone Input Styles */

.phone-input-wrapper {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.country-select-wrapper {
    position: relative;
    min-width: 75px;
    max-width: 190px;
}

.country-select {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
}

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

.country-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.country-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.country-select:focus + .country-select-arrow {
    color: var(--primary-500);
}

.phone-number-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.phone-number-input:hover {
    border-color: var(--border-hover);
}

.phone-number-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.phone-number-input::placeholder {
    color: var(--text-muted);
}

/* Country flag emoji styling */
.country-flag {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

/* Error state */
.phone-input-wrapper.error .country-select,
.phone-input-wrapper.error .phone-number-input {
    border-color: var(--error-500);
}

.phone-input-wrapper.error .country-select:focus,
.phone-input-wrapper.error .phone-number-input:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success state */
.phone-input-wrapper.success .country-select,
.phone-input-wrapper.success .phone-number-input {
    border-color: var(--success-500);
}

/* Disabled state */
.phone-input-wrapper .country-select:disabled,
.phone-input-wrapper .phone-number-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

/* Dark theme adjustments */
[data-theme="dark"] .country-select,
[data-theme="dark"] .phone-number-input {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .country-select option {
    background: var(--card-bg);
    color: var(--text-color);
}

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