/**
 * Phone Input Validation Styles
 * أبيض وأسود وبرتقالي
 */

/* Phone Input Wrapper */
.phone-input-wrapper {
    position: relative;
    width: 100%;
}

/* Phone Input */
.phone-input-wrapper input[type="tel"],
.phone-input-wrapper input[name="phone"] {
    width: 100%;
    padding: 14px 130px 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 15px;
    direction: ltr;
    text-align: left;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.phone-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.phone-input-wrapper input:focus {
    border-color: #FF6B00;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
    outline: none;
}

/* Country Button */
.phone-country-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    z-index: 2;
    transition: all 0.2s ease;
}

.phone-country-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 107, 0, 0.5);
}

.phone-flag {
    font-size: 18px;
    line-height: 1;
}

.phone-dial {
    font-family: monospace;
    font-weight: 500;
    direction: ltr;
}

/* Country Dropdown */
.phone-country-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    margin-top: 5px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.phone-country-dropdown::-webkit-scrollbar {
    width: 6px;
}

.phone-country-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.phone-country-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 0, 0.5);
    border-radius: 3px;
}

.phone-country-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s;
}

.phone-country-item:hover {
    background: rgba(255, 107, 0, 0.15);
}

.phone-country-item:first-child {
    border-radius: 12px 12px 0 0;
}

.phone-country-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* Light Theme (Contact Section) */
.contact-form .phone-input-wrapper input[type="tel"] {
    background: #fff;
    border-color: #e5e7eb;
    color: #333;
}

.contact-form .phone-input-wrapper input::placeholder {
    color: #999;
}

.contact-form .phone-input-wrapper input:focus {
    background: #fff;
}

.contact-form .phone-country-btn {
    background: #f5f5f5;
    border-color: #e5e7eb;
    color: #333;
}

.contact-form .phone-country-btn:hover {
    background: #eee;
}

.contact-form .phone-country-dropdown {
    background: #fff;
    border-color: #e5e7eb;
}

.contact-form .phone-country-item {
    color: #333;
}

.contact-form .phone-country-item:hover {
    background: rgba(255, 107, 0, 0.1);
}

/* Validation States */
.phone-input-wrapper input.valid {
    border-color: #25D366 !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2) !important;
}

.phone-input-wrapper input.invalid {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.2) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .phone-input-wrapper input[type="tel"] {
        padding: 12px 120px 12px 14px;
        font-size: 14px;
    }
    
    .phone-country-btn {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .phone-flag {
        font-size: 16px;
    }
    
    .phone-country-dropdown {
        max-height: 200px;
    }
    
    .phone-country-item {
        padding: 10px 14px;
        gap: 10px;
    }
}
