/* The walkthrough video panel (_WorshipVideoPanel, worship-video.js): a native dialog, a centred card on wide
   screens and a sheet rising from the bottom on phones. Colours come from the site tokens (layout.css). */

.wv {
    border: 0; padding: 0; background: transparent; color: var(--ip-ink);
    width: min(960px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: visible;
}
.wv::backdrop { background: rgba(4, 18, 13, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.wv[open] { animation: wv-in .32s var(--ip-ease, ease-out); }
.wv[open]::backdrop { animation: wv-fade .32s ease-out; }
@keyframes wv-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes wv-fade { from { opacity: 0; } to { opacity: 1; } }

.wv-sheet {
    background: var(--ip-surface); border: 1px solid var(--ip-line); border-radius: 22px; overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(230, 184, 92, .12);
}
.wv-head { display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem .8rem 1rem; border-bottom: 1px solid var(--ip-line); background: linear-gradient(120deg, var(--ip-tile-emerald-bg), var(--ip-surface) 60%); }
.wv-mark {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem;
    color: #2b1d02; background: linear-gradient(135deg, var(--ip-gold-400, #f1d59a), var(--ip-gold-600, #a77a1f));
    box-shadow: 0 8px 18px -10px rgba(164, 122, 44, .9);
}
.wv-head-text { min-width: 0; flex: 1; }
.wv-title { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.25; }
.wv-sub { margin: .1rem 0 0; font-size: .82rem; color: var(--ip-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv-close {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 1px solid var(--ip-line); background: var(--ip-surface);
    color: var(--ip-ink); display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .2s;
}
.wv-close:hover { background: var(--ip-surface-2); transform: rotate(90deg); }
.wv-stage { position: relative; background: #050b0e; aspect-ratio: 16 / 9; }
.wv-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #050b0e; }
.wv-end {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 1.25rem; text-align: center;
    background: radial-gradient(120% 90% at 50% 100%, rgba(31, 122, 99, .55), rgba(4, 18, 13, .86) 70%); color: #fff;
}
.wv-end[hidden] { display: none; }
.wv-end-text { margin: 0; font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; }
.wv-end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.wv-btn {
    display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: .6rem 1.15rem; border-radius: 999px;
    font-weight: 700; font-size: .95rem; cursor: pointer; border: 1px solid transparent; transition: transform .2s, background .2s;
}
.wv-btn[hidden] { display: none; }
.wv-btn:hover { transform: translateY(-1px); }
.wv-btn-primary { background: var(--ip-primary); color: var(--ip-primary-ink); box-shadow: 0 10px 24px -12px rgba(46, 184, 114, .9); }
.wv-btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); }
.wv-btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.wv-foot { margin: 0; padding: .55rem 1rem; font-size: .78rem; color: var(--ip-muted); display: flex; align-items: center; gap: .4rem; }
.wv-foot kbd { font-size: .72rem; padding: .1rem .4rem; border-radius: 6px; background: var(--ip-surface-2); color: var(--ip-ink-2); border: 1px solid var(--ip-line-strong); }
.wv button:focus-visible { outline: 3px solid var(--ip-focus, #e6b85c); outline-offset: 2px; }
[dir="rtl"] .wv-flip { transform: scaleX(-1); }

/* Phones: a sheet from the bottom edge, thumb-high controls, no keyboard hint. */
@media (max-width: 575.98px) {
    .wv { width: 100vw; max-height: 100dvh; margin: auto 0 0; }
    .wv-sheet { border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .wv[open] { animation-name: wv-rise; }
    @keyframes wv-rise { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
    .wv-foot { display: none; }
    /* The step's end: the actions sit under the paused picture rather than over a small video. */
    .wv-stage { aspect-ratio: auto; }
    .wv-video { height: auto; aspect-ratio: 16 / 9; }
    .wv-end { position: static; padding: 1rem 1rem 1.25rem; background: linear-gradient(180deg, #0a2a1e, #050b0e); }
    .wv-end-actions { flex-direction: column; width: 100%; }
    .wv-btn { justify-content: center; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .wv[open], .wv[open]::backdrop { animation: none; }
    .wv-close:hover, .wv-btn:hover { transform: none; }
}

/* ---- the salah walkthrough's entries (Views/Guides/SalahInteractive.cshtml) ---- */
/* "Watch this step" sits on the picture's corner, where the eye already is, without covering the figure. */
#paImgWrap > div { position: relative; }
.pa-watch {
    position: absolute; top: 1.4rem; inset-inline-end: 1.4rem; z-index: 2; display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .3rem .85rem .3rem .35rem;
    border-radius: 999px; border: 1px solid rgba(255, 255, 255, .55); background: rgba(10, 42, 30, .78); color: #fff; font-weight: 700; font-size: .85rem;
    cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8); transition: background .2s, transform .2s;
}
[dir="rtl"] .pa-watch, .salah-rtl .pa-watch { padding: .3rem .35rem .3rem .85rem; }
.pa-watch i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #2b1d02; background: linear-gradient(135deg, var(--ip-gold-400, #f1d59a), var(--ip-gold-600, #a77a1f)); }
.pa-watch:hover { background: rgba(10, 42, 30, .9); transform: translateY(-1px); }
.pa-watch[hidden], .pa-watch-all[hidden], .pa-prep-video[hidden] { display: none; }
.pa-watch-all {
    display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--ip-line-strong);
    background: var(--ip-surface); color: var(--ip-ink-2); font-weight: 700; font-size: .82rem; cursor: pointer; white-space: nowrap;
}
.pa-watch-all i { color: var(--ip-gold-600, #a77a1f); }
.pa-prep { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.pa-prep-wudu {
    flex: 1 1 260px; display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: 14px; text-decoration: none; color: var(--ip-ink);
    background: linear-gradient(120deg, var(--pw-water-pale, #e2f4f1), var(--ip-surface) 75%); border: 1px solid var(--pw-water-soft, #9fd8d2);
    transition: transform .2s, box-shadow .2s;
}
.pa-prep-wudu:hover { transform: translateY(-1px); box-shadow: var(--ip-shadow-sm); color: var(--ip-ink); }
.pa-prep-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--pw-water, #2f9a94), #16624f); }
.pa-prep-q { color: var(--ip-muted); }
.pa-prep-wudu strong { color: var(--pw-water, #2f9a94); }
.pa-prep-arrow { margin-inline-start: auto; color: var(--pw-water, #2f9a94); }
[dir="rtl"] .pa-prep-arrow, .salah-rtl .pa-prep-arrow { transform: scaleX(-1); }
.pa-prep-video {
    flex: 0 1 auto; display: inline-flex; align-items: center; gap: .45rem; min-height: 50px; padding: 0 1.1rem; border-radius: 14px; cursor: pointer;
    border: 1px solid var(--ip-gold-400, #f1d59a); background: var(--ip-tile-gold-bg); color: var(--ip-tile-gold-fg); font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
    .pa-watch:hover, .pa-prep-wudu:hover { transform: none; }
}
