/* HELP-1663 Help Center: public pages (/help, /help/<slug>, with css/website.css) and the in-app help bits
   (the "?" buttons and the help viewer, with css/index.css). ChiroApp theme: --w-brand #355E3B. */

/* ---------- public pages ---------- */
.hc-page { background: var(--w-bg-alt, #f8faf8); }
.hc-main { padding: 7.5rem 1rem 3rem; }
.hc-wrap { max-width: 860px; margin: 0 auto; }
.hc-wrap h1 { font-size: 2rem; line-height: 1.2; color: var(--w-text, #1a1a2e); margin: 0.25rem 0 0.5rem; }
.hc-wrap h2 { font-size: 1.25rem; color: var(--w-text, #1a1a2e); margin: 2rem 0 0.75rem; }
.hc-crumbs { font-size: 0.85rem; color: var(--w-text-muted, #5a6270); margin: 0; }
.hc-crumbs a, .hc-back a, .hc-related a, .hc-intro a, .hc-after a, .hc-step a { color: var(--w-brand, #355E3B); font-weight: 600; }
.hc-summary { font-size: 1.05rem; color: var(--w-text-muted, #5a6270); line-height: 1.6; margin: 0 0 1rem; }
.hc-intro, .hc-after { font-size: 0.98rem; line-height: 1.65; color: #2d3748; background: #fff; border: 1px solid var(--w-border, #e2e8f0);
    border-radius: 12px; padding: 0.9rem 1.1rem; margin: 0 0 1rem; }
.hc-after { border-left: 4px solid var(--w-brand, #355E3B); }
.hc-steps { counter-reset: hc; list-style: none; padding: 0; margin: 0; }
.hc-step { counter-increment: hc; position: relative; background: #fff; border: 1px solid var(--w-border, #e2e8f0); border-radius: 14px;
    padding: 1rem 1.1rem 1.1rem 3.6rem; margin: 0 0 1rem; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03); }
.hc-step::before { content: counter(hc); position: absolute; left: 1rem; top: 0.95rem; width: 1.9rem; height: 1.9rem; border-radius: 50%;
    background: var(--w-brand, #355E3B); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.hc-step > p { margin: 0.15rem 0 0.75rem; font-size: 1rem; line-height: 1.65; color: #1f2937; }
.hc-label { font-weight: 700; color: #1a202c; background: var(--w-brand-pale, #e8f0e9); border-radius: 5px; padding: 0 0.3em; white-space: nowrap; }
.hc-shot { display: block; max-width: 100%; height: auto; border: 1px solid var(--w-border, #e2e8f0); border-radius: 10px; }
.hc-shot-phone { max-width: min(260px, 100%); margin-top: 0.5rem; }   /* LEGAL-1672: reflows at 320px (WCAG 1.4.10) */
.hc-phone { background: #fffbeb; border: 1px solid #f5d38a; border-radius: 10px; padding: 0.6rem 0.8rem; margin: 0 0 0.75rem; }
.hc-phone p { margin: 0; font-size: 0.92rem; line-height: 1.55; color: #4a3b10; }
.hc-phone-tag { font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; background: #f59e0b; color: #1f2937; border-radius: 4px; padding: 1px 6px; margin-right: 4px; }
.hc-variant-tabs { display: flex; gap: 0.5rem; margin: 0.5rem 0 1rem; flex-wrap: wrap; }
.hc-variant-tab { border: 1px solid var(--w-brand, #355E3B); background: #fff; color: var(--w-brand, #355E3B); border-radius: 999px; padding: 0.45rem 1rem;
    font-weight: 600; cursor: pointer; font-size: 0.92rem; }
.hc-variant-tab[aria-pressed="true"] { background: var(--w-brand, #355E3B); color: #fff; }
.hc-variant > h2 { margin-top: 1rem; }
.hc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem; }
.hc-card { display: flex; flex-direction: column; gap: 0.35rem; background: #fff; border: 1px solid var(--w-border, #e2e8f0); border-radius: 14px;
    padding: 1rem 1.1rem; text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.hc-card:hover, .hc-card:focus-visible { border-color: var(--w-brand, #355E3B); box-shadow: 0 6px 20px rgba(53, 94, 59, 0.12); }
.hc-card-title { font-weight: 700; color: var(--w-brand-dark, #2a4d30); font-size: 1.02rem; }
.hc-card-summary { font-size: 0.9rem; color: var(--w-text-muted, #5a6270); line-height: 1.5; }
.hc-related ul { padding-left: 1.2rem; }
.hc-related li { margin: 0.3rem 0; }
.hc-back { margin-top: 2rem; }
.hc-site-footer a { color: rgba(255, 255, 255, 0.7); }
/* embedded in the app's help viewer (?embed=1): no site chrome */
.hc-embed .hc-site-nav, .hc-embed .hc-site-footer, .hc-embed .hc-back { display: none; }
.hc-embed .hc-main { padding: 1rem 0.75rem 2rem; }
.hc-embed .hc-wrap h1 { font-size: 1.5rem; }
@media (max-width: 640px) {
    .hc-main { padding-top: 6rem; }
    .hc-step { padding: 0.9rem 0.9rem 1rem 3.1rem; }
    .hc-step::before { left: 0.75rem; width: 1.7rem; height: 1.7rem; font-size: 0.85rem; }
    .hc-wrap h1 { font-size: 1.6rem; }
}

/* ---------- in the app ---------- */
.hc-has-q { display: inline-block; vertical-align: middle; }
.hc-q { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin-left: 0.5rem; vertical-align: middle;
    border-radius: 50%; border: 1.5px solid var(--primary-500, #355E3B); background: transparent; color: var(--primary-500, #355E3B);
    font-weight: 700; font-size: 0.9rem; line-height: 1; cursor: pointer; padding: 0; flex-shrink: 0; }
.hc-q:hover, .hc-q:focus-visible { background: var(--primary-500, #355E3B); color: #fff; }
.hc-viewer { position: fixed; inset: 0; z-index: 10050; background: rgba(15, 23, 42, 0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.hc-viewer-box { background: var(--bg-primary, #fff); width: min(920px, 100%); height: min(88vh, 100%); border-radius: 16px; display: flex; flex-direction: column;
    overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); }
.hc-viewer-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border, #e2e8f0); flex-wrap: wrap; }
.hc-viewer-bar strong { flex: 1; font-size: 0.95rem; min-width: 8rem; }
.hc-viewer-bar a, .hc-viewer-bar button { font-size: 0.85rem; }
.hc-viewer-close { border: none; background: none; font-size: 1.4rem; cursor: pointer; color: var(--text-muted, #64748b); padding: 0 0.3rem; }
.hc-viewer-more { display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0.4rem 0.8rem; border-bottom: 1px solid var(--border, #e2e8f0); }
.hc-viewer-more button { border: 1px solid var(--border, #e2e8f0); background: var(--bg-secondary, #f8fafc); border-radius: 999px; padding: 0.25rem 0.7rem; cursor: pointer; font-size: 0.8rem; }
.hc-viewer-more button[aria-pressed="true"] { border-color: var(--primary-500, #355E3B); color: var(--primary-500, #355E3B); font-weight: 600; }
.hc-viewer iframe { flex: 1; width: 100%; border: 0; background: #f8faf8; }
@media (max-width: 640px) { .hc-viewer { padding: 0; } .hc-viewer-box { height: 100%; border-radius: 0; } }
.hc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.6rem; }
.hc-list button { text-align: left; border: 1px solid var(--border, #e2e8f0); background: var(--bg-secondary, #f8fafc); border-radius: 12px; padding: 0.7rem 0.85rem;
    cursor: pointer; display: flex; flex-direction: column; gap: 0.2rem; color: inherit; }
.hc-list button:hover, .hc-list button:focus-visible { border-color: var(--primary-500, #355E3B); }
.hc-list button strong { font-size: 0.92rem; }
.hc-list button span { font-size: 0.8rem; color: var(--text-muted, #64748b); line-height: 1.4; }

/* MOBILE-1671 (owner 2026-11-11: no side-scroll on a phone) */
/* a long on-screen label ("Allow patients to pay by card in the patient portal") wraps inside the step card */
.hc-label { white-space: normal; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hc-step > p, .hc-intro, .hc-after, .hc-summary { overflow-wrap: anywhere; }
@media (max-width: 420px) {
    /* the Help Center bar (logo, Help Center, Log In, Start Free Trial) fits a 360 px phone: the logo mark stays, its word goes */
    .hc-site-nav .w-nav-logo span { display: none; }
    .hc-site-nav .w-nav-actions { gap: 0.6rem; }
}
/* The in-app Help pop-up on an iPhone with a notch / Dynamic Island (owner 2026-11-11: the clock sat on the title and the
   x was hard to reach): the pop-up keeps clear of the status bar, the home indicator and the rounded sides. index.html
   asks for viewport-fit=cover, so env(safe-area-inset-*) is the real inset on iOS and 0 everywhere else. */
.hc-viewer {
    padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px))
             max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}
@media (max-width: 640px) {
    /* full-screen on a phone: the white box still fills the screen, its bar and frame start below the status bar */
    .hc-viewer { padding: 0; }
    .hc-viewer-box { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); box-sizing: border-box; }
}

/* CONTACTCARD-1675: Contact ChiroApp card on Help & Support (always the ChiroApp logo green, whatever the practice colour; 44px touch targets, no fixed widths: fits 360px) */
.cc-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 0.6rem; }
.cc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 44px; padding: 0.55rem 0.6rem; box-sizing: border-box;
    border: 1.5px solid #355E3B; border-radius: 12px; background: #355E3B; color: #fff; font: inherit; font-weight: 600;
    font-size: 0.9rem; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; overflow-wrap: anywhere; }
.cc-btn[hidden], .cc-line[hidden] { display: none; }
.cc-btn:hover, .cc-btn:focus-visible { filter: brightness(1.1); }
.cc-btn.cc-ghost { background: transparent; color: #355E3B; }
.cc-btn i { font-size: 1.15rem; flex: none; }
.cc-line { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 44px; font-size: 0.9rem; overflow-wrap: anywhere; }
.cc-line span:first-child { min-width: 0; flex: 1 1 auto; }
.cc-copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-height: 44px; min-width: 44px; padding: 0 0.7rem; box-sizing: border-box;
    border: 1.5px solid #355E3B; border-radius: 12px; background: transparent; color: #355E3B; font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.cc-copy:hover, .cc-copy:focus-visible { background: #355E3B; color: #fff; }
