/**
 * Help center: the hub /help/ (search, topics) and the articles /help/<slug>/.
 * Loaded only on these pages (VNM_Site_Layout::enqueue()).
 */

/* ---------- Hub: search ---------- */
.vn-help-hero .vn-hero__lead { margin-inline: auto; }
.vn-help-search { margin: 1.75rem auto 0; max-width: 40rem; text-align: left; }
.vn-help-search__label { display: block; margin-bottom: .4rem; font-size: var(--vnm-fs-sm); font-weight: 600; color: var(--vnm-text-strong); }
/* One pill: the field's border and focus ring like viewnamic-ui's inputs, the button a pill inside it (no shadow). */
.vn-help-search__field {
    display: flex; align-items: center; gap: .5rem; padding: 5px 5px 5px 1rem;
    border: 1.5px solid var(--vnm-border-strong); border-radius: var(--vnm-radius-pill); background: #fff; box-shadow: var(--vnm-shadow-sm);
    transition: border-color var(--vnm-duration) var(--vnm-ease), box-shadow var(--vnm-duration) var(--vnm-ease);
}
.vn-help-search__field:hover { border-color: var(--vnm-secondary); }
.vn-help-search__field:focus-within { border-color: var(--vnm-primary-strong); box-shadow: 0 0 0 3px rgba(0, 161, 146, .22), var(--vnm-shadow-sm); }
/* The button shows its own focus ring. */
.vn-help-search__field:has(.vn-help-search__submit:focus-visible) { border-color: var(--vnm-border-strong); box-shadow: var(--vnm-shadow-sm); }
.vn-help-search__icon { flex: none; color: var(--vnm-text-muted); }
.vn-help-search__input {
    flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0; border: 0; background: transparent; font: inherit; font-size: var(--vnm-fs-base); color: var(--vnm-text-strong);
    text-overflow: ellipsis;
}
.vn-help-search__input:focus, .vn-help-search__input:focus-visible { outline: none; box-shadow: none; }
.vn-help-search__input::placeholder { color: var(--vnm-text-muted); opacity: 1; }
.vn-help-search__input::-webkit-search-cancel-button { cursor: pointer; }
.vn-help-search__submit.vn-btn { flex: none; min-height: 44px; padding-block: 0; padding-inline: 1.35rem; border-radius: var(--vnm-radius-pill); box-shadow: none; }
.vn-help-search__submit.vn-btn:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--vnm-secondary); }
/* Phones: the button names the search, the magnifier gives its room to the words. */
@media (max-width: 480px) {
    .vn-help-search__field { padding-left: 1.1rem; }
    .vn-help-search__icon { display: none; }
    .vn-help-search__submit.vn-btn { padding-inline: 1.1rem; }
}
.vn-help-status { min-height: 1.5em; margin: .75rem auto 0; max-width: 40rem; font-size: var(--vnm-fs-sm); color: var(--vnm-text-muted); text-align: left; }
.vn-help-status:empty { min-height: 0; margin: 0; }

.vn-help-results { list-style: none; margin: .5rem auto 0; padding: 0; max-width: 40rem; display: grid; gap: .5rem; text-align: left; }
.vn-help-result {
    position: relative; display: grid; gap: .15rem; padding: .85rem 1rem; border: 1px solid var(--vnm-border); border-radius: var(--vnm-radius-md); background: #fff;
    transition: border-color var(--vnm-duration) var(--vnm-ease), box-shadow var(--vnm-duration) var(--vnm-ease);
}
.vn-help-result:hover, .vn-help-result:focus-within { border-color: var(--vnm-primary); box-shadow: var(--vnm-shadow-sm); }
.vn-help-result__link { font-family: var(--vnm-font-heading); font-weight: 700; color: var(--vnm-secondary); text-decoration: none; }
.vn-help-result__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vn-help-result__link:focus-visible { outline: none; box-shadow: none; }
.vn-help-result:has(.vn-help-result__link:focus-visible) { box-shadow: var(--vnm-focus); }
.vn-help-result__topic { font-size: var(--vnm-fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--vnm-primary-strong); }
.vn-help-result__text { font-size: var(--vnm-fs-sm); color: var(--vnm-text); line-height: 1.5; }

.vn-help-chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1.5rem 0 0; padding: 0; }
.vn-help-chips .vn-chip { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }

/* ---------- Hub: topics ---------- */
.vn-help-topics { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .vn-help-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .vn-help-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vn-help-topic {
    display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; border: 1px solid var(--vnm-border); border-radius: var(--vnm-radius-lg); background: #fff;
    scroll-margin-top: calc(var(--vnm-header-height) + 1rem);
}
.vn-help-topic:target { border-color: var(--vnm-primary); box-shadow: 0 0 0 3px var(--vnm-bg-tint); }
.vn-help-topic__head { display: flex; gap: .9rem; align-items: flex-start; }
.vn-help-topic__icon {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border-radius: var(--vnm-radius-md); background: var(--vnm-bg-tint); color: var(--vnm-primary-strong);
}
.vn-help-topic__title { margin: 0; font-size: var(--vnm-fs-lg); line-height: 1.3; color: var(--vnm-text-strong); }
.vn-help-topic__text { margin: .3rem 0 0; font-size: var(--vnm-fs-sm); line-height: 1.5; color: var(--vnm-text-muted); }
.vn-help-topic__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--vnm-border); }
.vn-help-topic__list li { margin: 0; border-bottom: 1px solid var(--vnm-border); }
.vn-help-topic__list li:last-child { border-bottom: 0; }
.vn-help-topic__list a {
    display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: .45rem 0; font-size: var(--vnm-fs-sm); line-height: 1.4;
    color: var(--vnm-text-strong); text-decoration: none;
}
.vn-help-topic__list a::after { content: "›"; margin-left: auto; padding-left: .5rem; color: var(--vnm-text-muted); }
.vn-help-topic__list a:hover { color: var(--vnm-secondary); text-decoration: underline; }
.vn-help-empty { text-align: center; color: var(--vnm-text-muted); }

/* ---------- Article: header ---------- */
.vn-help-header .vn-page-header__panel { padding-block: clamp(1.75rem, 1.4rem + 2vw, 3rem); }
.vn-help-header__inner { max-width: calc(var(--vnm-narrow-width) + 16rem + 4.5rem); }
.vn-help-crumbs { margin-bottom: 1rem; }
.vn-help-header__title { font-size: clamp(1.85rem, 1.45rem + 1.8vw, 2.75rem); max-width: 28ch; }
.vn-help-header__lead { margin: 0 0 1rem; max-width: 46rem; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: #3A4747; }
.vn-help-header__meta { margin: 0; font-size: var(--vnm-fs-sm); color: var(--vnm-text-muted); }

/* ---------- Article: layout (topic navigation beside the text from 1000px, below it before) ---------- */
.vn-help-layout { display: grid; gap: 2.5rem; max-width: calc(var(--vnm-narrow-width) + 16rem + 4.5rem); }
.vn-help-main { min-width: 0; max-width: var(--vnm-narrow-width); }
@media (min-width: 1000px) {
    .vn-help-layout { grid-template-columns: 15rem minmax(0, var(--vnm-narrow-width)); column-gap: clamp(2.5rem, 1rem + 3vw, 4.5rem); align-items: start; }
    .vn-help-main { grid-column: 2; grid-row: 1; }
    .vn-help-nav { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--vnm-header-height) + 1.5rem); max-height: calc(100vh - var(--vnm-header-height) - 3rem); overflow-y: auto; }
    .admin-bar .vn-help-nav { top: calc(var(--vnm-header-height) + 32px + 1.5rem); }
}

.vn-help-nav { padding: 1.25rem; border: 1px solid var(--vnm-border); border-radius: var(--vnm-radius-lg); background: var(--vnm-bg-tint); }
@media (min-width: 1000px) { .vn-help-nav { padding: 0 0 0 1rem; border: 0; border-left: 2px solid var(--vnm-border); border-radius: 0; background: none; } }
.vn-help-nav__title, .vn-help-toc__title {
    margin: 0 0 .5rem; font-family: var(--vnm-font-heading); font-size: var(--vnm-fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vnm-secondary);
}
.vn-help-nav__list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.vn-help-nav__list li { margin: 0; }
.vn-help-nav__list a {
    display: flex; align-items: center; min-height: 44px; padding: .35rem .6rem; border-radius: var(--vnm-radius-sm);
    font-size: var(--vnm-fs-sm); line-height: 1.4; color: var(--vnm-text); text-decoration: none;
}
.vn-help-nav__list a:hover { background: var(--vnm-bg-secondary); color: var(--vnm-secondary); }
.vn-help-nav__list a[aria-current="page"] { background: #fff; color: var(--vnm-secondary); font-weight: 600; box-shadow: inset 3px 0 0 var(--vnm-primary); }
@media (min-width: 1000px) { .vn-help-nav__list a[aria-current="page"] { background: var(--vnm-bg-tint); } }
.vn-help-nav__all { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-size: var(--vnm-fs-sm); font-weight: 600; color: var(--vnm-secondary); text-decoration: none; }
.vn-help-nav__all:hover { text-decoration: underline; }

/* ---------- Article: text ---------- */
.vn-help-toc { margin: 0 0 2rem; padding: 1rem 1.25rem; border: 1px solid var(--vnm-border); border-radius: var(--vnm-radius-lg); }
.vn-help-toc__list { margin: 0; padding-left: 1.25rem; display: grid; gap: 0; }
.vn-help-toc__list li { margin: 0; padding-left: .25rem; }
.vn-help-toc__list a { display: inline-flex; align-items: center; min-height: 44px; padding-block: .3rem; font-size: var(--vnm-fs-sm); line-height: 1.4; color: var(--vnm-secondary); }

.vn-help-prose { font-size: 1.0625rem; overflow-wrap: break-word; } /* long example addresses wrap on phones */
.vn-help-prose :where(h2) { margin-top: 2.25rem; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.65rem); scroll-margin-top: calc(var(--vnm-header-height) + 1.5rem); }
.vn-help-prose :where(h3) { margin-top: 1.75rem; font-size: clamp(1.125rem, 1.05rem + .3vw, 1.25rem); }
.vn-help-prose > :first-child { margin-top: 0; }
.vn-help-prose :where(ol) { padding-left: 0; list-style: none; counter-reset: vn-help-step; }
.vn-help-prose :where(ol) > li { position: relative; counter-increment: vn-help-step; padding-left: 2.6rem; margin-block: .85rem; }
.vn-help-prose :where(ol) > li::before {
    content: counter(vn-help-step); position: absolute; left: 0; top: .05em; display: inline-flex; align-items: center; justify-content: center;
    width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--vnm-bg-tint); color: var(--vnm-primary-strong);
    font-family: var(--vnm-font-heading); font-size: var(--vnm-fs-sm); font-weight: 700; line-height: 1;
}
.vn-help-prose :where(ol ol, ul ol) > li { padding-left: 2.2rem; }
.vn-help-prose :where(kbd) {
    display: inline-block; padding: .05em .4em; border: 1px solid var(--vnm-border-strong); border-bottom-width: 2px; border-radius: 4px;
    background: #fff; font-family: var(--vnm-font-mono); font-size: .85em; line-height: 1.4; color: var(--vnm-text-strong);
}
.vn-help-prose :where(table) { width: 100%; border-collapse: collapse; font-size: var(--vnm-fs-sm); }
.vn-help-prose :where(th, td) { padding: .6rem .75rem; border-bottom: 1px solid var(--vnm-border); text-align: left; vertical-align: top; }
.vn-help-prose :where(thead th) { background: var(--vnm-bg-secondary); color: var(--vnm-secondary); font-family: var(--vnm-font-heading); }
.vn-help-prose :where(a) { overflow-wrap: anywhere; }
.vn-help-prose :where(figure) { margin: 1.75rem 0; }
.vn-help-prose :where(figure img) {
    display: block; max-width: 100%; height: auto; border: 1px solid var(--vnm-border); border-radius: var(--vnm-radius-md);
    box-shadow: var(--vnm-shadow-sm); background: #fff;
}
.vn-help-prose :where(figcaption) { margin-top: .6rem; font-size: var(--vnm-fs-sm); line-height: 1.5; color: var(--vnm-text-muted); }
@media (max-width: 599px) {
    .vn-help-prose :where(table) { display: block; overflow-x: auto; }
}

/* Notes: tip (default), plan, warning */
.vn-help-prose .vn-help-note {
    margin-block: 1.5rem; padding: .9rem 1.1rem .9rem 1.1rem; border-left: 4px solid var(--vnm-primary); border-radius: 0 var(--vnm-radius-md) var(--vnm-radius-md) 0;
    background: var(--vnm-bg-tint); font-size: var(--vnm-fs-sm); line-height: 1.6;
}
.vn-help-prose .vn-help-note--plan { border-left-color: var(--vnm-secondary); background: var(--vnm-bg-secondary); }
.vn-help-prose .vn-help-note--warning { border-left-color: var(--vnm-warning); background: var(--vnm-warning-bg); }

/* ---------- Article: questions, related, contact ---------- */
.vn-help-section-title { margin: 3rem 0 1rem; font-size: clamp(1.25rem, 1.15rem + .4vw, 1.5rem); color: var(--vnm-text-strong); }
.vn-help-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 640px) { .vn-help-cards { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); } }
.vn-help-card {
    position: relative; display: flex; flex-direction: column; gap: .3rem; margin: 0; padding: 1rem 1.1rem; border: 1px solid var(--vnm-border); border-radius: var(--vnm-radius-md); background: #fff;
    transition: border-color var(--vnm-duration) var(--vnm-ease), box-shadow var(--vnm-duration) var(--vnm-ease);
}
.vn-help-card:hover, .vn-help-card:focus-within { border-color: var(--vnm-primary); box-shadow: var(--vnm-shadow-sm); }
.vn-help-card__topic { font-size: var(--vnm-fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--vnm-primary-strong); }
.vn-help-card__link { font-family: var(--vnm-font-heading); font-weight: 700; line-height: 1.35; color: var(--vnm-secondary); text-decoration: none; }
.vn-help-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vn-help-card__link:focus-visible { outline: none; box-shadow: none; }
.vn-help-card:has(.vn-help-card__link:focus-visible) { box-shadow: var(--vnm-focus); }
.vn-help-card__text { font-size: var(--vnm-fs-sm); line-height: 1.5; color: var(--vnm-text); }

.vn-help-contact {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 3rem; padding: 1.25rem 1.5rem;
    border-radius: var(--vnm-radius-lg); background: var(--vnm-bg-secondary);
}
.vn-help-contact > div { flex: 1 1 14rem; min-width: 0; }
.vn-help-contact__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--vnm-primary-strong); }
.vn-help-contact__title { margin: 0 0 .15rem; font-size: var(--vnm-fs-lg); color: var(--vnm-text-strong); }
.vn-help-contact p { margin: 0; font-size: var(--vnm-fs-sm); color: var(--vnm-text); }

@media (prefers-reduced-motion: reduce) {
    .vn-help-result, .vn-help-card { transition: none; }
}
