/* City prayer-time pages (Laravel #259, #262): the parts only this page has, on top of frame.css, which holds
   the look every page shares (the sky stage, the light sheet, blocks, buttons, the menu, the foot and the
   bottom bar; #328). The prayer icons are the original files. Nothing here is drawn or invented. */

/* Icons are the original 1x exports, used as masks so they take the colour of their row. */
.ico {
  display: inline-block; flex: none; width: 24px; height: 24px; background: currentColor;
  -webkit-mask: var(--icon) center / auto no-repeat; mask: var(--icon) center / auto no-repeat;
}
.ico--fajr { --icon: url("/website-tools/icons/fajr.png"); }
.ico--sunrise { --icon: url("/website-tools/icons/sunrise.png"); }
.ico--dhuhr { --icon: url("/website-tools/icons/dhuhr.png"); }
.ico--asr { --icon: url("/website-tools/icons/asr.png"); }
.ico--maghrib { --icon: url("/website-tools/icons/maghrib.png"); }
.ico--isha { --icon: url("/website-tools/icons/isha.png"); }
.ico--now { --icon: url("/website-tools/icons/now.png"); width: 41px; height: 16px; }

.now-head .ico { margin-bottom: 8px; }
/* The bar is the day from midnight to midnight; each dot is one of today's times, and the band is the last
   third of last night (the colour of the band on the prayer card's timeline). */
.bar-fill { position: relative; }
.dot { position: absolute; top: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--white); }
.bar-band { position: absolute; top: -6px; height: 17px; border-radius: 4px; background: rgba(255, 211, 82, 0.26); }
.dot--next { background: transparent; box-shadow: inset 0 0 0 1px var(--white); }
.now-foot { flex-wrap: wrap; gap: 0 12px; font-variant-numeric: tabular-nums; }

/* As in the app: the date large on the left with the Islamic date under it, "Go To Date" on the right. */
.stage-day { margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--date); }
.stage-day-text { min-width: 0; font-size: 0.9rem; line-height: 1.6; }
.stage-day h1 { margin: 0; font-size: 0.9rem; font-weight: 600; line-height: 1.6; color: var(--date); overflow-wrap: anywhere; }
.stage-day .greg { font-size: 1.35rem; line-height: 1.3; color: var(--white); }
/* The date field covers the whole button, so a tap lands on it; it is see-through, the label draws the button. */
.date-go {
  position: relative; flex: none; min-width: var(--tap); min-height: var(--tap); padding: 4px 6px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.85rem; color: var(--white); white-space: nowrap; cursor: pointer;
}
/* Ionicons "calendar-outline" (MIT), the icon the app's "Go To Date" uses: the original file, used as a mask. */
.date-go-icon {
  display: block; width: 28px; height: 28px; background: currentColor;
  -webkit-mask: url("/website-tools/icons/calendar-outline.svg") center / contain no-repeat;
  mask: url("/website-tools/icons/calendar-outline.svg") center / contain no-repeat;
}
.date-go input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.date-go:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.stage-today { margin: 0; }
.today-link {
  min-height: var(--tap); padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.9rem; color: var(--gold); text-decoration: underline; text-underline-offset: 3px;
}

/* Name, icon, time, as in the design. The narrow fourth column holds a prayer's sound button. */
.stage .times { list-style: none; margin: 22px 0 0; padding: 0 0 0 clamp(0px, 6vw, 28px); }
.stage .time { display: grid; grid-template-columns: 1fr 24px 1fr var(--tap); align-items: center; gap: 0 12px; min-height: 49px; font-size: 1.1rem; }
.stage .time .at { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stage .time .at small { font-size: inherit; margin-left: 0.25em; }
/* As in the design: times already passed are blue, the current one gold, the ones ahead white. */
.stage .time[data-state="passed"] { color: var(--blue); }
.stage .time[data-state="current"] { color: var(--gold); }
.sound-btn {
  grid-column: 4; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: none; color: inherit; cursor: pointer;
}
.sound-btn svg { width: 20px; height: 20px; }
.audio-status { display: block; font-size: 0.75rem; color: var(--gold); }
.audio-status:empty { display: none; }
.playback-bar { display: flex; gap: 12px; margin-top: 12px; padding: 0 clamp(0px, 6vw, 28px); }
.stage-btn {
  flex: 1; min-height: var(--tap); padding: 0 22px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--white); background: none; color: var(--white); font: inherit; font-weight: 600;
}
.stage-btn.mute { border-color: var(--gold); color: var(--gold); }
.stage .extras, .stage .notice, .stage-foot { padding: 0 clamp(0px, 6vw, 28px); font-size: 0.85rem; color: var(--date); }
.tahajjud, .kahf-reminder { font-size: 0.85rem; color: var(--date); }
.stage .extras { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 14px; }
.stage .extras b { margin-left: 6px; font-weight: 400; color: var(--white); font-variant-numeric: tabular-nums; }
.tahajjud, .kahf-reminder { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; }
.tahajjud svg, .kahf-reminder svg { flex: none; width: 24px; height: 24px; margin-top: 2px; color: var(--gold); }
.tahajjud p, .kahf-reminder p { margin: 0; }
.th-line, .kr-line { font-size: 1rem; color: var(--white); }
.th-line b, .kr-line b { font-weight: 600; }
.th-range { color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.th-sub { margin-top: 2px !important; }
/* The Friday reminder (#348) shares the Tahajjud band's rules above; its second line wraps evenly on small phones. */
.kahf-reminder .kr-sub { margin-top: 2px; text-wrap: balance; }
.th-quote { margin-top: 8px !important; font-style: italic; }
.th-quote span { font-style: normal; margin-left: 4px; }
.stage .notice { margin: 14px 0 0; color: var(--gold); }
.stage-foot { margin-top: 18px; }
.stage-foot p { margin: 0 0 6px; }
.stage-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.stage-foot a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--white); text-underline-offset: 3px; }
/* "How these times are worked out", open on the sky under the summary line (layout B, Aziz 2026-11-21; drawn in
   qa-results/2026-11-22-city-method-options). The small text keeps the Imsak/Sunset line's size and colour; the
   heading, labels and links are the sky's white; the selects are the form fields' white with dark text. */
.method { display: grid; gap: 10px; margin: 14px 0 4px; padding-top: 14px; border-top: 1px solid var(--track); }
.stage-foot .method p { margin: 0; }
.method-title { margin: 0; font-size: 1rem; font-weight: 600; color: var(--white); }
.method-form { display: grid; gap: 10px; }
.method-field { display: grid; gap: 6px; min-width: 0; }
.method-field label { font-weight: 600; color: var(--white); }
.method select {
  width: 100%; min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px;
  background-color: var(--white); color: var(--ink); font: inherit; font-size: 1rem; text-overflow: ellipsis; cursor: pointer;
}
.method select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
/* Update times (without scripts only) and Back to default: the sky's outlined buttons, as Mute and Stop audio. */
.method-apply, .method-reset { justify-self: start; }
.method-facts { font-variant-numeric: tabular-nums; }
.stage-foot .method-note { font-size: 0.8rem; }

/* ---------- The sheet's blocks ---------- */
/* The breadcrumb, at the top of the light sheet: one step after another. Steps wrap on narrow screens
   (280 px); only the links carry the 44 px touch size, so the page's own name wraps close under them. */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; min-height: 28px; }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover, .crumbs [aria-current="page"] { color: var(--purple); }
.crumbs [aria-current="page"] { font-weight: 700; }
.crumbs + .block { border-top: 0; padding-top: 12px; }
.block p:last-child { margin-bottom: 0; }
.block-tools { margin: 0 0 4px; }
.fact b { font-variant-numeric: tabular-nums; }
/* The frame's button, on a real button ("Update times", "Share with friends"). */
button.btn { cursor: pointer; font: inherit; font-weight: 600; }
button.btn:not(.btn--primary) { background: none; }
.link { color: var(--purple); font-weight: 700; }

/* Masjids: nearest first. Verified ones link to their page; the others carry a "not verified yet" tag. */
.masjids { list-style: none; margin: 12px 0 0; padding: 0; }
.masjids li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.masjids .m-name { line-height: 1.35; overflow-wrap: anywhere; }
.masjids .m-name a { display: inline-flex; align-items: center; min-height: var(--tap); }
.masjids .m-dist { display: block; font-size: 0.85rem; color: var(--muted); }
.tag { flex: none; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--white); color: var(--muted); white-space: nowrap; }
.invite { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--white); }
.invite h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--purple); }
.share-status { margin-top: 8px !important; font-size: 0.85rem; color: var(--purple); font-weight: 600; }
.share-status:empty { display: none; }

/* Monthly timetable. */
.month-status { margin: 10px 0 0 !important; }
.month-status:empty { display: none; }
.month.updating td { opacity: 0.45; }
.hijri-span { display: none; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table.month { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.month th, .month td { padding: 9px 8px; text-align: right; white-space: nowrap; border-top: 1px solid var(--line); font-weight: 400; }
.month thead th { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; border-top: 0; }
.month th:first-child { text-align: left; }
.month .day small { display: block; color: var(--muted); font-size: 0.8rem; }
.month .day small.hd { display: none; }
.month .note { display: block; font-size: 0.75rem; font-weight: 700; color: var(--purple); }
/* Fridays keep the light tint the timetable had before this look. */
.month tr.friday th, .month tr.friday td { background: #fafafc; }
/* Today: the white row of the design. */
.month tr.today th, .month tr.today td { background: var(--white); color: var(--purple); font-weight: 700; }
.month tr.today small { font-weight: 400; }
/* AM/PM after every time (Aziz chose version A, 2026-11-22; drawn in qa-results/2026-11-22-timetable-ampm). Each time
   is <time datetime="05:39">5:39 <span class="ap">AM</span></time>: the real space is for screen readers and copying,
   the negative margin takes it back out of the picture. Small, regular weight and muted (4.58:1 on the sheet). */
.month time { white-space: nowrap; }
.month .ap { margin-left: -0.24em; font-size: 0.72em; font-weight: 400; color: var(--muted); }
/* The note that stands in for the suffixes on the narrowest phones (version B, below). */
.month-ampm { display: none; }

/* Islamic days. */
.eyebrow-light { margin: 0 0 6px !important; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.day-when b { color: var(--purple); }
.day-also:empty { display: none; }
.day-caveat { font-size: 0.8rem; }
/* The visitor's adjustment of the Islamic date: a label, a minus and a plus button around the value. */
.hijri-adjust { margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hijri-adjust-label { font-weight: 600; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); }
.stepper button { width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: none; font: inherit; font-size: 1.25rem; font-weight: 700; color: var(--purple); cursor: pointer; }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper output { min-width: 64px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.hijri-adjust-note { flex-basis: 100%; margin: 0 !important; font-size: 0.85rem; color: var(--purple); font-weight: 600; }
.hijri-adjust-note:has(#hijri-adjust-note:empty) { display: none; }
.link-button { min-height: var(--tap); min-width: var(--tap); padding: 0 8px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--purple); text-decoration: underline; cursor: pointer; }

/* The same adjustment on the sky, a small outlined pill directly under the Islamic date (left-aligned with the
   date text, on its own row so it never meets "Go To Date"). One value with the card's control below.
   Drawn in qa-results/2026-11-22-islamic-date-adjuster-v2 (approved 2026-11-22). */
.adj-row { margin-top: 6px; }
.adj { display: inline-flex; align-items: center; border-radius: 999px; }
.adj--sky { color: var(--white); background: rgb(255 255 255 / 10%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 45%); }
.adj-btn {
  flex: none; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; color: inherit; cursor: pointer; font: inherit; font-size: 1.5rem; font-weight: 600; line-height: 1;
}
/* At the end of the range the button stays focusable (aria-disabled, not disabled), so focus is never dropped. */
.adj-btn[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.adj-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.adj-mid { display: flex; flex-direction: column; align-items: center; min-width: 6.6rem; line-height: 1.15; }
.adj-label { font-size: 0.75rem; font-weight: 400; color: var(--date); white-space: nowrap; }
.adj-value { font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The credit the city list owes (GeoNames, CC BY 4.0): a plain line at the end of the frame's foot. */
.foot-credit { margin: 0; }

/* Phones, and the narrowest two-column screens: the Hijri month is shown once above the table (.hijri-span)
   instead of in every row, so the date column stays narrow and all seven columns fit. */
@media (max-width: 640px), (min-width: 900px) and (max-width: 1099px) {
  .month .day small:not(.wd):not(.hd) { display: none; }
  .month .day small.hd { display: block; }
  .month .note { white-space: normal; }
  .hijri-span { display: block; }
  /* The date column stays put while the times scroll sideways if they ever need to. */
  .month tbody th, .month thead th:first-child { position: sticky; left: 0; background: var(--sheet); z-index: 1; }
  .month tr.friday th { background: #fafafc; }
  .month tr.today th { background: var(--white); }
}
@media (max-width: 519px) {
  .month th, .month td { padding: 8px 3px; font-size: 0.8rem; }
  .month thead th { font-size: 0.62rem; letter-spacing: 0.04em; }
  .month .day small, .month .note { font-size: 0.68rem; }
}
/* AM/PM version A: the suffix makes each time about a third wider, so where the sheet is narrow for seven columns
   the cells give up some of their side padding. Small phones (360 to 439px) also let the text follow the screen
   width (11.2px at 360, 12.8px from 413px). Tested with London in June (Isha after midnight, three five-character
   columns); see qa-results/2026-11-22-option-d-328/b-round3. */
@media (min-width: 360px) and (max-width: 439px) {
  .month th, .month td { padding-inline: 1.5px; font-size: min(3.1vw, 0.8rem); }
}
@media (min-width: 520px) and (max-width: 699px) {
  .month th, .month td { padding-inline: 4px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .month th, .month td { padding-inline: 3px; font-size: 0.92rem; }
}
@media (max-width: 359px) {
  /* Version B: the note under the heading gives the usual AM/PM of each column, and only a time that breaks it
     shows its suffix. Every other suffix stays in the page for screen readers, out of sight. */
  .month-ampm { display: block; }
  .month .ap:not(.ap--odd) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .month th, .month td { padding: 8px 2px; font-size: 0.72rem; }
  .month thead th { font-size: 0.56rem; letter-spacing: 0; }
  .stage .time { gap: 0 8px; }
}
/* The fold cover (about 280px): the table was already a little wider than the sheet; a little less space around the
   cells brings it inside (as drawn for version B). */
@media (max-width: 291px) {
  .month th, .month td { padding-inline: 1.5px; }
  .month th:first-child { padding-left: 2px; }
  .month .day small, .month .note { font-size: 0.62rem; }
}
/* The frame pins the sky side on tall wide screens "only when the whole of it fits on the screen". This page's
   stage (six times, the sound buttons, Tahajjud, the links) is taller than those screens, so it is not pinned
   and scrolls with the page, as in the approved build. */
@media (min-width: 900px) and (min-height: 880px) {
  .stage-in { position: relative; }
}
