/* Extracted from views/frontend-html.php. Static frontend helper styles. */

/* 🚀 استایل‌های لودینگ تمام‌صفحه و قفل دکمه */
.dnav-btn-locked {
    opacity: 0.45 !important;
    pointer-events: none !important;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.dnav-fullscreen-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000005; /* بالاتر از مگامنو */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dnav-fullscreen-loader.active {
    opacity: 1;
    visibility: visible;
}

.dnav-loader-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #f0f0f1;
    border-top: 4px solid var(--dnav-loading-bar-color, #ef4056);
    border-radius: 50%;
    animation: dnav-spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-bottom: 15px;
}

.dnav-loader-text {
    color: #424750;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
}

/* انیمیشن لودینگ چرخشی جستجو */
@keyframes dnav-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* لودینگ بار اپلیکیشنی در بالاترین نقطه صفحه */
#dnav-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--dnav-loading-bar-color, #ef4056);
    z-index: 1000003;
    display: none;
    transition: width 0.4s cubic-bezier(0.08, 0.82, 0.17, 1);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px var(--dnav-loading-bar-color, #ef4056);
    width: 0%;
}

#dnav-progress-bar.loading {
    display: block !important;
    animation: dnavBarLoading 2.2s cubic-bezier(0.08, 0.82, 0.17, 1) forwards;
}

#dnav-progress-bar.done {
    display: block !important;
    width: 100% !important;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.4s ease 0.3s;
}

@keyframes dnavBarLoading {
    0% { width: 0%; }
    20% { width: 45%; }
    50% { width: 75%; }
    80% { width: 88%; }
    100% { width: 94%; }
}

/* =========================================
   کدهای استایل لایه مگامنوی SPA متحرک موبایل
   ========================================= */
/* LEGACY COMPATIBILITY SELECTOR (kept intentionally, not dead runtime code):
   .dnav-spa-mega-layer belonged to the pre-1.1.3 mobile SPA layer, which no longer
   exists in the markup (the overlay is now #dnav-mobile-menu-root). The rule is kept
   so custom themes/child themes that still target this class do not lose their
   overrides. Nothing in the current frontend emits it. */
.dnav-spa-mega-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding-bottom: 90px; /* ایجاد فضا برای نوار رنگی ناوبری پایین در گوشی */
    background-color: var(--dnav-m-content-bg, #ffffff);
    z-index: 1000001; /* پایین‌تر از لایه نوار منو و لودینگ بار */
    overflow-y: auto;
    overflow-x: hidden;
    animation: dnavSpaFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dnavSpaFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Contact popup social channels: selectors match the current frontend markup. */
.dnav-social-channels-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    padding-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dnav-social-channels-row::-webkit-scrollbar {
    display: none;
}

.dnav-social-channel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    gap: 8px;
    transition: transform 0.2s;
    outline: none;
    flex-shrink: 0;
}

.dnav-social-channel-item:hover {
    transform: translateY(-3px);
}

.dnav-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--dnav-social-item-size, var(--dnav-social-icon-size, 28px));
    height: var(--dnav-social-item-size, var(--dnav-social-icon-size, 28px));
    color: var(--dnav-social-item-color, var(--dnav-social-color, currentColor));
    transition: color 0.3s ease;
    line-height: 1;
}

.dnav-social-icon img,
.dnav-social-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dnav-social-title {
    display: block;
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
    color: var(--dnav-social-item-color, var(--dnav-social-color, currentColor));
    font-size: var(--dnav-social-text-size, 14px);
    transition: color 0.3s ease;
}

/* اسکلتون حذف شد: مربوط به قابلیت حذف‌شده بود و مصرفی نداشت. */

/* =========================================
   دسترسی‌پذیری: کاهش حرکات برای کاربران حساس
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    .dnav-fullscreen-loader,
    .dnav-fullscreen-loader.active,
    .dnav-loader-spinner,
    #dnav-progress-bar,
    #dnav-progress-bar.loading,
    #dnav-progress-bar.done,
    .dnav-spa-mega-layer,
    .dnav-social-channel-item,
    .dnav-social-icon,
    .dnav-social-title {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    .dnav-loader-spinner {
        animation-name: none !important;
        border-top-color: var(--dnav-loading-bar-color, #ef4056);
        border-right-color: #f0f0f1;
    }
    #dnav-progress-bar.loading {
        animation-name: none !important;
        width: 94% !important;
    }
    .dnav-spa-mega-layer {
        animation-name: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}


/* Static styles extracted from inline markup. Dynamic per-item values use CSS custom properties. */
.dnav-public-i-0c0cd8db60{background-color:var(--dnav-contact-icon-bg,transparent);}
.dnav-public-i-885e900531{direction:ltr;}
.dnav-public-i-b8a66cf34e{text-align:center;opacity:.7;font-size:12px;}
.dnav-public-i-b7a5b9eb6e{width:100%;height:100%;object-fit:contain;}
.dnav-public-i-93adbfbd54{color:var(--dnav-social-item-color,var(--dnav-social-color,#555));width:var(--dnav-social-item-size,var(--dnav-social-icon-size,28px));height:var(--dnav-social-item-size,var(--dnav-social-icon-size,28px));}
.dnav-public-i-c5729cbe85{color:var(--dnav-social-item-color,var(--dnav-social-color,#555));font-size:var(--dnav-social-text-size,11px);}
.dnav-public-i-e328070c84{padding:20px;text-align:center;}

.dnav-cluster-content.is-open{display:block;} .dnav-cluster-content:not(.is-open){display:none;}

/* Screen-reader-only heading for the lazy-mode indexable utility page (thin-content fix).
   Keeps the route crawlable with a unique h1 without changing the visual design. */
.dnav-sr-only, .screen-reader-text.dnav-sr-only {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* Utility breadcrumb (crawlable internal link Home -> utility). Visually subtle. */
.dnav-utility-breadcrumb { font-size: 12px; padding: 8px 14px; }
.dnav-utility-breadcrumb ol { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.dnav-utility-breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; opacity: .5; }
/* Closed desktop panel is inert+hidden: remove from AT/focus without layout shift. */
.seo-desktop-mega-panel[hidden] { display: none !important; }
