/* ============================================================================
   هرکجا | MTheme — Empty State / Toast / Loader
   ----------------------------------------------------------------------------
   ⚠️ چرا این فایل لازم شد:
      در Views/S/I.cshtml تابع showNotification() کلاس .custom-notification را
      می‌سازد، ولی این کلاس در هیچ CSS پروژه تعریف نشده بود → پیام‌ها مثل
      متن خام و بدون طراحی دیده می‌شدند («هیچ ویدیویی برای این کسب و کار
      ثبت نشده است» و «آدرس ویدیو موجود نیست»).

   این فایل فقط ظاهر را اضافه می‌کند. هیچ منطق/شرط/AJAX تغییر نمی‌کند —
   فقط کلاس‌هایی که JS از قبل می‌سازد، استایل می‌گیرند.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   ۱) Toast / Notification (JS: showNotification(message, isError))
      کلاس‌ها و ساختار دقیقاً همان چیزی است که S/I.cshtml می‌سازد:
        #customNotification.custom-notification  +  .show
      نوع پیام از محتوای innerHTML تشخیص داده می‌شود (⚠️ = خطا/خالی، 📹 = ویدیو)
      — چون JS امضای type ندارد و نباید تغییر کند.
   --------------------------------------------------------------------------- */
.custom-notification {
    position: fixed;
    bottom: 92px;                     /* بالای bottom-nav موبایل */
    left: 50%;
    transform: translate(-50%, 24px);
    z-index: 1200;                    /* بالاتر از site-header (100) و nav (95) */
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 520px);
    padding: 14px 22px;
    border-radius: 16px;
    background: var(--card, #fff);
    color: var(--ink, #1e293b);
    border: 1px solid var(--border, #e6eaf2);
    box-shadow: 0 18px 46px -18px rgba(20, 33, 61, .34);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.9;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.custom-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
/* نوار رنگی سمت راست: برند برای پیام عادی */
.custom-notification::before {
    content: '';
    position: absolute;
    inset-inline-end: 0;
    inset-block: 12px;
    width: 4px;
    border-radius: 99px;
    background: var(--brand, #006a0d);
}
/* پیام خطا/خالی (⚠️ که JS می‌گذارد) → نارنجی هشدار برند */
.custom-notification:has(> :first-child),
.custom-notification[data-empty] { }
@supports not selector(:has(*)) { /* fallback لازم نیست — رنگ برند پیش‌فرض است */ }

/* پیام «خالی/هشدار» با تم کهربایی برند (رنگ accent پروژه) */
.custom-notification.custom-notification-warn {
    border-color: rgba(245, 158, 11, .32);
    background: linear-gradient(135deg, #fff 0%, #FFF9EE 100%);
}
.custom-notification.custom-notification-warn::before {
    background: var(--accent, #ee8d1a);
}

/* ---------------------------------------------------------------------------
   ۲) Empty State عمومی — هر بخشی که محتوا ندارد
      (به‌عنوان جایگزین بصری alert() های بومی مرورگر)
   --------------------------------------------------------------------------- */
.hz-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: clamp(26px, 5vw, 46px) 22px;
    margin: 18px 0;
    border-radius: var(--radius-lg, 20px);
    background: var(--bg-soft, #f6f8fc);
    border: 1px dashed var(--border, #e6eaf2);
    text-align: center;
}
.hz-empty-ico {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: var(--card, #fff);
    color: var(--brand, #006a0d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    border: 1px solid var(--border, #e6eaf2);
    box-shadow: 0 10px 24px -16px rgba(20, 33, 61, .3);
    flex-shrink: 0;
}
.hz-empty-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink, #1e293b);
    line-height: 1.9;
    margin: 0;
}
.hz-empty-text {
    font-size: .88rem;
    color: var(--muted, #64748b);
    line-height: 2;
    margin: 0;
    max-width: 46ch;
}
.hz-empty-actions { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* حالت کوچک — برای داخل کارت/سکشن‌های باریک */
.hz-empty.is-compact { padding: 20px 16px; gap: 8px; }
.hz-empty.is-compact .hz-empty-ico { width: 48px; height: 48px; border-radius: 16px; font-size: 1.15rem; }
.hz-empty.is-compact .hz-empty-title { font-size: .92rem; }

/* حالت تمام‌قد روی تصویر/ویدیو (مثل گالری یا کاروسل خالی) */
.hz-empty.is-overlay {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
}
.hz-empty.is-overlay .hz-empty-ico {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: rgba(255, 255, 255, .22);
}
.hz-empty.is-overlay .hz-empty-title { color: #fff; }
.hz-empty.is-overlay .hz-empty-text { color: rgba(255, 255, 255, .82); }

/* ---------------------------------------------------------------------------
   ۳) Loader / پیام «در حال آماده‌سازی» (JS: showLoader(text))
   --------------------------------------------------------------------------- */
.custom-loader,
.hz-loader {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
}
.custom-loader.show,
.hz-loader.show { display: flex; }
.custom-loader::after,
.hz-loader::after {
    content: '';
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    animation: hz-spin .8s linear infinite;
}
@keyframes hz-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------------
   ۴) Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .custom-notification {
        bottom: 84px;
        left: 14px;
        right: 14px;
        transform: translateY(20px);
        max-width: none;
        padding: 13px 16px;
        font-size: .86rem;
        border-radius: 14px;
    }
    .custom-notification.show { transform: translateY(0); }
    .hz-empty { padding: 24px 16px; border-radius: 16px; }
    .hz-empty-ico { width: 54px; height: 54px; border-radius: 18px; font-size: 1.25rem; }
    .hz-empty-title { font-size: .95rem; }
    .hz-empty-text { font-size: .84rem; }
    .hz-empty-actions { width: 100%; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .custom-notification { transition: opacity .15s linear; }
    .custom-loader::after, .hz-loader::after { animation-duration: 2s; }
}

/* ============================================================================
   ۵) کاروسل ویدیو (Views/S/I.cshtml) — کلاس‌هایی که JS فعال می‌کند
      بدون این استایل، loader/نقطه‌ها/پیمایش کاروسل بی‌شکل دیده می‌شدند.
      فقط ظاهر؛ JS دست‌نخورده.
   ============================================================================ */

/* پوشش کلی کاروسل ویدیو */
.vid_carousel-wrapper {
    position: relative;
    border-radius: var(--radius-lg, 20px);
    overflow: hidden;
    background: var(--bg-soft, #f6f8fc);
    border: 1px solid var(--border, #e6eaf2);
}
.vid_carousel-wrapper[style*="display: none"] { display: none; }

/* ویوپورت و لیست (درگ با ماوس/لمس) */
#videoCarouselViewport {
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
}
#videoCarouselViewport.dragging { cursor: grabbing; }
#videoCarouselViewport.dragging * { user-select: none; }
#videoCarouselList { display: flex; gap: 14px; }

/* نقطه‌های پیمایش */
#videoIndicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px 0 4px;
}
.vid_dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--border, #e6eaf2);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
}
.vid_dot.active,
.vid_dot[aria-selected="true"] {
    width: 22px;
    background: var(--brand, #006a0d);
}

/* دکمه‌های پیمایش کاروسل */
#videoPrevBtn,
#videoNextBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border, #e6eaf2);
    background: rgba(255, 255, 255, .92);
    color: var(--ink, #1e293b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px -12px rgba(20, 33, 61, .4);
    transition: var(--transition, all .25s ease);
}
#videoPrevBtn { inset-inline-end: 12px; }
#videoNextBtn { inset-inline-start: 12px; }
#videoPrevBtn:hover, #videoNextBtn:hover { background: var(--brand, #006a0d); color: #fff; border-color: var(--brand, #006a0d); }

/* Loader ویدیو (JS: showLoader/hideLoader با کلاس .show) */
#videoLoader {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(4px);
    color: #fff;
    text-align: center;
    padding: 20px;
}
#videoLoader.show { display: flex; }
.vid_loader-text {
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.9;
}
#videoLoader::before {
    content: '';
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    animation: hz-spin .8s linear infinite;
}
#videoContainer.loading { opacity: .5; }

/* حالت «دیده شد» برای بخش‌هایی که با اسکرول ظاهر می‌شوند */
.visible { opacity: 1; }

/* دکمه‌های ۳۶۰ که با JS فعال می‌شوند */
.open360Btn,
.open360FromProject {
    cursor: pointer;
}
.open360Btn:focus-visible,
.open360FromProject:focus-visible {
    outline: 2px solid var(--brand, #006a0d);
    outline-offset: 3px;
    border-radius: 12px;
}

@media (max-width: 767px) {
    #videoPrevBtn, #videoNextBtn { width: 34px; height: 34px; }
    #videoPrevBtn { inset-inline-end: 8px; }
    #videoNextBtn { inset-inline-start: 8px; }
    #videoCarouselList { gap: 10px; }
}
