/* Immersive composition from salah-interactive.html, using the design's colours and components. */
.salah-immersive { margin: 0; overflow: hidden; background: #f8f9fa; }
.immersive-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.immersive-header { flex: 0 0 auto; z-index: 1020; }
.immersive-walk { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.immersive-body { display: flex; flex: 1; min-height: 0; }
.immersive-sidebar { width: 255px; flex: 0 0 255px; }
.immersive-step-list { overflow-y: auto; flex: 1; min-height: 0; }
.immersive-step-list .step-item { width: 100%; text-align: left; border: 0; background: transparent; }
.immersive-step-list .step-item small { display: block; }
.immersive-step-list .step-circle { background: #e9ecef; color: #495057; box-shadow: none; width: 32px; height: 32px; font-size: 14px; }
.immersive-step-list .step-item.active .step-circle { background: var(--ip-area-fill); color: #fff; }
.immersive-step-list .step-item.completed .step-circle { background: var(--ip-area-soft); color: var(--ip-area-strong); }
.immersive-main { flex: 1; min-width: 0; overflow-y: auto; padding: 24px; scrollbar-gutter: stable; }
.immersive-card { border: 0; background: transparent; box-shadow: none; }
/* The posture drawings are 292x470 portraits. The box is reserved so the panel does not jump from step to
   step, and the picture is fitted inside it: never cropped at the head or the feet, never stretched. */
.immersive-position-image { width: 100%; height: min(46vh, 430px); object-fit: contain; object-position: center; background: #fff; }
.immersive-controls { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: max(16px, env(safe-area-inset-bottom)) !important; }
.immersive-controls .btn { min-height: 42px; }
.immersive-main .quran-text { font-size: 30px; color: var(--ip-area-deep); }
.salah-large-text .immersive-main .quran-text { font-size: 42px; }
.immersive-main .SalatStepsTimeline { display: flex; gap: 8px; align-items: center; overflow-x: auto; padding: 3px 0 12px; }
.immersive-main .SalatStepsTimeline button { border-radius: 50%; width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #dee2e6; background: transparent; color: inherit; font-size: 13px; }
.immersive-main .SalatStepsTimeline button.active { background: var(--ip-area-fill); color: white; border-color: var(--ip-area-fill); }
.immersive-main .SalatStepsTimeline button.completed { background: #d1e7dd; color: #146c43; border-color: #d1e7dd; }
.immersive-main .SalatStepsTimeline::before { display: none; }
.immersive-main .SalatStepsTimeline .step-circle { width: auto; height: auto; background: transparent; color: inherit; box-shadow: none; font-size: inherit; }
.immersive-shell #paSelectorPanel { width: min(850px, calc(100% - 32px)); margin: 20px auto; overflow-y: auto; }
.immersive-shell #paResume { width: min(850px, calc(100% - 32px)); margin: 16px auto 0; }
.immersive-shell #paCompletePanel { width: min(760px, calc(100% - 32px)); margin: auto; overflow-y: auto; padding: 24px 0; }
.immersive-shell #paCompletePanel h3 { font-size: 2rem; }
.salah-immersive .offcanvas { --bs-offcanvas-width: 420px; max-width: 92vw; }
/* Change-prayer drawer: the design's two-phase header. */
.pa-drawer-num { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; flex: 0 0 28px; }
.pa-drawer-rule { height: 2px; background: rgba(0,0,0,.1); }
.pa-drawer-type.active, .pa-drawer-prayer.active { border-color: var(--ip-area-fill) !important; box-shadow: inset 0 0 0 1px var(--ip-area-fill); }
body.dark .pa-drawer-rule { background: rgba(255,255,255,.15); }
.salah-immersive button:focus-visible, .salah-immersive a:focus-visible { outline: 3px solid #d6a849; outline-offset: 3px; }
/* Male/Female and EN/العربية, where the design puts them: at the right-hand end of the header. */
.salah-switch .btn.active { background: var(--ip-area-fill); border-color: var(--ip-area-fill); color: #fff; }
body.dark .salah-switch .btn:not(.active) { color: #e4e9ef; }
/* Arabic: the walkthrough is read right to left, and the recitation's Arabic leads while the transliteration
   and the English translation follow it. Nothing is translated here; only the order of attention changes. */
.salah-rtl .immersive-step-list .step-item { text-align: right; }
.salah-rtl .SalatStepsTimeline { flex-direction: row-reverse; justify-content: flex-end; }
.salah-rtl #paRakatPills { flex-direction: row-reverse; }
.salah-rtl .immersive-main .quran-text { font-size: 34px; }
.salah-rtl #paTranslitCol .fs-14, .salah-rtl #paTranslationCol .fs-14 { font-size: 13px; }
.salah-rtl #paTranslit, .salah-rtl #paTranslation { font-size: 13px; opacity: .85; }
.salah-rtl #paInstrLangBadge { font-weight: 600; }
body.dark.salah-immersive { background: var(--ip-bg); }
body.dark .immersive-main .quran-text { color: var(--ip-area-strong); }
body.dark .immersive-sidebar { background: var(--ip-surface) !important; }
body.dark .immersive-step-list .step-item { color: #e4e9ef; }
body.dark .immersive-step-list .step-item.active { background: color-mix(in srgb, var(--ip-area) 18%, transparent); }
body.dark .immersive-main .bg-success-subtle { background: #203d32 !important; }
body.dark .immersive-main .bg-warning-subtle { background: #43391e !important; color: #f1dfad !important; }
@media (min-width: 992px)
{
    .immersive-sidebar { position: static; visibility: visible !important; transform: none !important; }
}
@media (max-width: 991.98px)
{
    .immersive-sidebar { width: 290px; }
    .immersive-main { padding: 20px; }
}
@media (max-width: 575.98px)
{
    .immersive-main { padding: 16px; }
    .immersive-position-image { height: 230px; }
    .immersive-controls { gap: 6px; }
    .immersive-controls .btn { font-size: 12px; padding: 8px 10px !important; }
    .immersive-shell #paRakatPills { display: none !important; }
    .immersive-start-heading h2 { font-size: 1.4rem !important; }
    .immersive-start-heading p { font-size: 14px; }
}
/* Learning aids from the Salah Practice Studio: display and audio options, why each step is done, where the
   schools differ (practice-kit.css styles the school notes and the picker). */
.salah-walk-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.salah-explain { margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: var(--ip-surface-2, #f3efe3); border: 1px solid var(--ip-line, #e6dfcd); }
.salah-explain-schools { background: var(--ip-tile-gold-bg, #fbf5e6); }
.salah-explain-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin: 0 0 8px; color: var(--ip-ink, #13221d); }
.salah-explain-title > i { color: var(--ip-accent-strong, #a47a2c); }
.salah-explain-sub { font-size: 14px; font-weight: 700; margin: 10px 0 4px; color: var(--ip-ink, #13221d); }
.salah-explain-item + .salah-explain-item { border-top: 1px dashed var(--ip-line-strong, #d3c8ae); margin-top: 10px; padding-top: 4px; }
.salah-explain .guide-rich { font-size: 14px; line-height: 1.65; color: var(--ip-ink-2, #34453f); }
.salah-explain .guide-rich p:last-child { margin-bottom: 0; }
.salah-explain .pk-picker { margin: 4px 0 8px; }
.salah-explain .pk-schools { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.salah-unit-notes { margin: -8px 0 18px; border-radius: 14px; border: 1px solid var(--ip-line, #e6dfcd); background: var(--ip-tile-rose-bg, #fbebee); }
.salah-unit-notes > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--ip-tile-rose-fg, #b03f59); }
.salah-unit-notes > div { padding: 0 14px 12px; }
.salah-unit-notes .salah-explain-item { font-size: 14px; }
@media (prefers-reduced-motion: reduce)
{
    .salah-immersive *,.salah-immersive *::before, .salah-immersive *::after { scroll-behavior: auto !important; transition: none !important; }
}
