/* Help Center: the article list, the search field, and the breadcrumb on a document.
   Everything else is legal.css, which already sets long prose for reading. */

/* ---------------- the article list ----------------
   ROWS, NOT CARDS. Nielsen Norman is explicit that a homogeneous collection wants a standard
   vertical list rather than cards: a grid moves the eye in two dimensions and puts every title in
   a different place, while a list fixes them all at one left edge so the eye runs straight down.
   Thirty-one items that are each "a title and a sentence" is exactly that case, and rows say the
   same thing in about half the vertical space. Separators are hairlines between rows rather than
   a box around each one, so the group reads as one list instead of thirty-one objects. */

.help-list {
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

.lg-doc a.help-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 12px 14px 2px;
  border-bottom: 1px solid var(--border);
  text-decoration: none; /* outranks `.lg-doc a { text-decoration: underline }` in legal.css */
  color: inherit;
  transition:
    background 140ms ease,
    padding-left 140ms ease;
}
.lg-doc a.help-row:hover {
  background: rgba(17, 24, 39, 0.025);
  padding-left: 8px;
}
.lg-doc a.help-row:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: -2px;
}
/* An explicit `display` beats the user-agent's `[hidden] { display: none }`, so a row the search
   marks hidden would stay on screen while the result count said otherwise. This restores it. */
.lg-doc a.help-row[hidden] {
  display: none;
}

.help-row-text {
  display: block;
  min-width: 0;
  flex: 1;
}
.help-row-t {
  display: block;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
}
.help-row-s {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--stone);
}

/* The affordance that says this row goes somewhere. Quiet at rest, ember on hover. */
.help-row-go {
  flex: none;
  font-size: 20px;
  line-height: 1;
  color: var(--border-2);
  transition: color 140ms ease;
}
.lg-doc a.help-row:hover .help-row-go {
  color: var(--ember);
}
.lg-doc a.help-row:hover .help-row-t {
  color: var(--ember-deep);
}

/* ---------------- search ----------------
   Ships hidden and is unhidden by js/help.js: the page is complete and browsable without it, and
   a search box that cannot search is worse than no search box. */

.help-search {
  margin-top: 22px;
}
.help-search-l {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 8px;
}
.help-search input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
  font-size: 15px;
  color: var(--text);
}
.help-search input::placeholder {
  color: var(--stone);
}
.help-search input:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(226, 127, 72, 0.15);
}

.help-count {
  margin-top: 10px;
  font-size: 13px;
  color: var(--stone);
}
.help-empty {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  max-width: 58ch;
}

/* ---------------- breadcrumb ----------------
   The way back up. A document reached from search or a link has to say where it sits. */

.help-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--stone);
}
.help-crumb a {
  color: var(--stone);
  text-decoration: none;
}
.help-crumb a:hover {
  color: var(--ember-deep);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .lg-doc a.help-row,
  .help-row-go {
    transition: none;
  }
  .lg-doc a.help-row:hover {
    padding-left: 2px;
  }
}
