/* Hijri calendar: tool styles only. Colours come from the shell variables. */
#app { display: grid; gap: 16px; min-height: 420px; }
#hc-year { font-family: var(--font-num); font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap; }

.hc-today { text-align: start; }
.hc-today-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hc-big { margin: 6px 0 0; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hc-greg { margin: 4px 0 0; color: var(--muted); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hc-ramadan {
  margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums;
}
.hc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 14px 10px; }
.hc-actions .c2b-btn { min-height: 44px; }
.hc-estimate { color: var(--warn); }

.hc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hc-bar .c2b-btn, .hc-select { min-height: 44px; }
.hc-step { min-width: 44px; padding-inline: 0; font-size: 1.4rem; line-height: 1; }
.hc-select { flex: 1 1 120px; max-width: 200px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.hc-todaybtn { margin-inline-start: auto; }

.hc-months { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 700px) { .hc-months { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .hc-months { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.hc-month { padding: 16px; scroll-margin-top: 12px; min-width: 0; }
.hc-month--now { border-color: var(--accent); }
.hc-month-name { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.hc-month-year { color: var(--muted); font-weight: 500; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.hc-range { margin: 2px 0 12px; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }

.hc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.hc-wd { text-align: center; font-size: .7rem; color: var(--muted); padding-block: 4px; overflow: hidden; white-space: nowrap; }
.hc-wd--fri { color: var(--accent); }
.hc-cell {
  position: relative; min-height: 46px; padding: 4px 1px; border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--surface-2); min-width: 0;
}
.hc-cell--blank { background: transparent; }
.hc-cell--fri { background: color-mix(in srgb, var(--accent) 9%, var(--surface-2)); }
.hc-hd { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 1.05rem; font-weight: 700; line-height: 1.1; }
.hc-gd { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: .64rem; color: var(--muted); line-height: 1.1; white-space: nowrap; }
html[lang="ar"] .hc-gd { font-family: inherit; font-size: .6rem; max-width: 100%; overflow: hidden; }
.hc-cell--today { background: var(--accent); color: var(--accent-ink); }
.hc-cell--today .hc-gd { color: var(--accent-ink); opacity: .85; }
.hc-dot { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hc-cell--today .hc-dot { background: var(--accent-ink); }
.hc-cell--key { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }

.hc-keys-title { margin-block-start: 0; }
.hc-keylist { list-style: none; margin: 0; padding: 0; }
.hc-key {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  padding-block: 12px; border-block-start: 1px solid var(--line);
}
.hc-key:first-child { border-block-start: 0; }
.hc-key-main, .hc-key-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hc-key-side { text-align: end; margin-inline-start: auto; }
.hc-key-h, .hc-key-g { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.hc-key-rel { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--muted); }
.hc-key-rel--next { color: var(--accent); font-weight: 600; }

@media (max-width: 420px) {
  .hc-month { padding: 12px; }
  .hc-printbtn { flex: 1 1 auto; }
}

@media print {
  .c2b-head, .c2b-foot, .c2b-hero .c2b-lede, .hc-bar, .hc-actions, .hc-today, .c2b-section, .c2b-faq, .c2b-btn { display: none !important; }
  html, body { background: white !important; color: black !important; }
  #app { display: block; min-height: 0; }
  .hc-months { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; }
  .hc-month, .hc-keys { box-shadow: none !important; background: white !important; border: 1px solid gray !important; padding: 8px; break-inside: avoid; }
  .hc-cell, .hc-cell--fri { background: white !important; color: black !important; min-height: 30px; border: 1px solid lightgray; border-radius: 0; }
  .hc-cell--today { background: white !important; color: black !important; border: 2px solid black; }
  .hc-cell--blank { border: 0; }
  .hc-gd, .hc-range, .hc-wd, .hc-month-year, .hc-key-h, .hc-key-g, .hc-key-rel, #hc-year { color: black !important; }
  .hc-dot { background: black !important; }
  .hc-keysbox { margin-block-start: 10px; }
}
