/* 49-v2-tour.css — the new interface's tours (phase 8b): spotlight tour, first-run setup, «وين راحت الأشياء؟»,
   إرشادات الاستخدام and the one-time tip card. Every rule is scoped to .ui-v2 (the layers exist only there).
   Layers: setup and sheets sit under form windows (.modal-overlay, 9900) so «أضف حساباً» opens above the setup;
   the tour sits above everything but toasts. Design: docs/design/redesign-2026-11/prototype.html (#Tour #Setup #Moved #Guide). */

/* ── Spotlight tour ── */
.ui-v2 .v2-tour { position: fixed; inset: 0; z-index: 100060; }
.ui-v2 .v2-tour__catch { position: absolute; inset: 0; background: transparent; }
.ui-v2 .v2-tour.is-welcome .v2-tour__catch { background: rgba(15, 23, 42, .66); }
.ui-v2 .v2-tour__hole {
    position: fixed; border-radius: 16px; pointer-events: none;
    box-shadow: 0 0 0 4px #fff, 0 0 0 200vmax rgba(15, 23, 42, .66);
}
.ui-v2 .v2-tour__hole[hidden] { display: none; }
.ui-v2 .v2-tour__bubble {
    position: fixed; inset-inline: 16px; max-width: 448px; margin-inline: auto; box-sizing: border-box;
    background: var(--c-surface); color: var(--c-text); border-radius: 22px; padding: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .3);
}
.ui-v2 .v2-tour__bubble[data-place="mid"] { top: 50%; transform: translateY(-50%); }
.ui-v2 .v2-tour__count { display: block; font-size: 12.5px; font-weight: 700; color: var(--c-primary); }
.ui-v2 .v2-tour__title { margin: 4px 0 0; font-size: 19px; font-weight: 700; line-height: 1.35; color: var(--c-text); }
.ui-v2 .v2-tour__body { margin: 6px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--c-text); opacity: .86; }
.ui-v2 .v2-tour__actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.ui-v2 .v2-tour__actions .v2-btn { min-height: 48px; }
.ui-v2 .v2-tour__back { flex: 0 0 auto; background: var(--c-surface-2); border-color: var(--c-surface-2); }
.ui-v2 .v2-tour__back[hidden] { display: none; }
.ui-v2 .v2-tour__next { flex: 1; }
.ui-v2 .v2-tour__skip {
    flex: 0 0 auto; min-width: 44px; min-height: 48px; padding: 0 10px; border: 0; background: none;
    color: var(--c-text-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
    .ui-v2 .v2-tour__hole { transition: top .22s ease, left .22s ease, width .22s ease, height .22s ease; }
    .ui-v2 .v2-tour__bubble { animation: v2-tour-in .2s ease; }
    @keyframes v2-tour-in { from { opacity: 0; } to { opacity: 1; } }
}

/* ── Bottom sheets: «وين راحت الأشياء؟» and إرشادات الاستخدام ── */
.ui-v2 .v2-tour-sheet-wrap { position: fixed; inset: 0; z-index: 9850; display: flex; flex-direction: column; justify-content: flex-end; }
.ui-v2 .v2-tour-sheet-back { position: absolute; inset: 0; background: var(--c-overlay, rgba(15, 23, 42, .55)); }
.ui-v2 .v2-tour-sheet {
    position: relative; width: 100%; max-width: 520px; margin: 0 auto; box-sizing: border-box;
    max-height: calc(100dvh - 48px); overflow-y: auto; padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    border-radius: 28px 28px 0 0;
}
@media (min-width: 769px) {
    .ui-v2 .v2-tour-sheet-wrap { justify-content: center; }
    .ui-v2 .v2-tour-sheet { border-radius: 22px; max-height: calc(100dvh - 64px); }
}
.ui-v2 .v2-tour-sheet__grab { width: 40px; height: 5px; border-radius: 99px; background: var(--c-border-strong); margin: 0 auto 14px; }
.ui-v2 .v2-tour-sheet__head { display: flex; align-items: center; gap: 10px; }
.ui-v2 .v2-tour-sheet__title { flex: 1; min-width: 0; margin: 0; font-size: 22px; font-weight: 700; line-height: 1.35; color: var(--c-text); }
.ui-v2 .v2-tour-sheet__x { background: var(--c-surface-2); }
.ui-v2 .v2-tour-sheet__lead { margin: 6px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--c-text-muted); }
.ui-v2 .v2-tour-sheet__foot { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; }
.ui-v2 .v2-tour-sheet__foot .v2-btn { min-height: 54px; font-size: 16px; }
.ui-v2 .v2-tour-sheet__ghost { background: var(--c-surface-2); border-color: var(--c-surface-2); }

.ui-v2 .v2-moved { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ui-v2 .v2-moved__row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; background: var(--c-bg); }
.ui-v2 .v2-moved__old { flex: 1; min-width: 0; font-size: 14px; color: var(--c-text-muted); text-decoration: line-through; text-decoration-color: var(--c-border-strong); }
.ui-v2 .v2-moved__arr { flex: none; color: var(--c-text-muted); font-size: 13px; }
.ui-v2 .v2-moved__new { flex: 1.2; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--c-text); }
.ui-v2 .v2-moved__new .v2-tile { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; }
.ui-v2 .v2-moved__same { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: var(--c-text-muted); }

.ui-v2 .v2-guide { margin-top: 4px; }
.ui-v2 .v2-guide > .v2-row + .v2-row { border-top: 1px solid var(--c-border); }
.ui-v2 .v2-guide__info { cursor: default; }
.ui-v2 .v2-tile--tip { background: var(--c-warning-soft); color: #92400e; }

/* ── First-run setup: a full screen under form windows ── */
.ui-v2 .v2-setup {
    position: fixed; inset: 0; z-index: 9800; display: flex; flex-direction: column;
    background: var(--c-bg); color: var(--c-text); overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding-top: env(safe-area-inset-top, 0px);
}
.ui-v2 .v2-setup > * { width: 100%; max-width: 560px; margin-inline: auto; box-sizing: border-box; }
.ui-v2 .v2-setup__top { display: flex; align-items: center; gap: 10px; padding: 16px 16px 0; }
.ui-v2 .v2-setup__bars { flex: 1; display: flex; gap: 6px; }
.ui-v2 .v2-setup__bars span { flex: 1; height: 5px; border-radius: 99px; background: var(--c-border); }
.ui-v2 .v2-setup__bars span.is-on { background: var(--c-primary); }
.ui-v2 .v2-setup__skip { min-height: 44px; min-width: 44px; padding: 0 8px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--c-text-muted); cursor: pointer; }
.ui-v2 .v2-setup__body { flex: 1; display: flex; flex-direction: column; padding: 22px 20px 0; }
.ui-v2 .v2-setup__count { font-size: 13px; font-weight: 700; color: var(--c-primary); }
.ui-v2 .v2-setup__title { margin: 4px 0 0; font-size: 26px; font-weight: 700; line-height: 1.3; color: var(--c-text); outline: none; }
.ui-v2 .v2-setup__lead { margin: 8px 0 0; font-size: 15px; line-height: 1.7; color: var(--c-text-muted); }
.ui-v2 .v2-setup__form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.ui-v2 .v2-setup__form .v2-field { margin-bottom: 0; }
.ui-v2 .v2-setup__label { font-size: 13px; font-weight: 600; color: var(--c-text-muted); }
.ui-v2 .v2-setup__big > input { min-height: 64px; font-size: 28px; font-weight: 700; text-align: end; }
.ui-v2 .v2-setup__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-v2 .v2-setup__op {
    min-width: 52px; min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--c-border);
    background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.ui-v2 .v2-setup__op.is-on { background: var(--c-text); border-color: var(--c-text); color: var(--c-surface); }
.ui-v2 .v2-setup__day { min-height: 48px; padding: 0 14px; border: 1px solid var(--c-border-strong); border-radius: 14px; background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 16px; width: 120px; }
.ui-v2 .v2-setup__it { cursor: default; }
.ui-v2 .v2-setup__it .v2-row__end { font-size: 15px; }
.ui-v2 .v2-setup__empty { margin: 0; padding: 18px; border-radius: 20px; background: var(--c-surface); color: var(--c-text-muted); font-size: 14px; text-align: center; }
.ui-v2 .v2-setup__addrow {
    display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 14px;
    border-radius: 16px; border: 1.5px dashed var(--c-primary-line); background: none; color: var(--c-primary);
    font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; text-align: center;
}
.ui-v2 .v2-setup__addrow--plain { border-color: var(--c-border); color: var(--c-text-muted); border-style: solid; }
.ui-v2 .v2-setup__chks { padding: 2px 14px; }
.ui-v2 .v2-setup__chk { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; }
.ui-v2 .v2-setup__chk + .v2-setup__chk { border-top: 1px solid var(--c-border); }
.ui-v2 .v2-setup__chk > input[type="checkbox"] { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--c-primary); cursor: pointer; }
.ui-v2 .v2-setup__chk-l { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-v2 .v2-setup__chk > input[type="text"] {
    flex: none; width: 104px; min-height: 44px; padding: 0 10px; border: 1px solid var(--c-border-strong); border-radius: 12px;
    background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 15px; text-align: end;
}
.ui-v2 .v2-setup__chk.is-done .v2-setup__chk-l { color: var(--c-text-muted); }
.ui-v2 .v2-setup__note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--c-primary-soft); color: var(--c-primary); font-size: 13px; line-height: 1.6; font-weight: 500; }
.ui-v2 .v2-setup__note i { margin-top: 3px; }
.ui-v2 .v2-setup__err { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 16px; background: var(--c-danger-soft); color: var(--c-danger); font-size: 14px; font-weight: 600; line-height: 1.6; }
.ui-v2 .v2-setup__err i { margin-top: 4px; }
.ui-v2 .v2-setup__done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-top: 28px; }
.ui-v2 .v2-setup__ck { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--c-success-soft); color: var(--c-success); font-size: 28px; }
.ui-v2 .v2-setup__done .v2-setup__lead { margin-top: 0; }
.ui-v2 .v2-setup__res { margin-top: 18px; padding: 18px; border-radius: 22px; background: var(--c-primary); color: var(--c-on-primary); text-align: center; }
.ui-v2 .v2-setup__res small { display: block; font-size: 13px; opacity: .9; }
.ui-v2 .v2-setup__res b { display: block; font-size: 40px; font-weight: 700; line-height: 1.2; }
.ui-v2 .v2-setup__res > span { font-size: 13.5px; opacity: .92; }
.ui-v2 .v2-setup__res.is-over { background: var(--c-danger-soft); color: var(--c-danger); }
.ui-v2 .v2-setup__res.is-empty { background: var(--c-surface); color: var(--c-text); }
.ui-v2 .v2-setup__res.is-empty > span { color: var(--c-text-muted); opacity: 1; }
.ui-v2 .v2-setup__foot { display: flex; gap: 8px; padding: 16px 20px calc(22px + env(safe-area-inset-bottom, 0px)); margin-top: auto; }
.ui-v2 .v2-setup__foot .v2-btn { flex: 1; min-height: 54px; font-size: 16px; }
.ui-v2 .v2-setup__foot .v2-setup__ghost { flex: 0 0 auto; background: var(--c-surface-2); border-color: var(--c-surface-2); }

/* ── One-time tip card (v2Tip) ── */
.ui-v2 [data-tip-slot][hidden] { display: none; }
.ui-v2 .v2-tip {
    display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 12px 12px 12px 8px; border-radius: 18px;
    background: var(--c-primary-soft); color: #3730a3; font-size: 13.5px; line-height: 1.65; font-weight: 500;
}
.ui-v2 .v2-tip__ic { margin-top: 4px; flex: none; }
.ui-v2 .v2-tip__text { flex: 1; min-width: 0; }
.ui-v2 .v2-tip__x {
    flex: none; width: 44px; height: 44px; margin: -8px 0 -8px -4px; border: 0; border-radius: 12px; background: none;
    display: grid; place-items: center; color: var(--c-primary); font-size: 15px; cursor: pointer;
}

/* The floating screenshot button would sit over the setup's fields and the tour's bubble. */
.ui-v2.v2-tour-open .shot-fab { display: none; }
