/**
 * Twilio OTP Verification Styles
 */

/* OTP Wrapper */
/* Send OTP Button */
.twilio-send-otp-btn {
    background-color: transparent !important;    border-color: #28a745 !important;    color: #232323 !important;    font-weight: 600;    padding: 10px 20px;    border-radius: 4px;    transition: all 0.3s ease;    margin-bottom: 10px !important;
}

.twilio-send-otp-btn:hover {
    background-color: transparent !important;
    border-color: #1e7e34 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.twilio-send-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* OTP Success Message */
.twilio-otp-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

/* OTP Input Wrapper */
.twilio-otp-input-wrapper {
    margin-top: 10px;
}

/* OTP Input Field */
.twilio-otp-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.twilio-otp-input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.twilio-otp-input.verified {
    border-color: #28a745;
    background-color: #f0fff4;
}

.twilio-otp-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* OTP Status Messages */
.twilio-otp-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 20px;
}

.twilio-otp-status .twilio-verifying {
    color: #007bff;
    font-style: italic;
}

.twilio-otp-status .twilio-verified {
    color: #28a745;
    font-weight: 600;
}

.twilio-otp-status .twilio-error {
    color: #dc3545;
    font-weight: 500;
}

/* Resend OTP Button */
.twilio-resend-otp-btn {
    color: #007bff !important;
    text-decoration: none;
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.twilio-resend-otp-btn:hover:not(.disabled) {
    color: #0056b3 !important;
    text-decoration: underline;
}

.twilio-resend-otp-btn.disabled {
    color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .twilio-otp-input {
        font-size: 16px;
        letter-spacing: 2px;
        padding: 10px 12px;
    }
    
    .twilio-otp-message {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* Animation for OTP message */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.twilio-otp-message {
    animation: slideDown 0.3s ease;
}

/* Loading spinner for send button */
.twilio-send-otp-btn:disabled::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Phone field disabled after OTP verification */
.twilio-phone-verified,
input.twilio-phone-verified,
#reg_form_phone_number.twilio-phone-verified,
#phone-field.twilio-phone-verified {
    background-color: #f0fff4 !important;
    border-color: #28a745 !important;
    color: #155724 !important;
    cursor: not-allowed !important;
    opacity: 0.9;
}

.twilio-phone-verified:disabled,
input.twilio-phone-verified:disabled,
#reg_form_phone_number.twilio-phone-verified:disabled,
#phone-field.twilio-phone-verified:disabled {
    background-color: #e8f5e9 !important;
    border-color: #28a745 !important;
    color: #2e7d32 !important;
}
