/* Modern Phone Input Styles */
.phone-input-wrapper {
    position: relative;
    display: flex;
    gap: 0.5rem;
    direction: rtl;
    align-items: stretch;
}

.phone-input-container {
    position: relative;
    flex: 1;
    display: flex;
    background: var(--bg-primary, #0f172a);
    border: 1px solid var(--border-color, #334155);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.phone-input-container:focus-within {
    border-color: var(--accent-blue, #1b3050);
    box-shadow: 0 0 0 3px rgba(27, 48, 80, 0.2);
}

.phone-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: var(--bg-secondary, #1e293b);
    border-left: 1px solid var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8);
    font-size: 1.1rem;
}

.phone-area-code {
    width: 90px;
    padding: 0.75rem 0.75rem;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border-color, #334155);
    color: var(--text-primary, #e2e8f0);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    direction: ltr;
}

.phone-area-code::placeholder {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
}

.phone-separator {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: var(--text-secondary, #94a3b8);
    font-weight: 600;
    user-select: none;
}

.phone-main-number {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.95rem;
    outline: none;
    direction: ltr;
    text-align: left;
}

.phone-main-number::placeholder {
    color: var(--text-secondary, #94a3b8);
}

/* Hover effect */
.phone-input-container:hover {
    border-color: var(--accent-blue, #1b3050);
}

/* Alternative compact style */
.phone-input-compact {
    display: flex;
    gap: 0.5rem;
    direction: rtl;
}

.phone-input-compact .phone-segment {
    position: relative;
}

.phone-input-compact .phone-segment input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary, #0f172a);
    border: 1px solid var(--border-color, #334155);
    border-radius: 10px;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    direction: ltr;
    text-align: center;
}

.phone-input-compact .phone-segment input:focus {
    outline: none;
    border-color: var(--accent-blue, #1b3050);
    box-shadow: 0 0 0 3px rgba(27, 48, 80, 0.2);
}

.phone-input-compact .phone-segment input::placeholder {
    color: var(--text-secondary, #94a3b8);
}

.phone-input-compact .phone-segment-area {
    width: 90px;
}

.phone-input-compact .phone-segment-number {
    flex: 1;
}

.phone-input-compact .phone-segment-label {
    position: absolute;
    top: -8px;
    right: 12px;
    background: var(--bg-secondary, #1e293b);
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary, #94a3b8);
    border-radius: 4px;
    pointer-events: none;
}

/* Modern Unified Style (Recommended) */
.phone-input-modern {
    position: relative;
    display: flex;
    background: var(--bg-primary, #0f172a);
    border: 1px solid var(--border-color, #334155);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    direction: rtl;
}

.phone-input-modern:focus-within {
    border-color: var(--accent-blue, #1b3050);
    box-shadow: 0 0 0 3px rgba(27, 48, 80, 0.2);
}

.phone-input-modern:hover {
    border-color: var(--accent-blue, #1b3050);
}

.phone-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.875rem;
    background: linear-gradient(135deg, rgba(27, 48, 80, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-left: 1px solid var(--border-color, #334155);
}

.phone-icon-box i {
    color: var(--accent-blue, #1b3050);
    font-size: 1.1rem;
}

.phone-area-input {
    width: 85px;
    padding: 0.75rem 0.625rem;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border-color, #334155);
    color: var(--text-primary, #e2e8f0);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    direction: ltr;
}

.phone-area-input::placeholder {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.8rem;
}

.phone-divider {
    display: flex;
    align-items: center;
    padding: 0 0.625rem;
    color: var(--border-color, #334155);
    font-weight: 700;
    font-size: 1.2rem;
    user-select: none;
}

.phone-number-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.95rem;
    outline: none;
    direction: ltr;
    text-align: left;
}

.phone-number-input::placeholder {
    color: var(--text-secondary, #94a3b8);
}

/* Mobile responsive */
@media (max-width: 576px) {
    .phone-input-wrapper,
    .phone-input-compact {
        flex-direction: column;
    }
    
    .phone-input-compact .phone-segment-area {
        width: 100%;
    }
    
    .phone-area-code,
    .phone-area-input {
        width: 100px;
    }
}

/* Error state */
.phone-input-modern.error {
    border-color: var(--accent-red, #ef4444);
}

.phone-input-modern.error:focus-within {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Success state */
.phone-input-modern.success {
    border-color: var(--accent-green, #10b981);
}

.phone-input-modern.success:focus-within {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
