/* Shared controls, blog design system v2 (v2_kit.py: btn, text_link, chip, email_form).
   Rules the boards follow: pills and buttons never wrap, and a control keeps its size
   when it is selected. */

/* Button: a pill in the theme's button colours. 56 tall, 44 when small. */
.hc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--hc-btn-bg);
  color: var(--hc-btn-fg);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.hc-btn:hover,
.hc-btn:focus {
  color: var(--hc-btn-fg);
  opacity: 0.88;
}
.hc-btn--sm {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
}
.hc-btn--full {
  align-self: stretch;
}
/* On the moment band and the footer (dark in both themes) the button takes the dark
   theme's colours, as the boards do. */
.hc-on-dark .hc-btn,
.hc-btn--on-dark {
  background: #eef0f4;
  color: #12151a;
}
.hc-on-dark .hc-btn:hover,
.hc-btn--on-dark:hover {
  color: #12151a;
}

/* Text link: accent, underlined, one line, 44 tall for touch. */
.hc-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  color: var(--hc-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  white-space: nowrap;
}
/* Quiet link: an article link that never competes with the sign-up. */
.hc-quiet-link {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--hc-body);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hc-strong);
  text-underline-offset: 4px;
}
.hc-quiet-link:hover {
  color: var(--hc-body);
}

/* Chip. Selected chips go bold; the hidden bold copy of the label (data-label) holds
   the width, so selecting one never changes its size. */
.hc-chip {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  box-sizing: border-box;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--hc-chip);
  box-shadow: inset 0 0 0 1px var(--hc-chip-line);
  color: var(--hc-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.hc-chip > span,
.hc-chip::after {
  grid-area: 1 / 1;
}
.hc-chip::after {
  content: attr(data-label);
  font-weight: 600;
  visibility: hidden;
  height: 0;
}
a.hc-chip:hover {
  color: var(--hc-text);
}
.hc-chip.is-on,
.hc-chip[aria-pressed="true"],
.hc-chip[aria-current] {
  background: var(--hc-chip-on-bg);
  box-shadow: inset 0 0 0 1px var(--hc-chip-on-line);
  color: var(--hc-chip-on-fg);
  font-weight: 600;
}
.hc-chip--sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

/* Waitlist form (inc/waitlist.php keeps the hc_wl handler; this is only its look).
   The field and button selectors carry the element name to beat Astra's input[type=email]
   and button rules. */
.hc-wl {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin: 0;
}
.hc-wl__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.hc-wl input.hc-wl__email {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  height: 56px;
  padding: 0 22px;
  border: 1px solid var(--hc-field-line);
  border-radius: 999px;
  background: var(--hc-field);
  color: var(--hc-text);
  font-family: inherit;
  font-size: 16px;
}
.hc-wl input.hc-wl__email::placeholder {
  color: var(--hc-muted);
  opacity: 1;
}
.hc-wl input.hc-wl__email:focus {
  outline: 2px solid var(--hc-focus);
  outline-offset: 2px;
  border-color: var(--hc-focus);
}
.hc-wl button.hc-wl__btn {
  flex-shrink: 0;
  box-sizing: border-box;
  height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--hc-btn-bg);
  color: var(--hc-btn-fg);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.hc-wl button.hc-wl__btn:hover {
  opacity: 0.88;
}
.hc-wl__done {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--hc-text);
}
.hc-wl--stacked {
  flex-direction: column;
}
.hc-wl--stacked input.hc-wl__email {
  flex: 0 0 auto;
}
/* On a dark band the form takes the dark theme's field and button. */
.hc-on-dark .hc-wl input.hc-wl__email {
  background: #282c34;
  border-color: #3e424c;
  color: #eef0f4;
}
.hc-on-dark .hc-wl input.hc-wl__email::placeholder {
  color: #a0a5ae;
}
.hc-on-dark .hc-wl button.hc-wl__btn {
  background: #eef0f4;
  color: #12151a;
}
.hc-on-dark .hc-wl__done {
  color: #eef0f4;
}

@media (max-width: 600px) {
  .hc-wl {
    flex-direction: column;
    max-width: none;
  }
  .hc-wl input.hc-wl__email {
    flex: 0 0 auto;
  }
}

/* Visually hidden, still read by screen readers. */
.hc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
