/*
  LVL5-FAMILY: the printable dua sheets (Views/DuaSheets/Sheet.cshtml), on top of coursesheet.css (the page, the tools
  and the head). A4, always light: two dense columns of dua cards, each with its moment, the stored Arabic large and
  right to left, the transliteration, the meaning, the reference and a small QR code to the video that says it. Teens
  bolder; kids bigger, with a picture of each moment and seven tick boxes for the week. Logical properties throughout.
*/
.ds-sheet { display: flex; flex-direction: column; }
.ds-sheet + .ds-sheet { break-before: page; }

.ds-rows {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 4mm;
  margin: 0; padding: 0; list-style: none; counter-reset: dua;
}
.ds-row {
  counter-increment: dua;
  position: relative; display: flex; flex-direction: column;
  padding: 2.4mm 3mm 2mm; border-radius: 2.2mm;
  background: linear-gradient(180deg, var(--cs-tint), #fff 38%);
  border: .25mm solid color-mix(in srgb, var(--cs-accent) 34%, #fff);
  border-inline-start: 1.1mm solid var(--cs-accent);
  break-inside: avoid;
}
.ds-row::before {
  content: counter(dua);
  position: absolute; inset-inline-end: 2.4mm; top: 2mm;
  width: 5mm; height: 5mm; border-radius: 50%;
  background: var(--cs-strong); color: #fff;
  font: 800 6.6pt/5mm var(--cs-sans); text-align: center;
}
.ds-row-head { display: flex; align-items: center; gap: 2mm; padding-inline-end: 6mm; }
.ds-when { margin: 0; font: 800 7.6pt/1.25 var(--cs-sans); letter-spacing: .02em; color: var(--cs-strong); }
.ds-ar {
  margin: 1.2mm 0 .6mm; font-family: var(--cs-arabic); font-size: 15pt; line-height: 1.9;
  text-align: right; color: var(--cs-ink);
}
.ds-tr { margin: 0; font-style: italic; font-size: 7.6pt; color: var(--cs-ink-2); }
.ds-mean { margin: .8mm 0 0; font-size: 8pt; color: var(--cs-ink); }
.ds-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 2mm; margin-top: auto; padding-top: 1.2mm; }
.ds-ref { margin: 0; font-size: 6.2pt; color: var(--cs-muted); }
.ds-qr { flex: none; width: 11mm; height: 11mm; }
.ds-qr svg { display: block; width: 100%; height: 100%; }
.ds-sheet-foot { margin-top: auto; padding-top: 3mm; }

/* ---------- Teens: bolder ---------- */
.cs--teen .ds-row { background: #fff; border-color: var(--cs-ink); border-inline-start-color: var(--cs-accent); border-inline-start-width: 1.6mm; }
.cs--teen .ds-row::before { background: var(--cs-ink); }
.cs--teen .ds-when { text-transform: uppercase; letter-spacing: .06em; color: var(--cs-ink); }

/* ---------- Kids: bigger, a picture of the moment, tick boxes for the week ---------- */
.cs--kid .ds-rows { gap: 4mm 5mm; }
.cs--kid .ds-row { padding: 3mm 3.4mm 2.6mm; border-radius: 4mm; border-width: .6mm; border-inline-start-width: .6mm; background: linear-gradient(180deg, color-mix(in srgb, #ffd54a 20%, #fff), #fff 45%); }
.cs--kid .ds-row::before { width: 6.4mm; height: 6.4mm; line-height: 6.4mm; font-size: 8.5pt; background: var(--cs-accent); }
.ds-pic { flex: none; width: 11mm; height: 11mm; padding: 1.4mm; box-sizing: border-box; border-radius: 3mm; background: #fff; color: var(--cs-strong); border: .5mm solid color-mix(in srgb, var(--cs-accent) 45%, #fff); }
.ds-pic svg { display: block; width: 100%; height: 100%; }
.cs--kid .ds-when { font-size: 11pt; }
.cs--kid .ds-ar { font-size: 19pt; }
.cs--kid .ds-tr, .cs--kid .ds-mean { font-size: 9.5pt; }
.ds-week { display: flex; gap: 1.4mm; margin: 1.6mm 0 0; font: 700 6.4pt/1 var(--cs-sans); color: var(--cs-muted); }
.ds-week span { display: flex; flex-direction: column; align-items: center; gap: .6mm; }
.ds-week i { width: 5mm; height: 5mm; border: .6mm solid #ffb020; border-radius: 1.2mm; background: #fff; }

/* Arabic and Urdu interface words: no letter spacing (it breaks the joins). */
.cs-body:lang(ar) .ds-when, .cs-body:lang(ur) .ds-when { letter-spacing: 0; text-transform: none; font-size: 9pt; }

@media screen and (max-width: 820px) {
  .ds-rows, .cs--kid .ds-rows { grid-template-columns: 1fr; }
  .ds-ar { font-size: 22px; }
}

@media print {
  .ds-sheet { min-height: 277mm; }
}
