/* 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 متحرک موبایل
   ========================================= */
/* اصلاح تاری نوار ناوبری به طور کامل */
.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;
}

/* انیمیشن اسکلتون برای لودینگ لایک استوری‌ها */
.dnav-skeleton-like {
    display: inline-block;
    width: 35px;
    height: 16px;
    background: linear-gradient(90deg, #e0e0e0 25%, #cccccc 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: dnavSkeletonPulse 1.5s infinite;
    border-radius: 4px;
    vertical-align: middle;
    opacity: 0.8;
}
@keyframes dnavSkeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================
   دسترسی‌پذیری: کاهش حرکات برای کاربران حساس
   ========================================= */
@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,
    .dnav-skeleton-like {
        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;
    }
    .dnav-skeleton-like {
        animation-name: none !important;
        background: #e0e0e0 !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;}
