/* ============================================================
   Help centre — the in-app "how to" guides (Views/Help).
   Steps are numbered cards; each can carry a "what you'll see" mock-up built from the app's
   own component classes, so the picture always matches the live theme.
   ============================================================ */

.help-tile .sub { margin-top: 2px; line-height: 1.45; }

.guide { max-width: 1040px; }

/* An on-screen label (button, field, tab) named in the text — styled like a key cap so it's easy to spot. */
.ui {
    display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px;
    border-radius: 5px; background: var(--card); color: var(--ink); font-weight: 650; font-size: .94em;
    white-space: nowrap;
}

/* ---------- Steps ---------- */
.guide-steps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: guide-step; display: flex; flex-direction: column; gap: 16px; }
.guide-step {
    counter-increment: guide-step; position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 20px 22px 20px 70px;
}
.guide-step.no-shot { grid-template-columns: minmax(0, 1fr); }
.guide-step::before {
    content: counter(guide-step); position: absolute; left: 20px; top: 18px;
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--hd-navy); color: #fff; font-weight: 700; font-size: 15px;
}
.guide-step h3 { font-size: 16px; margin: 6px 0 6px; }
.guide-step p { margin: 0 0 8px; color: var(--ink); }
.guide-step ul.guide-fields { margin: 6px 0 8px; padding-left: 0; list-style: none; }
.guide-step ul.guide-fields li { margin-bottom: 6px; }
.guide-step .opt { color: var(--ink-soft); font-size: 12px; font-weight: 400; }

/* ---------- "What you'll see" mock-ups ---------- */
.guide-shot { margin: 0; }
.guide-shot-frame {
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
    padding: 16px; pointer-events: none; user-select: none; overflow: hidden;
}
.guide-shot figcaption { font-size: 12px; color: var(--ink-soft); margin-top: 6px; text-align: center; }
.guide-shot-frame .section-title { margin: 0 0 10px; }
.guide-shot-frame .card { margin: 0; }
/* A modal shown inline in the frame — no overlay, no entrance animation, a softer shadow. */
.guide-shot-frame .modal-dialog { margin: 0; max-width: none; animation: none; box-shadow: var(--shadow); }
.guide-shot-frame .modal-body { padding: 14px 18px; }
.guide-shot-frame .modal-head, .guide-shot-frame .modal-foot { padding: 12px 18px; }
.guide-shot-frame .form-row { margin-bottom: 10px; }
.guide-shot-frame .ir-row { display: flex; align-items: center; gap: 8px; }
/* A stand-in for an input: looks like a field, but it's a picture — nothing to focus or type into. */
.guide-input {
    min-height: 36px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
    color: var(--ink-soft); font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.guide-input.filled { color: var(--ink); }
.guide-input.tall { min-height: 56px; align-items: flex-start; }
.guide-input .pill {
    padding: 2px 8px; border-radius: 999px; background: var(--hd-blue-soft); color: var(--ink); font-size: 12px;
}
.guide-input .file-btn {
    padding: 4px 10px; border-radius: 6px; background: var(--hd-navy); color: #fff; font-size: 12px; font-weight: 600;
}

/* The thing to click: a pulsing ring, with a lettered marker the step text refers to. */
.guide-hl { position: relative; outline: 3px solid var(--warn); outline-offset: 3px; border-radius: 8px; animation: guidePulse 1.8s ease-in-out infinite; }
@keyframes guidePulse { 0%, 100% { outline-color: var(--warn); } 50% { outline-color: rgba(217,138,0,.25); } }
@media (prefers-reduced-motion: reduce) { .guide-hl { animation: none; } }
.guide-mark {
    display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex: none;
    background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; margin-right: 4px;
}
.guide-shot-frame label .guide-mark { margin-right: 6px; }

/* ---------- Tips + troubleshooting ---------- */
.guide-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.guide-note { border-radius: var(--radius); padding: 14px 18px; border: 1px solid; }
.guide-note h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; }
.guide-note p { margin: 0 0 6px; }
.guide-note p:last-child { margin-bottom: 0; }
.guide-note.tip { background: var(--hd-blue-soft); border-color: var(--line); }
.guide-note.warn { background: #fdf6ec; border-color: #f0d9a8; }
.guide-note.warn h4 { color: #7a5b12; }

/* "How do I…?" link next to an action elsewhere in the app. */
.help-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-soft); }
.help-link svg { width: 14px; height: 14px; }
.help-link:hover { color: var(--hd-blue); }

@media (max-width: 900px) {
    .guide-step { grid-template-columns: minmax(0, 1fr); padding: 18px 16px 18px 62px; }
    .guide-step::before { left: 16px; }
}

/* A stand-alone note card in the step style, without the step number (e.g. a portal-specific section). */
.guide-step.guide-step-plain { counter-increment: none; padding-left: 22px; }
.guide-step.guide-step-plain::before { display: none; }

/* ---------- Help read before sign-in (Views/Help/_SignInHelpLayout) — no sidebar, branded header ---------- */
.signin-help-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.signin-help-head img { height: 40px; width: auto; display: block; }
.signin-help-page { max-width: 1100px; margin: 0 auto; }

/* ---------- Role-level view: who a guide is for, and "View help as" ---------- */
.help-levels {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
    margin: 4px 0 18px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius);
}
.help-levels-you { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.help-levels-you svg { width: 16px; height: 16px; }
.help-levels-you b { color: var(--ink); }
.help-levels-pick { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; font-size: 13px; }
.help-levels-pick select { width: auto; min-width: 260px; }
.help-count { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
