/* Athar 4.1.1 — approved Today, Qada, and Arabic Dua refinements. */
/* The Gregorian date and the Hijri date share one compact baseline. */
#view-today .today-dates{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-width:0;margin:0 0 9px;white-space:nowrap;direction:ltr}
#view-today .gregorian-date{font:700 clamp(9px,2.65vw,12px)/1.3 var(--font-english);letter-spacing:.035em;color:var(--muted);min-width:0;white-space:nowrap;}
#view-today .gregorian-short{display:none}
#view-today .date-divider{height:15px;width:1px;flex:0 0 1px;background:var(--line)}
#view-today .hijri-chip{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;white-space:nowrap;max-width:53%;font:650 clamp(10px,2.65vw,12px)/1.2 var(--font-english);color:var(--accent);background:var(--surface2);border:1px solid var(--line);border-radius:100px;padding:6px 9px;overflow:hidden;text-overflow:ellipsis}
#view-today .today-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:45px!important;direction:ltr!important}
#view-today .today-heading .page-title{font-size:clamp(30px,8.9vw,43px)!important;line-height:1.2!important;flex:0 1 auto!important;white-space:nowrap!important;min-width:0!important}
#view-today .today-heading .page-title.is-long{font-size:clamp(26px,7.3vw,38px)!important}
#view-today .today-heading-actions{display:flex;align-items:center;gap:9px;flex-shrink:0;margin-left:auto}
#view-today .today-heading .day-calendar-trigger{width:39px;height:39px;min-width:39px;min-height:39px;flex:0 0 39px!important;margin:0!important;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--text);padding:0}
#view-today .today-heading .return-today.inline-return{position:static!important;display:inline-flex!important;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:34px;height:34px;max-width:100%;padding:5px 10px!important;margin:0!important;border-radius:999px!important;border:1px solid rgba(var(--accent-rgb),.55)!important;background:transparent!important;color:var(--accent)!important;text-decoration:none!important;line-height:1!important;font-size:clamp(9px,2.5vw,12px)!important;white-space:nowrap;font-weight:650;transform:none!important}
#view-today .today-heading .inline-return svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#view-today .today-heading .inline-return::before,#view-today .today-heading .inline-return::after{content:none!important;display:none!important}
#view-today .today-subrow{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;min-height:31px!important;margin-top:10px!important;margin-bottom:12px!important;color:var(--muted);font-size:14px}
#view-today .prayer-info-trigger{width:24px;height:24px;min-width:24px;padding:1px;display:grid;place-items:center;border:none;border-radius:50%;color:var(--muted);background:transparent;cursor:pointer}
#view-today .prayer-info-trigger svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
#view-today .prayer-info-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#view-today .prayer-stack{gap:10px!important;margin-top:13px}
#view-today .prayer-line{border-radius:19px!important}
#view-today .status-switch .state-btn{box-sizing:border-box;display:grid;place-items:center}
#view-today .status-switch .state-btn svg{width:17px;height:17px;overflow:visible}
#view-today .status-switch .state-btn.early svg{width:17px;height:17px;stroke-width:1.65}
#view-today .status-switch .state-btn.early[aria-pressed=true]{background:var(--accent)!important;border-color:var(--accent)!important;color:var(--accent-ink)!important}
#view-today .status-switch .state-btn.on-time[aria-pressed=true]{color:var(--accent-ink)!important}
/* A neutral overlay with an explanatory modal; no permanent clutter below prayers. */
#modal-backdrop:has(.prayer-status-sheet) .modal{border-radius:24px 24px 0 0;max-width:min(100%,560px);background:var(--surface)!important;border:1px solid var(--line);padding-top:24px}
.prayer-status-sheet h2{font-size:clamp(21px,5vw,27px);font-weight:750;letter-spacing:-.035em;margin:3px 0 20px;color:var(--text)}
.prayer-help-items{display:flex;flex-direction:column}
.prayer-help-item{display:flex;align-items:center;gap:13px;padding:12px 0;border-bottom:1px solid var(--line)}
.prayer-help-item:last-child{border-bottom:0}
.prayer-help-glyph{flex:0 0 51px;width:51px;height:51px;border-radius:14px;border:1px solid var(--line);display:grid;place-items:center;background:var(--surface2);color:var(--accent)}
.prayer-help-glyph svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.prayer-help-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;line-height:1.4;color:var(--text);font-size:15px}
.prayer-help-copy strong{font-weight:700}
.prayer-help-copy>span{color:var(--muted);font-size:13px;line-height:1.4}
/* All Qada segmented-control accent color stays inside the active choice. */
#view-qada .segmented,body[data-theme=dark] #view-qada .segmented,body[data-theme=oled] #view-qada .segmented{background:var(--surface2)!important;border:1px solid var(--line)!important;box-shadow:none!important}
#view-qada .segmented button:not(.selected){background:transparent!important;color:var(--muted)!important}
#view-qada .segmented button.selected,body[data-theme=dark] #view-qada .segmented button.selected,body[data-theme=oled] #view-qada .segmented button.selected{background:var(--accent)!important;color:var(--accent-ink)!important;box-shadow:none!important}
/* Birth calculator: center dates vertically, use consistent field geometry and equal footer buttons. */
#birth-qada-form .form-field{min-width:0;box-sizing:border-box}
#birth-qada-form .form-field>input,#birth-qada-form .form-field>select{width:100%;height:49px;min-height:49px;max-height:49px;box-sizing:border-box;padding:0 14px;border-radius:13px;line-height:normal;margin:0;display:block}
#birth-qada-form .form-field>input[type=date]{text-align:center!important;display:flex!important;align-items:center!important;justify-content:center!important;-webkit-appearance:none;appearance:none;padding-inline:12px}
#birth-qada-form input[type=date]::-webkit-date-and-time-value{min-height:49px;line-height:49px;text-align:center!important;width:100%;}
#birth-qada-form input[type=date]::-webkit-datetime-edit{min-height:49px;line-height:49px;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:100%;padding:0!important;}
#birth-qada-form input[type=date]::-webkit-datetime-edit-fields-wrapper{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:49px;height:49px;padding:0!important;}
#birth-qada-form input[type=date]::-webkit-calendar-picker-indicator{position:absolute;right:12px;top:50%;transform:translateY(-50%);margin:0}
#birth-qada-form .button-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:stretch!important}
#birth-qada-form .button-row>.button{box-sizing:border-box;width:100%;height:56px!important;min-height:56px!important;max-height:56px!important;margin:0;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.16!important;font-size:clamp(12px,3.15vw,15px)!important;padding:8px 6px!important;white-space:normal;overflow-wrap:normal;word-break:normal;border-radius:13px}
/* Arabic titles drive the alignment of their accompanying metadata, not app language. */
.dua-card-copy.arabic-heading{align-items:stretch!important;direction:ltr}
.dua-card-copy.arabic-heading h3{direction:rtl!important;text-align:right!important;width:100%}
.dua-card-copy.arabic-heading .dua-category{align-self:flex-end!important;direction:rtl!important;text-align:right!important;max-width:100%;width:max-content}
.dua-card-copy.arabic-heading p{direction:rtl!important;text-align:right!important;width:100%}
.reader-inner.arabic-heading .reader-overline{text-align:right!important;direction:ltr}
.reader-inner.arabic-heading h1{text-align:right!important;direction:rtl!important}
.reader-inner.arabic-heading .reader-rule{margin-left:auto!important;margin-right:0!important;}
@media(max-width:390px){
 #view-today .today-dates{gap:6px}
 #view-today .gregorian-long{display:none}
 #view-today .gregorian-short{display:inline}
 #view-today .hijri-chip{padding:5px 7px;max-width:55%}
 #view-today .today-heading-actions{gap:6px}
 #view-today .today-heading .inline-return svg{width:13px;height:13px}
 #view-today .today-heading .return-today.inline-return{padding:5px 7px!important;font-size:10px!important}
 #view-today .today-heading .day-calendar-trigger{width:35px;min-width:35px;height:35px;min-height:35px;flex-basis:35px!important}
 #birth-qada-form .button-row>.button{font-size:12px!important}
}
@media(max-width:345px){#view-today .today-heading .page-title.is-long{font-size:22px!important}#view-today .today-heading .return-today.inline-return{font-size:9px!important}#view-today .hijri-chip{font-size:9px}}
/* Allow natural vertical scroll while giving app code reliable horizontal swipes. */
#view-today{touch-action:pan-y}
