/* a11y.css — دسترس‌پذیری (WCAG 2.1 AA). آخرین CSS لودشده.
   کنتراست همه‌ی ترکیب «متن روی پس‌زمینه» با اسکریپت اندازه‌گیری شده و حداقل ۴٫۵:۱ است. */

/* ---- کنتراست رنگ متن‌ها ---- */
:root {
    --text-muted: #52617a;   /* روی سفید ۶٫۳ / روی #eef3fb ۵٫۶ */
    --text-faint: #5b6b82;   /* روی سفید ۵٫۴ / روی #eef3fb ۴٫۹ */
    --success: #15803d;      /* روی سفید ۵٫۰ */
    --danger: #b91c1c;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);   /* متن سفید روی دکمه ≥ ۵٫۱ */
}
[data-theme="dark"] {
    /* چون این فایل بعد از تم تیره لود می‌شه، مقدارهای تم تیره باید اینجا دوباره نوشته بشن */
    --text-muted: #93a7c9;   /* روی #0c1830 ۷٫۲ */
    --success: #3ddc84;
    --danger: #ff5c6c;
    --text-faint: #8497ba;   /* روی #0c1830 ۶٫۰ */
    --accent-gradient: linear-gradient(135deg, #2b64e8 0%, #2a5bd7 100%);   /* متن سفید روی دکمه ≥ ۵٫۱ */
}

/* ---- فوکوس کیبورد همیشه دیده بشه ---- */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

/* ---- لینک رد کردن منو (فقط با تب دیده می‌شه) ---- */
.skip-link {
    position: absolute; right: 12px; top: -60px; z-index: 10000;
    background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px;
    font-weight: 700; text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 10px; }
main:focus { outline: none; }

/* ---- لینک‌های داخل متن فقط با رنگ فرق نکنن ---- */
.legal-page a, .consent-row a, .checkout-consent a { text-decoration: underline; }

/* ---- کاهش حرکت: انیمیشن و گذار خاموش ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
