/* أنماط أدوات القسم الإسلامي — امتداد لنظام الموقع العنابي: بلا ظلال، حدود واضحة، Tahoma، عناصر مدمجة. */
.am-tool {
  direction: rtl;
  font-family: Tahoma, Arial, sans-serif;
  color: #241E1D;
  margin: 0 0 28px;
}
.am-tool *, .am-tool *::before, .am-tool *::after { box-sizing: border-box; }
.am-tool h2, .am-tool h3 { font-family: Tahoma, Arial, sans-serif; font-weight: 700; color: #241E1D; }
.am-tool p, .am-tool li, .am-tool label, .am-tool output { line-height: 1.8; }
.am-tool a { color: #B8322B; }
.am-tool a:hover, .am-tool a:focus { color: #7B211B; }

.am-tool-intro { font-size: 15px; color: #6F6260; margin: 0 0 18px; }

.am-panel { background: #FFFFFF; border: 1px solid #E5DBD7; border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.am-panel--cream { background: #FFFCF5; border-color: #E8DABB; }
.am-panel--tint { background: #F5ECEA; border-color: #E5DBD7; }
.am-panel-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: #241E1D; }

.am-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.am-grid--2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.am-field { display: block; margin: 0 0 12px; }
.am-field > span, .am-label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 6px; color: #241E1D; }
.am-hint { display: block; font-size: 12px; color: #6F6260; margin-top: 4px; font-weight: 400; }
/* القالب يفرض select{height:30px} مع box-sizing:border-box عام، فيبقى للعربية عشرة بكسل فقط من أصل سطر 25.6: الارتفاع التلقائي هو الإصلاح، و44 بكسل حد أدنى يوحّد التحكمات ولمسات الإصبع. */
.am-tool input[type=text], .am-tool input[type=number], .am-tool input[type=search], .am-tool input[type=date], .am-tool select, .am-tool textarea {
  width: 100%; height: auto; min-height: 44px; direction: rtl; text-align: start;
  font: 400 14px/1.6 Tahoma, Arial, sans-serif; color: #241E1D;
  padding: 9px 10px; background: #FFFFFF; border: 1px solid #E5DBD7; border-radius: 8px;
  -webkit-appearance: none; appearance: none;
}
/* حذف القالب سهمه بمظهر مُخصّط يتطلب سهمًا مرسومًا وحيزًا لا يلمسه النص. */
.am-tool select {
  padding-inline-end: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236F6260' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center;
}
.am-tool textarea { min-height: 92px; resize: vertical; }
.am-tool input:focus-visible, .am-tool select:focus-visible, .am-tool textarea:focus-visible,
.am-tool button:focus-visible, .am-tool a:focus-visible, .am-tool [tabindex]:focus-visible {
  outline: 3px solid #B8322B; outline-offset: 2px;
}
.am-tool input[aria-invalid=true], .am-tool input.is-invalid, .am-tool select.is-invalid { border-color: #B8322B; background-color: #FDF6F5; }

.am-checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.am-check { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 8px 10px; border: 1px solid #E5DBD7; border-radius: 8px; background: #FFFFFF; cursor: pointer; }
.am-check input { width: 18px; height: 18px; margin: 0; accent-color: #B8322B; flex: none; }
.am-check.is-on { border-color: #B8322B; background: #F5ECEA; }

.am-btn { display: inline-block; font: 700 14px/1 Tahoma, Arial, sans-serif; padding: 11px 18px; border-radius: 8px; border: 1px solid #B8322B; background: #B8322B; color: #FFFFFF; cursor: pointer; }
.am-btn:hover, .am-btn:focus { background: #7B211B; border-color: #7B211B; color: #FFFFFF; }
.am-btn--ghost { background: #FFFFFF; color: #7B211B; border-color: #E5DBD7; }
.am-btn--ghost:hover, .am-btn--ghost:focus { background: #F5ECEA; color: #7B211B; border-color: #B8322B; }
.am-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }

.am-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.am-tabs button { font: 700 13px/1 Tahoma, Arial, sans-serif; padding: 9px 14px; border-radius: 8px; border: 1px solid #E5DBD7; background: #FFFFFF; color: #6F6260; cursor: pointer; }
.am-tabs button[aria-selected=true] { background: #B8322B; border-color: #B8322B; color: #FFFFFF; }

.am-result { margin: 0; }
.am-result[hidden] { display: none; }
.am-result-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 17px; font-weight: 700; padding: 14px 16px; background: #F5ECEA; border: 1px solid #E5DBD7; border-radius: 12px; margin: 0 0 14px; }
.am-result-total b { font-size: 22px; color: #7B211B; }
.am-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #E5DBD7; font-size: 14px; }
.am-line:last-child { border-bottom: 0; }
.am-line span:first-child { color: #6F6260; }
.am-line b { font-weight: 700; color: #241E1D; text-align: left; }
.am-line--strong b { color: #7B211B; }

.am-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.am-table th, .am-table td { padding: 9px 10px; border: 1px solid #E5DBD7; text-align: right; }
.am-table th { background: #F5ECEA; font-weight: 700; }
.am-table caption { caption-side: top; text-align: right; font-size: 13px; color: #6F6260; padding-bottom: 8px; }

.am-note { font-size: 13px; line-height: 1.75; color: #6F581F; background: #FFFCF5; border: 1px solid #E8DABB; border-radius: 8px; padding: 12px 14px; margin: 14px 0 0; }
.am-note--alert { color: #7B211B; background: #F5ECEA; border-color: #E5DBD7; }
.am-error { color: #B8322B; font-size: 14px; font-weight: 700; margin: 10px 0 0; min-height: 1.4em; }
.am-error:empty { margin: 0; }

.am-isl-text { font-size: 17px; line-height: 2.1; color: #241E1D; }
.am-isl-text--quran { font-family: "Traditional Arabic", "Amiri", Tahoma, serif; }
.am-src { display: block; font-size: 12px; color: #6F6260; margin-top: 6px; }

.am-count-pill { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; color: #6F6260; background: #FFFFFF; border: 1px solid #E5DBD7; border-radius: 8px; padding: 5px 10px; }
.am-count-pill b { font-size: 15px; color: #7B211B; }

.am-list { list-style: none; margin: 0; padding: 0; }
.am-list > li { padding: 10px 0; border-bottom: 1px solid #E5DBD7; font-size: 14px; }
.am-list > li:last-child { border-bottom: 0; }

.am-crumb { font-size: 12px; color: #6F6260; margin: 0 0 12px; }
.am-crumb a { color: #6F6260; text-decoration: underline; }

.am-related { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 14px; }
.am-related a { display: block; padding: 12px 14px; border: 1px solid #E5DBD7; border-radius: 12px; text-decoration: none !important; font-size: 14px; font-weight: 700; background: #FFFFFF; }
.am-related a:hover { border-color: #B8322B; background: #F5ECEA; }

@media (max-width: 520px) {
  .am-panel { padding: 12px; }
  .am-grid, .am-checks { grid-template-columns: 1fr; }
  .am-result-total { font-size: 15px; }
  .am-result-total b { font-size: 19px; }
  .am-isl-text { font-size: 16px; }
}
/* خطوات الوِرد وأدوات العدّ، وقواعد الطباعة بلا جافاسكربت. */
.am-step { background: #FFFFFF; border: 1px solid #E5DBD7; border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.am-step.is-done { opacity: .55; border-color: #946C19; }
.am-step.is-active { border-color: #B8322B; }
.am-athkar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 8px; flex-wrap: wrap; }
.am-athkar-title { font-size: 14px; font-weight: 700; color: #7B211B; }
.am-athkar-note { font-size: 12px; color: #6F6260; margin: 8px 0 0; }
.am-step-ctl { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.am-step-ctl .am-btn { min-width: 84px; }
.am-progress { height: 10px; background: #F7F5F3; border: 1px solid #E5DBD7; border-radius: 8px; overflow: hidden; margin: 10px 0 14px; }
.am-progress-bar { height: 100%; width: 0; background: #B8322B; transition: width .2s ease; }
@media print {
  .am-no-print, .am-step-ctl { display: none !important; }
  .am-step, .am-panel { border: 1px solid #E5DBD7; break-inside: avoid; }
  .am-step.is-done { opacity: 1; }
}
