/* help-tools.css: the Help Center search (js/help-tools.js), the "See all dates" card on help.html, the dates
   page (dates.html), the share toast and the clean print of one guide. Class prefix ht-.
   Colors come from the tokens in css/pages.css and css/help-center.css, so light and dark both follow
   html[data-theme]. */

/* ------------------------------------------------------------ search */
.ht-search-slot { margin-top: 4px; }
.ht-search { position: relative; max-width: 620px; }
.ht-label { display: block; margin-bottom: 6px; font-size: .9375rem; font-weight: 700; color: var(--ink); }
.ht-box { position: relative; display: flex; align-items: center; }
.ht-box > svg { position: absolute; left: 14px; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.help-page .ht-input { width: 100%; min-height: 52px; padding: 0 52px 0 44px; border: 2px solid var(--hc-field); border-radius: 14px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 1.0625rem; }
.help-page .ht-input::placeholder { color: var(--muted); opacity: 1; }
.help-page .ht-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(36,104,168,.22); outline: none; }
.help-page .gd-main .ht-input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ht-clear { position: absolute; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--muted);
  font-size: 1.5rem; line-height: 1; cursor: pointer; }
.ht-clear:hover { background: var(--hover); color: var(--ink); }
.ht-clear[hidden] { display: none; }
.ht-hint { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); }
.ht-hint.is-empty { color: var(--text); font-weight: 600; }

.ht-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(15,35,60,.18);
  max-height: min(70vh, 520px); overflow-y: auto; }
.ht-list[hidden] { display: none; }
[data-theme="dark"] .ht-list { box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.ht-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 10px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.ht-opt.is-active { background: var(--hover); border-color: var(--accent); }
.ht-opt-text { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.ht-opt-title { display: block; font-weight: 700; color: var(--ink); line-height: 1.3; }
.ht-opt-sub { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.35; }
.ht-kind { flex: none; min-width: 76px; padding: 3px 8px; border-radius: 999px; font-size: .6875rem; font-weight: 800; text-align: center;
  text-transform: uppercase; letter-spacing: .05em; background: var(--c-enroll-bg); color: var(--c-enroll); }
.ht-kind-block { background: var(--c-cal-bg); color: var(--c-cal); }
.ht-kind-topic { background: var(--c-test-bg); color: var(--c-test); }
/* A block reached from a search result is briefly outlined. */
.gd-block h4[id^="gd-b-"] { scroll-margin-top: 24px; }
.ht-target { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) { .ht-target { transition: outline-color .4s; } }

/* Guide buttons (Back, Start over, Share, Print this guide): 44px targets. */
.gd-nav .btn { min-height: 44px; }

/* ------------------------------------------------------------ help.html: "See all dates" card */
.hc-dates.ht-dlink { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; }
.ht-dlink-icon { width: 52px; height: 52px; border-radius: 14px; background: #FFF1D6; color: #14324F; display: grid; place-items: center; flex: none; }
[data-theme="dark"] .ht-dlink-icon { background: rgba(242,179,61,.15); color: var(--gold); }
.ht-dlink-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ht-dlink-text { flex: 1 1 320px; min-width: 0; }
.ht-dlink-h { margin: 0; font-size: 1.375rem; font-weight: 800; color: var(--ink); }
.ht-dlink-p { margin: 4px 0 0; color: var(--hc-text-2); font-size: .9375rem; line-height: 1.5; }
.ht-dlink-a { flex: none; }

/* ------------------------------------------------------------ dates.html */
.ht-crumb { margin: 0; font-size: .875rem; font-weight: 700; }
.ht-crumb a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; }
.ht-today-link { margin: 10px 0 0; font-size: .92rem; font-weight: 700; }
.ht-today-link a { display: inline-flex; align-items: center; min-height: 44px; }
.ht-crumb a:hover { text-decoration: underline; }
.ht-dates-page .gd-intro h1 { font-size: 2.5rem; }
.ht-dates-page .hc-dates { margin-top: 32px; }
.ht-dates-page .hc-dates:focus { outline: none; }
.ht-dates-legal { margin: 32px 0 40px; font-size: .8125rem; }

/* ------------------------------------------------------------ toast (Share → Copy link) */
.ht-toast { position: fixed; z-index: 400; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 12px; background: #14324F; color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; }
[data-theme="dark"] .ht-toast { background: #EAF2FA; color: #0B1520; }
.ht-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: no-preference) { .ht-toast { transition: opacity .2s, transform .2s; } }
.ht-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ------------------------------------------------------------ phones */
@media (max-width: 600px) {
  .help-page .ht-input { font-size: 1rem; min-height: 50px; }
  .ht-hint { display: none; }
  .ht-hint.is-empty { display: block; }
  .ht-list { max-height: 60vh; }
  .ht-kind { min-width: 0; font-size: .625rem; padding: 2px 6px; }
  .hc-dates.ht-dlink { margin-top: 22px; padding: 16px; gap: 12px 14px; border-radius: 16px; }
  .ht-dlink-icon { width: 44px; height: 44px; }
  .ht-dlink-h { font-size: 1.125rem; }
  .ht-dlink-p { display: none; }
  .ht-dlink-text { flex-basis: 0; flex-grow: 1; }
  .ht-dlink-a { width: 100%; }
  .ht-dates-page .gd-intro h1 { font-size: 1.75rem; }
}

/* ------------------------------------------------------------ print one guide */
@media print {
  .ht-search-slot, .ht-toast, .hc-dates.ht-dlink, .ht-crumb { display: none !important; }
  /* One column, no navigation: only the open guide prints (the hub, panel, header and footer are hidden by
     css/guides.css), and every link shows its address so the paper copy is still useful. */
  .help-page.gd-guide-open .gd-main .wrap { max-width: none; padding: 0; }
  .help-page.gd-guide-open .gd-guide, .help-page.gd-guide-open .gd-guide * { float: none !important; }
  .help-page.gd-guide-open .gd-guide-head, .help-page.gd-guide-open .gd-fields, .help-page.gd-guide-open .gd-result,
  .help-page.gd-guide-open .gd-sources ul { display: block !important; columns: auto !important; }
  .help-page.gd-guide-open .gd-guide-icon, .help-page.gd-guide-open .gd-sp, .help-page.gd-guide-open .gd-ext,
  .help-page.gd-guide-open .gd-chev { display: none !important; }
  .help-page.gd-guide-open .gd-guide a { color: #000; text-decoration: underline; }
  .help-page.gd-guide-open .gd-guide a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; font-weight: 400; word-break: break-all; text-decoration: none; }
  body.gd-printing-letter .gd-guide a[href^="http"]::after { content: none; }
  .help-page .gd-main :focus, .help-page .gd-main :focus-visible, .ht-target { outline: none !important; }
}
