/**
 * Verta Security & Timer Styles
 * @version 1.0.0
 *
 * استایل‌های مربوط به تایمر OTP و Brute Force Protection
 */

/* ===========================
   پیام‌های سیستمی
   =========================== */

.verta-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.verta-message .dashicons {
    flex-shrink: 0;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.verta-message p {
    margin: 0;
    flex: 1;
}

/* پیام خطا */
.verta-message-error {
    background: #ff1919 !important;
    color: white !important;
    border: 1px solid #f87171 !important;
}

.verta-message-error .dashicons {
    color: #c33;
}

/* پیام هشدار */
.verta-message-warning {
    background: #fffbf0;
    border: 1px solid #ffe066;
    color: #997404;
}

.verta-message-warning .dashicons {
    color: #f59e0b;
}

/* پیام موفقیت */
.verta-message-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.verta-message-success .dashicons {
    color: #22c55e;
}

/* پیام اطلاعاتی */
.verta-message-info {
    background: #f0f9ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.verta-message-info .dashicons {
    color: #3b82f6;
}

/* ===========================
   دکمه ارسال مجدد OTP
   =========================== */

.verta-resend-otp,
[data-action="resend-otp"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.verta-resend-otp:hover:not(.disabled),
[data-action="resend-otp"]:hover:not(.disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.verta-resend-otp:active:not(.disabled),
[data-action="resend-otp"]:active:not(.disabled) {
    transform: scale(0.98);
}

/* حالت غیرفعال (تایمر در حال اجرا) */
.verta-resend-otp.disabled,
.verta-resend-otp:disabled,
[data-action="resend-otp"].disabled,
[data-action="resend-otp"]:disabled {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.8;
}

.verta-resend-otp.disabled .dashicons,
[data-action="resend-otp"].disabled .dashicons {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===========================
   Overlay بلاک شدن
   =========================== */

.verta-block-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.verta-block-message {
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.verta-block-message .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #dc2626;
    margin-bottom: 20px;
}

.verta-block-message h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.verta-block-message p {
    margin: 0;
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
}

/* فرم بلاک شده */
.verta-form.verta-blocked {
    position: relative;
    min-height: 400px;
}

.verta-form.verta-blocked input,
.verta-form.verta-blocked button,
.verta-form.verta-blocked select {
    pointer-events: none;
    opacity: 0.5;
}

/* ===========================
   نمایش تایمر روی دکمه
   =========================== */

.verta-timer-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===========================
   لودینگ
   =========================== */

.verta-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 640px) {
    .verta-message {
        padding: 14px 16px;
        font-size: 13px;
    }

    .verta-message .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .verta-block-message {
        padding: 30px 20px;
    }

    .verta-block-message .dashicons {
        font-size: 48px;
        width: 48px;
        height: 48px;
    }

    .verta-block-message h3 {
        font-size: 18px;
    }

    .verta-block-message p {
        font-size: 14px;
    }
}
