/**
 * Dokan Vendor OTP Verification - Frontend Styles
 *
 * @package Dokan_Vendor_OTP_Verification
 */

/* OTP Verification Wrapper */
#dokan-otp-verification-wrapper {
    margin: 15px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

#dokan-otp-verification-wrapper .otp-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

/* Send OTP Button */
#dokan-send-otp-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #00b9eb;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

#dokan-send-otp-btn:hover {
    background: #0097c2;
}

#dokan-send-otp-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* OTP Input Section */
#dokan-otp-input-section {
    margin-top: 15px;
    display: none;
}

#dokan-otp-input-section.verified {
    background: #d4edda;
    padding: 15px;
    border-radius: 5px;
}

/* OTP Code Input */
#dokan-otp-code {
    width: 100%;
    max-width: 200px;
    padding: 12px 15px;
    font-size: 20px;
    letter-spacing: 8px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
}

#dokan-otp-code:focus {
    border-color: #00b9eb;
}

#dokan-otp-code:disabled {
    background: #f5f5f5;
    color: #666;
}

.verified #dokan-otp-code {
    border-color: #28a745;
    background: #fff;
}

/* Timer and Countdown */
#dokan-otp-timer {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

#dokan-otp-countdown {
    font-weight: 600;
    color: #dc3545;
}

/* Resend Button */
#dokan-otp-resend {
    margin-top: 10px;
    display: none;
}

#dokan-resend-otp-btn {
    padding: 8px 15px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#dokan-resend-otp-btn:hover {
    background: #5a6268;
}

#dokan-resend-otp-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

/* Status Messages */
#dokan-otp-status {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 13px;
    display: none;
}

#dokan-otp-status.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

#dokan-otp-status.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

#dokan-otp-status.warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

#dokan-otp-status.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Verification Success Icon */
.verified::before {
    content: "\2713";
    display: inline-block;
    margin-right: 10px;
    color: #28a745;
    font-size: 18px;
    font-weight: bold;
}

/* OTP Input Label */
.otp-input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #555;
}

/* Help Text */
.otp-help-text {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* Loading Spinner */
.otp-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #00b9eb;
    border-radius: 50%;
    animation: otp-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes otp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    #dokan-otp-verification-wrapper {
        padding: 15px;
    }

    #dokan-otp-code {
        max-width: 100%;
        font-size: 18px;
        letter-spacing: 6px;
    }

    #dokan-send-otp-btn,
    #dokan-resend-otp-btn {
        width: 100%;
        text-align: center;
    }
}

/* Dokan Theme Compatibility */
.dokan-form-group #dokan-otp-verification-wrapper {
    margin-left: 0;
    margin-right: 0;
}

/* WooCommerce Theme Compatibility */
.woocommerce-form-register #dokan-otp-verification-wrapper {
    clear: both;
    width: 100%;
}

/* Verification Badge */
.otp-verified-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #28a745;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    margin-left: 10px;
    text-transform: uppercase;
}

/* Error shake animation */
@keyframes otp-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#dokan-otp-code.error {
    animation: otp-shake 0.5s ease;
    border-color: #dc3545;
}
