/* Prayer times card, shared by the home page (index.html) and the city prayer-time pages.
   Moved here unchanged from index.html on 2026-11-18 so every page uses one copy. LOCAL TEST PAGES ONLY.
   Markup: see the <div class="prayer-card grain"> block in index.html; script: assets/prayer-card.js. */
.prayer-card {
  background: linear-gradient(160deg, var(--card-mid) 0%, var(--panel) 100%);
  color: var(--white);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(8, 3, 40, 0.45);
  padding: 32px 36px 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.prayer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted-on-dark);
  margin: 0 0 6px;
}
.place {
  font-size: 26px;
  font-weight: 600;
  color: var(--gold);
  margin: 0;
}
.place-country { margin: 2px 0 0; font-size: 14px; color: var(--muted-on-dark); }
.place-country:empty { display: none; }
.place-source { margin: 4px 0 0; font-size: 13px; color: var(--muted-on-dark); }
.place-source:empty { display: none; }
.place-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.prayer-card .btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--white);
}
.prayer-card .btn:hover { background: rgba(255, 255, 255, 0.1); }
/* The card is dark, so its focus rings are gold (the sheet around it uses purple). */
.prayer-card :focus-visible { outline-color: var(--gold); }
.prayer-card .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.prayer-card .btn.primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.prayer-card .btn.primary:hover { background: #ffd84f; }
.prayer-card .btn[disabled] { opacity: 0.6; cursor: progress; }
/* Links styled as the card's buttons ("Prayer times by city" on the home page). */
.prayer-card a.btn { display: inline-flex; align-items: center; text-decoration: none; }
/* Controls that need scripts are written hidden and shown by the script that works them. */
.prayer-card [hidden] { display: none !important; }

.date-nav { display: flex; align-items: center; gap: 10px; }
.date-nav button {
  /* Never squeezed below the 44 px touch size when the date beside them is long. */
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}
.date-nav button:hover { background: rgba(255, 255, 255, 0.1); }
.date-nav button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.date-text { text-align: center; min-width: 210px; }
.date-text .greg { font-size: 18px; font-weight: 600; }
.date-text .hijri { font-size: 14px; color: var(--muted-on-dark); margin-top: 2px; }
.today-link {
  background: none; border: 0; color: var(--gold); font: inherit; font-size: 13px;
  text-decoration: underline; cursor: pointer; padding: 4px; margin-top: 2px;
}

/* Countdown tile + 24-hour timeline (same layout rules as the app's PrayerDayTimeline). */
.day-tile {
  margin: 24px 0 22px;
  padding: 24px 28px 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
/* On the narrowest screens (280 px) the countdown moves under a long "Tomorrow at …" line instead of off the card. */
.day-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; }
.day-head .eyebrow { margin-bottom: 4px; }
.tile-name { margin: 0; font-size: 44px; line-height: 1.05; font-weight: 700; }
.tile-at { margin: 6px 0 0; font-size: 16px; color: var(--muted-on-dark); }
.tile-count { text-align: right; }
.count { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile-count[hidden] { display: none; }
.timeline { position: relative; height: 56px; margin: 22px 26px 6px; }
.timeline .rail, .timeline .elapsed {
  position: absolute; top: 26px; height: 4px; border-radius: 2px;
}
.timeline .rail { left: 0; right: 0; background: rgba(255, 255, 255, 0.28); }
.timeline .elapsed { left: 0; background: var(--gold); }
.timeline .band {
  position: absolute; top: 19px; height: 18px; border-radius: 4px;
  background: rgba(255, 211, 82, 0.26);
}
.timeline .mark { position: absolute; top: 28px; }
.timeline .dot {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--white);
}
.timeline .lbl {
  position: absolute; left: -36px; width: 72px; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--white); white-space: nowrap;
}
.timeline .lbl.above { bottom: 10px; }
.timeline .lbl.below { top: 10px; }
.timeline .now {
  position: absolute; top: 18px; width: 4px; margin-left: -2px; height: 20px;
  border-radius: 2px; background: var(--gold);
}
.tahajjud {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.tahajjud[hidden] { display: none; }
.tahajjud svg { width: 24px; height: 24px; color: var(--gold); flex: none; margin-top: 2px; }
.tahajjud p { margin: 0; }
.th-line { font-size: 16px; }
.th-range { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.th-sub { font-size: 14px; color: var(--muted-on-dark); margin-top: 3px !important; }
.th-quote { font-size: 13px; font-style: italic; color: var(--muted-on-dark); margin-top: 8px !important; }
.th-quote span { font-style: normal; opacity: 0.8; margin-left: 4px; }

.times {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.time {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 18px 18px 16px;
}
.time .name { font-size: 15px; color: var(--muted-on-dark); font-weight: 600; }
.time .at { font-size: 30px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.time .at small { font-size: 15px; font-weight: 600; margin-left: 3px; }
.time.current { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.time.current .name { color: var(--ink); }
.time .tag {
  display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
/* Adhan: per-prayer sound button + sheet, same flow as the app's PrayerSoundControls. */
.time { position: relative; }
.sound-btn {
  position: absolute; top: 8px; right: 8px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  display: grid; place-items: center; opacity: 0.85;
}
.sound-btn:hover { background: rgba(255, 255, 255, 0.12); opacity: 1; }
.time.current .sound-btn:hover { background: rgba(13, 6, 71, 0.1); }
.sound-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.sound-btn svg { width: 22px; height: 22px; }
.audio-status { display: block; font-size: 12px; font-weight: 600; color: var(--gold); margin-top: 4px; min-height: 0; }
.audio-status:empty { display: none; }
.time.playing { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.time.current .audio-status { color: var(--ink); }
.playback-bar { display: flex; gap: 10px; margin-top: 14px; }
.playback-bar[hidden] { display: none; }
.playback-bar .btn { flex: 1; min-height: 48px; border-radius: 10px; }
.playback-bar .mute { border-color: var(--gold); color: var(--gold); }

.extras {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin-top: 18px; font-size: 14px; color: var(--muted-on-dark);
}
.extras b { color: var(--white); font-weight: 600; margin-left: 6px; font-variant-numeric: tabular-nums; }
.prayer-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px; color: var(--muted-on-dark);
}
.prayer-card .notice {
  margin-top: 14px; padding: 12px 14px; border-radius: 8px;
  background: rgba(245, 204, 52, 0.12); color: #ffe8a0; font-size: 14px;
}
.prayer-card .notice[hidden] { display: none; }
.skeleton .at { color: transparent; background: rgba(255,255,255,0.12); border-radius: 6px; }

@media (max-width: 980px) {
  /* Tablets and phones: one prayer per row (five tiles left an empty slot in a 3-column grid). */
  .times { grid-template-columns: 1fr; gap: 8px; }
  .time { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 10px 16px; }
  .time .tname { flex: 1; }
  .sound-btn { position: static; order: 3; flex: none; }
  .time .name { font-size: 17px; }
  .time .at { font-size: 24px; margin-top: 0; }
}
@media (max-width: 640px) {
  .prayer-card { padding: 24px 18px; }
  .date-text { min-width: 0; }
  .day-tile { padding: 18px 16px; }
  .tile-name { font-size: 32px; }
  .count { font-size: 28px; }
  .timeline { margin: 18px 18px 4px; }
  .timeline .lbl { font-size: 11px; width: 56px; left: -28px; }
}
