/* =========================================================================================
   کارت قفل بخش‌ها (AccessGate) — در base.html بارگذاری می‌شود تا در هر صفحه‌ای قابل استفاده باشد.
   قالب: templates/access/_gate_box.html · همتای JS: static/js/access_gate.js
   ========================================================================================= */
.ac-gate {
    --ac-primary: #2563eb; --ac-primary-hover: #1d4ed8; --ac-accent: #b45309; --ac-accent-bg: #fffbeb; --ac-accent-border: #fde68a;
    --ac-text: #1e293b; --ac-muted: #64748b; --ac-border: #e2e8f0; --ac-bg: #ffffff; --ac-bg-soft: #f8fafc;
    position: relative; min-height: 220px; border: 1px dashed var(--ac-border); border-radius: 12px; overflow: hidden;
    background: var(--ac-bg-soft); display: flex; align-items: center; justify-content: center; padding: 28px 16px;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif; direction: rtl;
}
.ac-gate--compact { min-height: 150px; padding: 16px 12px; }

/* پیش‌نمایش محو: فقط شکل، بدون هیچ داده‌ای */
.ac-gate__preview { position: absolute; inset: 0; padding: 18px; filter: blur(3px); opacity: .55; pointer-events: none; user-select: none; }
.ac-gate__preview i, .ac-gate__preview b { display: block; background: linear-gradient(90deg, #e2e8f0, #eef2f7 60%, #e2e8f0); border-radius: 6px; }
.ac-gate__row { display: grid; grid-template-columns: 1.2fr 2.4fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ac-gate__row i { height: 16px; }
.ac-gate__row--head i { height: 20px; background: #cbd5e1; }
.ac-gate__cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ac-gate__cards b { height: 120px; border-radius: 10px; }
.ac-gate__bars { display: flex; align-items: flex-end; gap: 12px; height: 100%; padding: 8px 4px 0; }
.ac-gate__bars i { flex: 1; background: linear-gradient(180deg, #bfdbfe, #dbeafe); border-radius: 8px 8px 2px 2px; }
.ac-gate__lines { display: flex; flex-direction: column; gap: 12px; }
.ac-gate__lines i { height: 14px; }
.ac-gate__lines i:nth-child(2) { width: 80%; }
.ac-gate__lines i:nth-child(3) { width: 92%; }
.ac-gate__lines i:nth-child(4) { width: 60%; }

/* کارت پیام */
.ac-gate__card {
    position: relative; z-index: 1; max-width: 440px; width: 100%; text-align: center; background: var(--ac-bg);
    border: 1px solid var(--ac-border); border-radius: 14px; padding: 22px 22px 20px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
}
.ac-gate--compact .ac-gate__card { padding: 14px 16px; max-width: 380px; }
.ac-gate__icon { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin: 0 auto 10px; background: #eff6ff; color: var(--ac-primary); }
.ac-gate--subscription .ac-gate__icon, .ac-gate--expired .ac-gate__icon { background: var(--ac-accent-bg); color: var(--ac-accent); }
.ac-gate__icon svg { width: 26px; height: 26px; }
.ac-gate--compact .ac-gate__icon { width: 40px; height: 40px; margin-bottom: 6px; }
.ac-gate--compact .ac-gate__icon svg { width: 20px; height: 20px; }
.ac-gate__title { display: block; font-size: 1.0625rem; font-weight: 700; color: var(--ac-text); margin-bottom: 6px; line-height: 1.6; }
.ac-gate__text { margin: 0 0 16px; font-size: 0.875rem; color: var(--ac-muted); line-height: 1.8; }
.ac-gate--compact .ac-gate__title { font-size: 0.95rem; }
.ac-gate--compact .ac-gate__text { font-size: 0.8125rem; margin-bottom: 12px; }
.ac-gate__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ac-gate__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 8px;
    font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: all .2s ease; border: 2px solid transparent; cursor: pointer; font-family: inherit;
}
.ac-gate__btn--primary { background: var(--ac-primary); color: #fff; }
.ac-gate__btn--primary:hover { background: var(--ac-primary-hover); color: #fff; }
.ac-gate__btn--ghost { background: var(--ac-bg); border-color: var(--ac-border); color: var(--ac-text); }
.ac-gate__btn--ghost:hover { border-color: var(--ac-primary); color: var(--ac-primary); }
.ac-gate__btn--accent { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 4px 12px rgba(217, 119, 6, .25); }
.ac-gate__btn--accent:hover { filter: brightness(1.05); color: #fff; transform: translateY(-1px); }

/* قفل داخل پاپ‌آپ جزئیات و باکس‌های کوچک */
.ac-gate--inline { min-height: 160px; border-style: solid; }

@media (max-width: 600px) {
    .ac-gate { padding: 20px 12px; min-height: 200px; }
    .ac-gate__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ac-gate__row { grid-template-columns: 1fr 2fr 1fr; }
    .ac-gate__row i:nth-child(n+4) { display: none; }
}
