/* Daily times stay on Today. The optional week fits the viewport without sideways dragging. */
#todayPrayerTable .today-prayer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#todayPrayerTable .today-prayer-actions .btn { flex: 1 1 140px; min-width: 0; min-height: 44px; }
#todayPrayerTable .today-isha-option { order: 2; display: grid; gap: 6px; }
#todayPrayerTable .today-isha-option .today-true-isha-bar { width: 100%; min-height: 44px; margin: 0; white-space: normal; }
#todayPrayerTable .today-isha-hint { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }
html[data-true-isha='on'] #todayPrayerTable .isha-selected-time { flex-direction: column; gap: 2px !important; }
html[data-look='modern'][data-true-isha='on'] #todayPrayerTable #ishaAdhanLabel.is-on { display: block !important; font-size: .76rem; line-height: 1.4; }
html[data-look='modern'] #todayPrayerTable .true-isha-label { display: block; font-size: .76rem; line-height: 1.4; }
html[data-look='modern'][data-true-isha='on'] #todayPrayerTable #trueIshaContainer { gap: 2px; margin-top: 6px; font-size: .9rem; line-height: 1.4; }
html[data-true-isha='off'] #trueIshaContainer { display: none !important; }

body.week-prayer-open { overflow: hidden; }
#weekPrayerDialog {
  box-sizing: border-box;
  width: min(760px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg2);
  color: var(--fg);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 80px #0005;
}
#weekPrayerDialog:not([open]) { display: none; }
#weekPrayerDialog::backdrop { background: #07122599; backdrop-filter: blur(4px); }
.week-prayer-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.week-prayer-dialog__head h2 { margin: 0; font-size: 1.25rem; }
.week-prayer-dialog__head .btn { min-height: 44px; padding: 8px 14px; font-size: .9rem; }
.week-prayer-dialog__hint { margin: 8px 0 12px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
#weekPrayerDialog .week-prayer-wrap { max-width: 100%; overflow: visible; }
#weekPrayerDialog .week-prayer-wrap::before { display: none; }
#weekPrayerDialog #weekPrayerTable { width: 100%; min-width: 0; table-layout: fixed; margin: 0; border-collapse: separate; border-spacing: 0; }
#weekPrayerDialog #weekPrayerTable th,
#weekPrayerDialog #weekPrayerTable td { min-width: 0; padding: 7px 2px; font-size: .875rem; line-height: 1.35; text-align: center; white-space: normal; overflow-wrap: anywhere; }
#weekPrayerDialog #weekPrayerTable thead th { font-size: .82rem; font-weight: 700; }
#weekPrayerDialog #weekPrayerTable th:first-child { width: 16%; }
#weekPrayerDialog #weekPrayerTable tbody th { font-size: .8rem; }
#weekPrayerDialog .week-clock { display: block; white-space: nowrap; font-family: var(--font-ui); font-variant-numeric: tabular-nums; font-weight: 700; unicode-bidi: isolate; }
#weekPrayerDialog .week-period { display: block; font-size: .75rem; line-height: 1.3; color: var(--muted); }
#weekPrayerDialog .week-date { display: block; margin-top: 2px; font-size: .72rem; font-weight: 400; }
#weekPrayerDialog #weekPrayerTable .is-today th,
#weekPrayerDialog #weekPrayerTable .is-today td { background: color-mix(in srgb, var(--accent) 10%, var(--bg2)); color: var(--accent); }
#weekPrayerDialog .btn:focus-visible,
#todayPrayerTable .js-open-week-prayers:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 380px) {
  #weekPrayerDialog { width: calc(100vw - 12px); max-width: calc(100vw - 12px); padding: 8px; border-radius: 16px; }
  #weekPrayerDialog #weekPrayerTable th,
  #weekPrayerDialog #weekPrayerTable td { padding-inline: 1px; }
}
