/* VFE Studio Guide (public-guide.js): welcome, spotlight card, Help Center, contextual help.
   Uses the shared tokens from /theme.css; no new colours or fonts. */

/* Welcome (re-uses the #first-run dialog) */
#first-run.vg-welcome{max-width:560px;width:calc(100vw - 32px);padding:1.6rem 1.6rem 1.2rem}
#first-run.vg-welcome h2{font-size:28px;margin:.4rem 0 .5rem}
.vg-welcome-lead{color:var(--ink-2);font-size:15px;line-height:1.65;margin:0 0 1.2rem}
.vg-choices{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
.vg-choice{display:flex;flex-direction:column;align-items:flex-start;gap:.3rem;text-align:left;border:1px solid var(--line-2);background:var(--surface);border-radius:var(--r-lg);padding:1rem 1.05rem;font:inherit;color:var(--ink);transition:border-color .15s,background .15s}
.vg-choice b{font:600 16px/1.3 var(--font-display)}
.vg-choice span{color:var(--ink-2);font-size:13.5px;line-height:1.5}
.vg-choice:hover{border-color:var(--accent);background:var(--accent-soft)}
.vg-choice:focus-visible{box-shadow:var(--focus);border-color:var(--accent)}
.vg-choice:first-child{border-color:var(--accent-line);background:linear-gradient(180deg,var(--accent-soft),var(--surface))}
.vg-welcome-fine{color:var(--muted);font-size:12.5px;line-height:1.6;margin:1rem 0 .2rem}
.vg-welcome-later{display:flex;justify-content:flex-end}
@media (max-width:520px){.vg-choices{grid-template-columns:1fr}#first-run.vg-welcome h2{font-size:24px}}

/* Spotlight + card. The spot never blocks clicks: the highlighted control stays usable. */
.vg-root{position:fixed;inset:0;z-index:45;pointer-events:none}
.vg-spot{position:fixed;border-radius:12px;box-shadow:0 0 0 3px var(--accent),0 0 0 9999px rgba(21,23,28,.45);transition:left .2s ease,top .2s ease,width .2s ease,height .2s ease;pointer-events:none}
.vg-card{position:fixed;pointer-events:auto;width:min(380px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:.9rem 1.05rem 1rem;box-shadow:var(--shadow-2);color:var(--ink)}
.vg-card.vg-sheet{left:12px!important;right:12px;bottom:12px;top:auto!important;width:auto;max-height:46vh}
.vg-card.vg-min{width:auto;padding:0;border-radius:999px;overflow:visible}
.vg-head{display:flex;align-items:center;gap:.6rem;margin-bottom:.15rem}
.vg-count{font-size:12px;font-weight:600;color:var(--accent-ink);white-space:nowrap}
.vg-bar{flex:1;height:4px;border-radius:4px;background:var(--sunken);overflow:hidden}
.vg-bar i{display:block;height:100%;background:var(--accent);border-radius:inherit;transition:width .3s ease}
.vg-icon{width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:var(--ink-2);font-size:18px;line-height:1;display:grid;place-items:center}
.vg-icon:hover{background:var(--sunken);color:var(--ink)}
.vg-card h3{font:600 18px/1.3 var(--font-display);margin:.35rem 0 .45rem;outline:none}
.vg-card h3:focus-visible,.vg-help h2:focus-visible{box-shadow:none}
.vg-body p{margin:0 0 .6rem;color:var(--ink-2);font-size:14px;line-height:1.6}
.vg-body ul{margin:0 0 .6rem;padding-left:1.1rem;color:var(--ink-2);font-size:13.5px;line-height:1.55}
.vg-body li{margin:.15rem 0}
.vg-body b{color:var(--ink)}
.vg-glyph{font-family:var(--font-display);font-size:18px}
.vg-note{color:var(--muted)!important;font-size:12.5px!important}
.vg-wait{background:var(--accent-soft);border-radius:var(--r-sm);padding:.45rem .6rem;color:var(--accent-ink)!important}
.vg-error{background:var(--bad-soft);border-radius:var(--r-sm);padding:.45rem .6rem;color:var(--bad)!important}
.vg-actions{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;margin-top:.7rem}
.vg-actions>span{flex:1}
.vg-actions-col{flex-direction:column;align-items:stretch}
.vg-pill{display:inline-flex;align-items:center;gap:.5rem;border:1px solid var(--accent-line);background:var(--surface);color:var(--accent-ink);border-radius:999px;padding:.55rem .95rem;font:600 13px/1.2 var(--font-ui);box-shadow:var(--shadow-2);max-width:min(440px,calc(100vw - 24px));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vg-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);flex:none}
.vg-target{scroll-margin:96px}
#help-button.has-guide::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--accent);margin-left:.15rem}

/* Help Center on the "Cách sử dụng" page */
.vg-help{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);padding:1.3rem 1.4rem;margin:1rem 0 2rem;box-shadow:var(--shadow-1)}
.vg-help-main{display:flex;gap:1.5rem;align-items:flex-end;justify-content:space-between;flex-wrap:wrap}
.vg-help-main h2{font-size:24px;margin:.3rem 0 .4rem;outline:none}
.vg-help-main p{margin:0 0 .4rem;color:var(--ink-2);max-width:38em}
.vg-help-status{font-size:13px}
.vg-help-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.vg-help-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.4rem;margin-top:1.2rem;border-top:1px solid var(--line);padding-top:1rem}
.vg-help-grid h3{font:600 16px/1.3 var(--font-display);margin:0 0 .4rem}
.vg-help details{border-bottom:1px solid var(--line);padding:.45rem 0}
.vg-help summary{cursor:pointer;font-weight:600;font-size:14px;color:var(--ink)}
.vg-help details p{margin:.4rem 0 .2rem;color:var(--ink-2);font-size:13.5px;line-height:1.6}
.vg-help-feedback{margin-top:.8rem;font-size:13.5px}
@media (max-width:860px){.vg-help-grid{grid-template-columns:1fr}}

/* Contextual help: closed by default, opened only by the user */
.vg-info{position:relative;display:inline-flex;align-items:center;vertical-align:middle;margin-left:.35rem}
.vg-info-btn{width:20px;height:20px;border-radius:50%;border:1px solid var(--line-2);background:var(--surface);color:var(--ink-2);font:600 11px/1 var(--font-ui);display:grid;place-items:center;padding:0}
.vg-info-btn:hover,.vg-info-btn[aria-expanded=true]{border-color:var(--accent);color:var(--accent-ink)}
.vg-info-pop{position:absolute;z-index:30;top:calc(100% + 6px);right:0;width:min(280px,calc(100vw - 32px));background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--shadow-2);padding:.6rem .75rem;font-size:13px;line-height:1.55;color:var(--ink-2);white-space:normal;text-align:left}
.vg-info-pop b{color:var(--ink)}
.vg-info-line{display:flex;align-items:center;margin:0 0 .3rem;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.vg-info-line .vg-info-pop{left:0;right:auto;text-transform:none;letter-spacing:0;font-weight:400}

@media (prefers-reduced-motion:reduce){.vg-spot,.vg-bar i,.vg-choice{transition:none}}
.vg-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
@media (max-width:760px){#help-button .vg-help-label{display:none}#help-button{padding-left:.6rem;padding-right:.6rem}}
/* Topbar: its buttons wrap on narrower screens; let the bar grow instead of spilling onto the page heading. */
@media (max-width:1200px){
  .topbar{height:auto;min-height:56px;flex-wrap:wrap;row-gap:.4rem;padding-top:10px;padding-bottom:10px}
  .project-actions{justify-content:flex-end;row-gap:.4rem;margin-left:auto}
}
