/* Destination: public/co/assets/css/kb.css
 *
 * Verde marketing site - one support answer at /kb/<slug> (commit 1514),
 * pages/kb/[slug].tsx. Loaded after verde-site.css and legal-page.css, which
 * give the centered head, the "On this page" rail and the document's type.
 * This sheet adds the breadcrumb, the search strip, the article's rich text
 * (the admin editor's HTML) and the "Still stuck?" card with related answers.
 * support.css stays for the admin's article editor. MARKETING-SITE-ENGINEERING.md
 * section 19.
 */

/* ---- Head ------------------------------------------------------------- */

.vs-kb-head h1 {
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.08;
}

.vs-kb-crumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vs-forest);
}

.vs-kb-crumbs a {
  text-decoration: underline;
}

.vs-kb-crumbs span[aria-hidden] {
  color: #9aaba2;
}

/* ---- Find another answer ---------------------------------------------- */

.vs-kb-search {
  padding: 0 0 40px;
}

.vs-kb-search__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 20px 24px;
  border: 1px solid #d5e0d9;
  border-radius: 14px;
  background: #f2f6f3;
}

.vs-kb-search__bar label {
  font-size: 15px;
  font-weight: 700;
  color: var(--vs-forest);
}

.vs-kb-jump {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.vs-kb-jump svg {
  position: absolute;
  left: 14px;
  top: 15px;
  width: 17px;
  height: 17px;
  fill: #5e6e66;
  pointer-events: none;
}

.vs-kb-jump input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border: 1px solid #d5e0d9;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--vs-ink);
}

.vs-kb-jump input:focus {
  border-color: var(--vs-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 90, 69, 0.15);
}

.vs-kb-jump__results {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  border: 1px solid var(--vs-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px -20px rgba(12, 48, 38, 0.35);
  list-style: none;
}

.vs-kb-jump__results a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--vs-forest);
}

.vs-kb-jump__results a:hover,
.vs-kb-jump__results a:focus-visible {
  background: var(--vs-wash);
}

.vs-kb-jump__results span {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: #5e6e66;
}

/* ---- The answer ------------------------------------------------------- */

/* An article with no h2 has no rail; the answer runs the full width. */
.vs-kb__solo {
  display: block;
}

/* The editor writes one long run of HTML, not sections, so each h2 after the
   first draws the divider the legal pages put between sections. */
.vs-kb__rich > :first-child {
  margin-top: 0;
}

.vs-kb__rich h2 {
  scroll-margin-top: 24px;
}

.vs-kb__rich h2:not(:first-child) {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--vs-line);
}

.vs-kb__rich h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--vs-forest);
}

.vs-kb__rich h4,
.vs-kb__rich h5,
.vs-kb__rich h6 {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--vs-forest);
}

.vs-kb__rich blockquote {
  margin: 20px 0 0;
  padding: 18px 22px;
  border: 1px solid #d5e0d9;
  border-radius: 12px;
  background: #f2f6f3;
}

.vs-kb__rich blockquote > :first-child {
  margin-top: 0;
}

.vs-kb__rich code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--vs-wash);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  color: var(--vs-forest);
}

.vs-kb__rich pre {
  margin-top: 16px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--vs-line);
  border-radius: 12px;
  background: var(--vs-wash);
}

.vs-kb__rich pre code {
  padding: 0;
  background: none;
}

.vs-kb__rich hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--vs-line);
}

.vs-kb__rich img,
.vs-kb__rich video {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 20px;
  border: 1px solid var(--vs-line);
  border-radius: 12px;
}

.vs-kb__rich iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin-top: 20px;
  border: 0;
  border-radius: 12px;
}

.vs-kb__rich s {
  color: #5e6e66;
}

.vs-kb__rich table {
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--vs-line);
  border-radius: 14px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 15px;
}

.vs-kb__rich th,
.vs-kb__rich td {
  padding: 12px 18px;
  border-top: 1px solid var(--vs-line);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}

.vs-kb__rich tr:first-child > * {
  border-top: 0;
}

.vs-kb__rich th {
  background: var(--vs-wash);
  font-weight: 700;
  color: var(--vs-forest);
}

/* ---- Still stuck? ----------------------------------------------------- */

.vs-kb-stuck {
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--vs-line);
  border-radius: 14px;
  background: var(--vs-wash);
}

.vs-legal__doc .vs-kb-stuck p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.6;
}

.vs-legal__doc .vs-kb-stuck .vs-kb-stuck__title {
  margin-top: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--vs-forest);
}

.vs-legal__doc .vs-kb-stuck .vs-kb-stuck__label {
  margin: 20px 0 10px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--vs-forest);
}

.vs-legal__doc .vs-kb-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vs-legal__doc .vs-kb-related li + li {
  margin-top: 0;
}

.vs-legal__doc .vs-kb-related a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--vs-line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.vs-legal__doc .vs-kb-related a:hover {
  border-color: var(--vs-line-strong);
  box-shadow: 0 6px 18px -10px rgba(12, 48, 38, 0.18);
}

.vs-kb-related span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5e6e66;
}

.vs-kb-related b {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--vs-forest);
}

/* 1710: the shared drawn arrow (.vs-arrow, verde-site.css); only its size
   and color are this page's. */
.vs .vs-kb-related .vs-arrow {
  width: 13px;
  height: 13px;
  color: var(--vs-green);
}

/* ---- Tablet and phone ------------------------------------------------- */

@media (max-width: 880px) {
  .vs-legal__doc .vs-kb-related {
    grid-template-columns: minmax(0, 1fr);
  }
}
