/* Hand of the Week signup form (layouts/partials/newsletter-signup.njk).
   Self-contained so it looks the same on every public layout; brand colours
   are hard-coded because most pages don't define the freetrial CSS variables. */

.hotw-signup {
  margin: 0;
  font-family: "Roboto", sans-serif;
  color: #212121;
  text-align: left;
}

.hotw-signup__label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
}

/* First name + email side by side, experience level full width. */
.hotw-signup__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 0.75rem;
}

.hotw-signup__field {
  min-width: 0;
}

.hotw-signup__field--wide {
  grid-column: 1 / -1;
}

.hotw-signup__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.65rem 0.9rem;
  border: 1px solid #BDBDBD;
  border-radius: 8px;
  background: #fff;
  color: #212121;
  font: inherit;
  font-size: 1.05rem;
}

.hotw-signup__input::placeholder {
  color: #8a949e;
}

/* Native select: keep the arrow, match the input chrome. */
.hotw-signup__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23212121' stroke-width='2' d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}

.hotw-signup__select:invalid {
  color: #8a949e; /* placeholder option looks like the input placeholders */
}

.hotw-signup__select option {
  color: #212121;
}

.hotw-signup__input:focus-visible,
.hotw-signup__btn:focus-visible {
  outline: 3px solid #00796B;
  outline-offset: 2px;
}

.hotw-signup__btn {
  display: inline-block;
  margin-top: 0.9rem;
  min-height: 48px;
  padding: 0.65rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #FFC107;
  color: #212121;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background 0.15s ease;
}

.hotw-signup__btn:hover {
  background: #E5A000;
}

.hotw-signup__btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* Google's checkbox is a fixed 304x78 iframe; keep its box the same height
   before it renders so the page doesn't jump when the lazy script arrives. */
.hotw-signup__captcha {
  min-height: 78px;
  margin: 0.9rem 0 0;
}

.hotw-signup__error {
  margin: 0.6rem 0 0;
  color: #B71C1C;
  font-size: 0.95rem;
  font-weight: 600;
}

.hotw-signup__fineprint {
  margin: 0.75rem 0 0;
  color: #5A6572;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .hotw-signup__fields {
    grid-template-columns: 1fr;
  }

  .hotw-signup__btn {
    display: block;
    width: 100%;
  }
}

/* ---- Block wrapper (layouts/partials/newsletter-block.njk) ---- */

.hotw-block {
  box-sizing: border-box;
  margin: 2.5rem 0 1.5rem;
  padding: 1.5rem 1.5rem 1.6rem;
  border: 1px solid #E0E0E0;
  border-left: 4px solid #FFC107;
  border-radius: 10px;
  background: linear-gradient(160deg, #f7faf9 0%, #ffffff 40%, #fff8e7 100%);
  font-family: "Roboto", sans-serif;
  color: #212121;
  text-align: left;
}

.hotw-block--center {
  /* keeps a gutter on phones when the parent has no side padding */
  max-width: min(44rem, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.hotw-block__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5A6572;
}

.hotw-block__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  color: #212121;
}

.hotw-block__lead {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #3d4b5a;
}

/* Compact variant: the form is behind a reveal button. */
.hotw-block__reveal {
  margin: 0;
}

.hotw-block__reveal-btn {
  display: inline-block;
  list-style: none;
  min-height: 48px;
  padding: 0.65rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #FFC107;
  color: #212121;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background 0.15s ease;
}

.hotw-block__reveal-btn::-webkit-details-marker,
.hotw-block__reveal-btn::marker {
  display: none;
  content: "";
}

.hotw-block__reveal-btn:hover {
  background: #E5A000;
}

.hotw-block__reveal-btn:focus-visible {
  outline: 3px solid #00796B;
  outline-offset: 2px;
}

.hotw-block__reveal[open] .hotw-block__reveal-btn {
  display: none; /* the real submit button takes over */
}

@media (max-width: 480px) {
  .hotw-block {
    padding: 1.25rem 1rem 1.3rem;
  }

  .hotw-block__reveal-btn {
    display: block;
    text-align: center;
  }
}

/* base.njk pages load senior-friendly-typography.css, whose global
   `p { font-size/weight/line-height/color !important }` and `label`/`li`
   rules flatten the block. Restate the block's own typography with matching
   !important so it looks the same on every layout. */
.hotw-block .hotw-block__kicker {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: #5A6572 !important;
}

.hotw-block .hotw-block__title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #212121 !important;
}

.hotw-block .hotw-block__lead {
  font-size: 1.05rem !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  color: #3d4b5a !important;
}

.hotw-signup .hotw-signup__label {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: #212121 !important;
}

.hotw-signup .hotw-signup__error {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #B71C1C !important;
}

.hotw-signup .hotw-signup__fineprint {
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: #5A6572 !important;
}

/* Pin margins too: several pages set their own `p` margins. */
.hotw-block .hotw-block__kicker { margin: 0 0 0.35rem !important; }
.hotw-block .hotw-block__title { margin: 0 0 0.5rem !important; }
.hotw-block .hotw-block__lead { margin: 0 0 1.1rem !important; }
.hotw-signup .hotw-signup__error { margin: 0.6rem 0 0 !important; }
.hotw-signup .hotw-signup__fineprint { margin: 0.75rem 0 0 !important; }

/* Newsletter placement experiment. Units (.hotw-unit = the block partial's
   <section>, plus the /freetrial/ section tagged .hotw-unit--freetrial) stay
   hidden until partials/posthog.njk resolves the `newsletter-placement` flag
   and adds one of these classes to <html>:
     sbb-nl-all        control: show every unit
     sbb-nl-freetrial  freetrial_only: show only the /freetrial/ section
     sbb-nl-none       none: show nothing
   The member/print rules below must stay after this so they still win. */
.hotw-unit {
  display: none;
}

html.sbb-nl-all .hotw-unit,
html.sbb-nl-freetrial .hotw-unit--freetrial {
  display: block;
}

/* Logged-in members (html.sbb-member) don't need the pitch; several target
   pages are printables (score tables, flippers). */
html.sbb-member .hotw-block,
html.sbb-member .hotw-signup {
  display: none !important;
}

@media print {
  .hotw-block,
  .hotw-signup {
    display: none !important;
  }
}
