/* Phone Number Collection Modal Styles */

.phone-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.phone-modal-dialog {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.phone-modal .modal-header {
    padding: 24px 24px 16px;
    border-bottom: 2px solid #f0f0f0;
    text-align: center;
}

.phone-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.phone-modal .modal-body {
    padding: 24px;
}

.phone-modal .modal-description {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.phone-modal .phone-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.phone-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone-modal .form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-modal .form-group label i {
    color: #4CAF50;
    font-size: 1.1rem;
}

.phone-modal .form-group .required {
    color: #f44336;
    margin-left: 4px;
}

.phone-modal .form-control {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    direction: ltr;
    text-align: left;
}

.phone-modal .form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.phone-modal .form-control:invalid:not(:placeholder-shown) {
    border-color: #f44336;
}

.phone-modal .form-hint {
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
    direction: rtl;
    text-align: right;
    display: block;
    margin-top: 4px;
}

.phone-modal .checkbox-group {
    margin-top: 4px;
}

.phone-modal .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    font-size: 0.9rem;
    color: #555;
}

.phone-modal .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.phone-modal .form-actions {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.phone-modal .btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.phone-modal .btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.phone-modal .btn-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.phone-modal .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.phone-modal .btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.phone-modal .status-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-modal .status-message::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.phone-modal .error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.phone-modal .error::before {
    content: "\f06a"; /* fa-exclamation-circle */
}

.phone-modal .success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.phone-modal .success::before {
    content: "\f058"; /* fa-check-circle */
}

/* RTL Support */
[dir="rtl"] .phone-modal .form-control,
[dir="rtl"] .phone-modal .form-hint {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .phone-modal .checkbox-label {
    flex-direction: row-reverse;
}

[dir="rtl"] .phone-modal .form-group label {
    flex-direction: row-reverse;
}

[dir="rtl"] .phone-modal .status-message {
    flex-direction: row-reverse;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .phone-modal-dialog {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .phone-modal .modal-header h2 {
        font-size: 1.25rem;
    }

    .phone-modal .modal-body {
        padding: 20px 16px;
    }

    .phone-modal .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading State */
.phone-modal .btn-submit.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.phone-modal .btn-submit.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
