/* Mobile Authentication Registration Styles */

.mobile-auth-field {
    margin-bottom: 15px;
}

/* Form field validation styles */
.form-group .field-error,
.tutor-form-group .field-error,
.woocommerce-form-row .field-error,
.field .field-error,
.form-row .field-error {
    margin-top: 5px;
    font-size: 12px;
    color: #dc3545;
    display: block;
}

.form-group .error-message,
.tutor-form-group .error-message,
.woocommerce-form-row .error-message,
.field .error-message,
.form-row .error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 5px 8px;
    border-radius: 3px;
    border: 1px solid #f5c6cb;
    display: inline-block;
}

/* Field validation states */
.form-group input.field-invalid,
.tutor-form-group input.field-invalid,
.woocommerce-form-row input.field-invalid,
.field input.field-invalid,
.form-row input.field-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
}

.form-group input.field-valid,
.tutor-form-group input.field-valid,
.woocommerce-form-row input.field-valid,
.field input.field-valid,
.form-row input.field-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25) !important;
}

.form-group input.field-checking,
.tutor-form-group input.field-checking,
.woocommerce-form-row input.field-checking,
.field input.field-checking,
.form-row input.field-checking {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25) !important;
}

/* Email checking icon - REMOVED */
/*
.email-checking-icon {
    display: block;
    width: 24px;
    height: 24px;
    margin-top: 8px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    opacity: 0.8;
}

.email-checking-icon svg {
    width: 24px;
    height: 24px;
    animation: spin 1.5s linear infinite;
}

.email-checking-icon svg circle,
.email-checking-icon svg path {
    stroke: #ffc107;
    stroke-width: 2;
    fill: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
*/

/* Required field indicators */
.form-group label.required::after,
.tutor-form-group label.required::after,
.woocommerce-form-row label.required::after,
.field label.required::after,
.form-row label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Specific field type styles */
.form-group input.numeric,
.tutor-form-group input.numeric,
.woocommerce-form-row input.numeric,
.field input.numeric,
.form-row input.numeric {
    text-align: left;
    direction: ltr;
}

.form-group input.english,
.tutor-form-group input.english,
.woocommerce-form-row input.english,
.field input.english,
.form-row input.english {
    text-align: left;
    direction: ltr;
}

.form-group input.persian,
.tutor-form-group input.persian,
.woocommerce-form-row input.persian,
.field input.persian,
.form-row input.persian {
    text-align: right;
    direction: rtl;
}

.form-group input.phone-field,
.tutor-form-group input.phone-field,
.woocommerce-form-row input.phone-field,
.field input.phone-field,
.form-row input.phone-field {
    text-align: left;
    direction: ltr;
}

/* Email field styles - REMOVED */
/*
.form-group input.email-field,
.tutor-form-group input.email-field,
.woocommerce-form-row input.email-field,
.field input.email-field,
.form-row input.email-field {
    text-align: left;
    direction: ltr;
}
*/

.form-group input.otp-field,
.tutor-form-group input.otp-field,
.woocommerce-form-row input.otp-field,
.field input.otp-field,
.form-row input.otp-field {
    text-align: center;
    direction: ltr;
    letter-spacing: 2px;
}

.mobile-auth-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.mobile-auth-field input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mobile-auth-field input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

#send_otp_btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#send_otp_btn:hover {
    background-color: #005a87;
}

#send_otp_btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#otp_message {
    margin-top: 10px;
}

#otp_message .alert {
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid transparent;
}

#otp_message .alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

#otp_message .alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

#otp_message .alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* RTL Support */
.rtl .mobile-auth-field input {
    text-align: right;
}

.rtl #send_otp_btn {
    direction: rtl;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-auth-field input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    #send_otp_btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* Tutor LMS Specific Styles */
.tutor-form-group .mobile-auth-field {
    margin-bottom: 0;
}

.tutor-form-group #send_otp_btn {
    margin-top: 10px;
}

/* WooCommerce Specific Styles */
.woocommerce-form-row .mobile-auth-field {
    margin-bottom: 0;
}

.woocommerce-form-row #send_otp_btn {
    margin-top: 10px;
}

/* BuddyPress Specific Styles */
.field_phone_number,
.field_otp_code,
.field_send_otp {
    margin-bottom: 15px;
}

.field_send_otp #send_otp_btn {
    margin-top: 10px;
}

/* Theme Specific Styles */
.form-group .mobile-auth-field {
    margin-bottom: 0;
}

.form-group #send_otp_btn {
    margin-top: 10px;
}

/* Profile Edit Styles */
.form-table .mobile-auth-field input {
    width: 25em;
}

/* Error and Success Messages */
.mobile-auth-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.mobile-auth-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

/* Loading State */
.mobile-auth-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Timer Styles */
.mobile-auth-timer {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* ==================== LOGIN STYLES ==================== */

.mobile-login-option {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.mobile-login-option h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.mobile-login-fields {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    margin-top: 10px;
}

.mobile-login-fields .form-row {
    margin-bottom: 15px;
}

.mobile-login-fields label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.mobile-login-fields input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mobile-login-fields input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.mobile-login-fields button {
    margin: 5px 5px 5px 0;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.mobile-login-fields .button {
    background-color: #0073aa;
    color: white;
}

.mobile-login-fields .button:hover {
    background-color: #005a87;
}

.mobile-login-fields .button-primary {
    background-color: #28a745;
    color: white;
}

.mobile-login-fields .button-primary:hover {
    background-color: #218838;
}

.mobile-login-fields .button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#login_otp_message {
    margin-top: 10px;
}

#login_otp_message .alert {
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid transparent;
}

#login_otp_message .alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

#login_otp_message .alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

#login_otp_message .alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* RTL Support for Login */
.rtl .mobile-login-fields input {
    text-align: right;
}

.rtl .mobile-login-fields button {
    direction: rtl;
}

/* Responsive Design for Login */
@media (max-width: 768px) {
    .mobile-login-fields input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .mobile-login-fields button {
        width: 100%;
        margin: 5px 0;
    }
}

/* Tutor LMS Login Specific */
.tutor-login-form .mobile-login-option {
    margin: 20px 0;
}

/* WooCommerce Login Specific */
.woocommerce-form-login .mobile-login-option {
    margin: 20px 0;
}

/* BuddyPress Login Specific */
.buddypress .mobile-login-option {
    margin: 20px 0;
}

/* Theme Login Specific */
.edumall-login-form .mobile-login-option {
    margin: 20px 0;
}

/* ==================== CART FUNCTIONALITY MODAL STYLES ==================== */

.mobile-auth-login-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.8) !important;
    z-index: 9999 !important;
}

.mobile-auth-login-content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white !important;
    padding: 30px !important;
    border-radius: 10px !important;
    max-width: 400px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

.mobile-auth-login-header {
    text-align: center !important;
    margin-bottom: 20px !important;
}

.mobile-auth-login-header h3 {
    margin: 0 !important;
    color: #333 !important;
    font-size: 20px !important;
}

.mobile-auth-login-header p {
    margin: 10px 0 0 0 !important;
    color: #666 !important;
    font-size: 14px !important;
}

.mobile-auth-login-footer {
    text-align: center !important;
    margin-top: 20px !important;
}

.mobile-auth-login-footer p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 14px !important;
}

.mobile-auth-login-footer a {
    color: #0073aa !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.mobile-auth-login-footer a:hover {
    text-decoration: underline !important;
}

.mobile-auth-close-modal {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: #999 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.mobile-auth-close-modal:hover {
    color: #333 !important;
    background: #f0f0f0 !important;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
    .mobile-auth-login-content {
        padding: 20px !important;
        max-width: 95% !important;
    }

    .mobile-auth-login-header h3 {
        font-size: 18px !important;
    }
}

/* Holoo SSO — login form shows only the Holoo button */
.holoo-sso-login-wrapper {
    width: 100%;
    margin: 0 0 1em;
    text-align: center;
}

.holoo-sso-login-button {
    display: inline-block !important;
    width: 100% !important;
    max-width: 100%;
    text-align: center;
    margin: 0 !important;
}

form.holoo-sso-login-form > *:not(.holoo-sso-login-wrapper) {
    display: none !important;
}