/*
 * إضافات V15 لصفحة التاريخ الهجري.
 * لا توجد هنا قواعد تعيد تصميم #Hijri_Calendar أو #Calendar_header؛
 * العرض الأساسي يبقى من /css/Hijri_Calendar.css كما كان في الصفحة القديمة.
 */
html{scroll-behavior:smooth;scroll-padding-top:110px}
.hijri-v15-tools,.hijri-related{box-sizing:border-box;max-width:1050px;margin:18px auto 0;padding-inline:18px}
.hijri-v15-note{margin:0 0 10px;text-align:center;font-size:.86rem;line-height:1.8;color:#6c746f}
.hijri-v15-actions{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap}
.hijri-v15-actions button,.hijri-v15-actions a{box-sizing:border-box;min-height:42px;padding:9px 15px;border:1px solid rgba(25,72,58,.18);border-radius:11px;background:#fff;color:#174b3b;font:inherit;font-weight:700;text-decoration:none;cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease}
.hijri-v15-actions button:first-child{background:#174b3b;border-color:#174b3b;color:#fff}
.hijri-v15-actions button:hover,.hijri-v15-actions a:hover{transform:translateY(-1px);border-color:rgba(180,138,66,.65)}
.hijri-v15-actions button:focus-visible,.hijri-v15-actions a:focus-visible{outline:3px solid rgba(180,138,66,.3);outline-offset:2px}
.hijri-v15-status{min-height:1.35em;margin:8px 0 0;text-align:center;font-size:.83rem;color:#6c746f}
.hijri-related{margin-top:26px;margin-bottom:44px}
.hijri-related h2{margin:0 0 13px;text-align:center;font-size:1.3rem;color:#18302a}
.hijri-related-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.hijri-related-grid a{display:flex;min-height:96px;flex-direction:column;justify-content:center;gap:4px;padding:14px;border:1px solid rgba(24,48,42,.11);border-radius:14px;background:#fff;color:#18302a;text-align:center;text-decoration:none}
.hijri-related-grid a:hover{border-color:rgba(180,138,66,.55)}
.hijri-related-grid span{font-size:.84rem;line-height:1.6;color:#6c746f}

/* الثيم يطبّق فقط على الإضافات الجديدة؛ التقويم الأصلي يتبع ملفه القديم ومتغيرات الموقع. */
html[data-v15-page-theme="dark"] .hijri-v15-note,
html[data-theme="dark"] .hijri-v15-note,
html.dark .hijri-v15-note,
body.dark .hijri-v15-note,
body.dark-mode .hijri-v15-note{color:#abbab4}
html[data-v15-page-theme="dark"] .hijri-v15-actions button,
html[data-v15-page-theme="dark"] .hijri-v15-actions a,
html[data-v15-page-theme="dark"] .hijri-related-grid a,
html[data-theme="dark"] .hijri-v15-actions button,
html[data-theme="dark"] .hijri-v15-actions a,
html[data-theme="dark"] .hijri-related-grid a,
html.dark .hijri-v15-actions button,
html.dark .hijri-v15-actions a,
html.dark .hijri-related-grid a,
body.dark .hijri-v15-actions button,
body.dark .hijri-v15-actions a,
body.dark .hijri-related-grid a,
body.dark-mode .hijri-v15-actions button,
body.dark-mode .hijri-v15-actions a,
body.dark-mode .hijri-related-grid a{background:#14211e;border-color:rgba(235,245,240,.12);color:#eef6f2}
html[data-v15-page-theme="dark"] .hijri-v15-actions button:first-child,
html[data-theme="dark"] .hijri-v15-actions button:first-child,
html.dark .hijri-v15-actions button:first-child,
body.dark .hijri-v15-actions button:first-child,
body.dark-mode .hijri-v15-actions button:first-child{background:#286b55;color:#fff}
html[data-v15-page-theme="dark"] .hijri-related h2,
html[data-theme="dark"] .hijri-related h2,
html.dark .hijri-related h2,
body.dark .hijri-related h2,
body.dark-mode .hijri-related h2{color:#eef6f2}
html[data-v15-page-theme="dark"] .hijri-related-grid span,
html[data-theme="dark"] .hijri-related-grid span,
html.dark .hijri-related-grid span,
body.dark .hijri-related-grid span,
body.dark-mode .hijri-related-grid span{color:#a9b9b2}

@media(max-width:800px){.hijri-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.hijri-v15-tools,.hijri-related{padding-inline:13px}.hijri-v15-actions{display:grid;grid-template-columns:1fr 1fr}.hijri-v15-actions button,.hijri-v15-actions a{width:100%}.hijri-related-grid{grid-template-columns:1fr}.hijri-related-grid a{min-height:82px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.hijri-v15-actions button,.hijri-v15-actions a{transition:none}}
