﻿/* --- Modern Blazor Reconnect Modal Styles --- */

#components-reconnect-modal {
    /* به صورت پیش‌فرض مخفی و خارج از دید */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Vazirmatn', sans-serif; /* فونت وزیر برای خوانایی بهتر (اختیاری) */
}

/* نمایش مودال با انیمیشن fade-in */
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
    opacity: 1;
}

/* پس زمینه نیمه شفاف با افکت بلور (شیشه مات) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(8px) saturate(150%);
    z-index: 1050;
}

/* نگهدارنده محتوای مودال برای قرارگیری در مرکز */
.modal-content-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1051;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* جعبه اصلی محتوا */
.modal-content-box {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* مخفی کردن بخش‌های مختلف به صورت پیش‌فرض */
.modal-content-box .components-reconnect-show,
.modal-content-box .components-reconnect-failed,
.modal-content-box .components-reconnect-rejected {
    display: none;
}

/* نمایش بخش مربوط به حالت فعلی */
#components-reconnect-modal.components-reconnect-show .components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected .components-reconnect-rejected {
    display: block;
}

/* استایل آیکون‌ها */
.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}
.icon-danger { background-color: rgba(220, 53, 69, 0.1); color: #dc3545; }
.icon-warning { background-color: rgba(255, 193, 7, 0.1); color: #ffc107; }

/* اسپینر انیمیشنی زیبا */
.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
     0% { transform: rotate(0deg); }
     100% { transform: rotate(360deg); }
 }