/* ==========================================================================
   Appointment Tools — Help Center
   End-user knowledge base. Extends the developer-docs shell (/docs/docs.css)
   and the marketing brand tokens (/home/css/brand.css). Only Help-specific
   pieces live here: nav search, category grid, article list, contact CTA.
   Scoped under body.help so it never touches the API docs.
   ========================================================================== */

/* ---- Nav badge tint (Help Center = green identity, distinct from the red API docs) ---- */
body.help .help-nav__badge {
    color: var(--docs-green-dark);
    background: var(--docs-green-tint);
}

/* ---- Search (nav + hero share .help-search) ---- */
.help-search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border-strong);
    border-radius: 10px;
    padding: 0 12px;
    height: 40px;
    min-width: 240px;
    max-width: 340px;
    flex: 1 1 260px;
}
.help-search__icon {
    color: var(--docs-muted-soft);
    font-size: 20px;
    margin-right: 8px;
}
.help-search__input {
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--docs-font-body);
    font-size: 14.5px;
    color: var(--docs-ink);
    width: 100%;
    height: 100%;
}
.help-search__input::placeholder { color: var(--docs-muted-soft); }
.help-search:focus-within { border-color: var(--docs-green); box-shadow: 0 0 0 3px var(--docs-green-tint); }

.help-search__results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(29, 29, 26, 0.14);
    padding: 6px;
    z-index: 60;
    max-height: 60vh;
    overflow-y: auto;
}
.help-search__hit {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
}
.help-search__hit:hover { background: var(--docs-canvas); }
.help-search__hit-title { color: var(--docs-ink); font-weight: 600; font-size: 14.5px; }
.help-search__hit-cat {
    color: var(--docs-muted);
    font-size: 12px;
    font-family: var(--docs-font-mono);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.help-search__empty { padding: 12px; color: var(--docs-muted); font-size: 14px; margin: 0; }

/* Hero search is bigger and centred. */
.help-search--hero {
    height: 56px;
    max-width: 620px;
    margin: 22px auto 0;
    border-radius: 14px;
    padding: 0 18px;
}
.help-search--hero .help-search__icon { font-size: 24px; }
.help-search--hero .help-search__input { font-size: 16.5px; }

/* ---- Home hero ---- */
.help-hero { text-align: center; padding: 24px 0 8px; }
.help-hero h1 { margin: 0 0 6px; }

/* ---- Category grid ---- */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin: 40px 0 8px;
}
.help-card {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.help-card:hover {
    border-color: var(--docs-border-strong);
    box-shadow: 0 8px 22px rgba(29, 29, 26, 0.08);
    transform: translateY(-2px);
}
.help-card__icon {
    flex: none;
    font-size: 26px;
    color: var(--docs-green);
    background: var(--docs-green-tint);
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}
.help-card__body { display: flex; flex-direction: column; gap: 4px; }
.help-card__title {
    font-family: var(--docs-font-display);
    font-weight: 700;
    font-size: 16.5px;
    color: var(--docs-ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.help-card__summary { color: var(--docs-muted); font-size: 14px; line-height: 1.5; }
.help-card__count {
    margin-top: 4px;
    font-family: var(--docs-font-mono);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--docs-muted-soft);
}
.help-card--soon { opacity: .72; }
.help-card--soon .help-card__icon { color: var(--docs-muted); background: var(--docs-canvas); }

/* ---- "Soon" tag (grid + sidebar) ---- */
.help-soon-tag {
    font-family: var(--docs-font-mono);
    font-style: normal;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--docs-gold);
    background: var(--docs-gold-tint);
    border-radius: 999px;
    padding: 2px 7px;
    line-height: 1.4;
}
.docs-sidebar__list .help-soon-tag { margin-left: 6px; }

/* ---- Breadcrumb + category heading ---- */
.help-breadcrumb {
    font-size: 13px;
    color: var(--docs-muted);
    margin-bottom: 14px;
}
.help-breadcrumb a { color: var(--docs-green-dark); text-decoration: none; }
.help-breadcrumb a:hover { text-decoration: underline; }
.help-breadcrumb span { margin: 0 6px; color: var(--docs-muted-soft); }
.help-category h1 { display: flex; align-items: center; gap: 12px; }
.help-category__icon {
    font-size: 26px;
    color: var(--docs-green);
    background: var(--docs-green-tint);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

/* ---- Article list on a category page ---- */
.help-article-list { list-style: none; padding: 0; margin: 28px 0 0; }
.help-article-list li { margin-bottom: 12px; }
.help-article-list__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.help-article-list__item:hover { border-color: var(--docs-border-strong); box-shadow: 0 6px 18px rgba(29,29,26,.07); }
.help-article-list__icon { color: var(--docs-green); flex: none; }
.help-article-list__body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.help-article-list__title { font-family: var(--docs-font-display); font-weight: 600; font-size: 15.5px; color: var(--docs-ink); }
.help-article-list__summary { color: var(--docs-muted); font-size: 13.5px; }
.help-article-list__chev { color: var(--docs-muted-soft); flex: none; }

/* ---- Contact CTA ---- */
.help-contact-wrap { margin-top: 8px; }
.help-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px 0 8px;
    padding: 24px 28px;
    background: var(--docs-green-tint);
    border: 1px solid var(--docs-border);
    border-radius: 16px;
}
.help-contact__text h2 { margin: 0 0 4px; }
.help-contact__text p { margin: 0; color: var(--docs-muted); }
.help-contact__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--docs-font-display);
    font-weight: 600;
    font-size: 15px;
    color: #fff !important;
    background: var(--docs-green);
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
}
.help-contact__cta:hover { background: var(--docs-green-dark); }

/* ---- Responsive: fold the nav search under the bar on small screens ---- */
@media (max-width: 900px) {
    .docs-nav .help-search { display: none; } /* hero search still available on /help */
}

/* ---- Never underline the card/list link surfaces on hover ----
   docs.css has `.docs-content a:hover { text-decoration: underline }` (for inline
   prose links). These cards ARE whole-element links inside .docs-content, so that
   underline looked wrong. Override with equal/higher specificity (help.css loads
   after docs.css). Inline article/breadcrumb text links keep their underline. */
.docs-content a.help-card:hover,
.docs-content a.help-article-list__item:hover,
.docs-content a.help-contact__cta:hover,
.help-search__hit:hover {
    text-decoration: none;
}

/* ---- Help footer = green identity (mirrors the header) ---- */
body.help .docs-foot a:hover { color: var(--docs-green-dark); }

/* ---- Screenshots / figures in help articles ----
   Convention: <figure class="docs-figure"><img loading="lazy" width height>
   <figcaption>…</figcaption></figure>. Images live under /docs/help-media/. */
.docs-content .docs-figure {
    margin: 28px 0;
}
.docs-content .docs-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(29, 29, 26, 0.08);
    background: var(--docs-surface);
}
.docs-content .docs-figure figcaption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--docs-muted);
}
