/*
 * .registration-success — success state of the webinar popup
 * (template-parts/global/registration-success.php inside modal.php).
 * Figma: D 1574:19220 "Registration Successful", 1574:19771 "Recording
 * Request Received!" (no mobile design: phones stack the buttons).
 *
 * Replaces the popup's form part once shown: logo, heading, text, buttons,
 * 60 px apart (40 on phones). Gaps follow Figma, which measures from the
 * glyphs: the heading and text trim their line boxes with negative margins
 * (em, so every size follows).
 */

/* .registration-success — logo, heading, text, buttons: 40 → 60 px apart */
.registration-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.5rem, 2.0556rem + 1.8957vw, 3.75rem);
  width: 100%;
  color: var(--nv-navy);
  text-align: center;

  &:focus {
    outline: none;
  }
}

/* .registration-success[hidden] — display: flex above would show it */
.registration-success[hidden] {
  display: none;
}

/* .registration-success__logo — 150 × 30, blue (Figma 1574:19226) */
.registration-success__logo {
  width: 9.375rem;

  & img {
    display: block;
    width: 100%;
    height: auto;
  }
}

/* .registration-success__heading — 40 → 75 px, as the popup title */
.registration-success__heading {
  margin-block: -0.136em -0.144em;
  font-weight: 400;
  font-size: clamp(2.5rem, 1.7225rem + 3.3176vw, 4.6875rem);
  line-height: 1;
  letter-spacing: -0.02em;

  & strong {
    color: var(--nv-green);
    font-weight: inherit;
  }
}

/* .registration-success__text — 18 → 23 px, navy at 80 % */
.registration-success__text {
  max-width: 47rem;
  margin-block: -0.237em -0.261em;
  color: rgba(19, 33, 50, 0.8);
  font-size: clamp(1.125rem, 1.0139rem + 0.4740vw, 1.4375rem);
  line-height: normal;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

/* .registration-success__email — the entered address, medium weight */
.registration-success__email {
  font-weight: 500;
}

/* .registration-success__actions — two equal buttons, 20 px apart; stacked on phones */
.registration-success__actions {
  display: grid;
  gap: 1.25rem;
  width: 100%;

  /* @media (width >= 48em) .registration-success__actions — both as wide as the wider one (Figma 367) */
  @media (width >= 48em) {
    grid-template-columns: 1fr 1fr;
    width: auto;
  }
}

/* .registration-success__actions--single — "Back to webinars" across the form width (Figma 620) */
.registration-success__actions--single {
  max-width: 38.75rem;

  /* @media (width >= 48em) .registration-success__actions--single */
  @media (width >= 48em) {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

/* .modal--thanks .registration-success__actions--single — the form thank-you popup: one 367 px button in the middle (Figma 18:43163) */
.modal--thanks .registration-success__actions--single {
  max-width: 22.9375rem;
}

/* .registration-success__button */
.registration-success__button {
  width: 100%;
  text-transform: uppercase;
}

/* .registration-success__button.button--secondary — navy label and navy → green frame on the light popup */
.registration-success__button.button--secondary {
  color: var(--nv-navy);

  /* .registration-success__button.button--secondary::before */
  &::before {
    background: linear-gradient(90deg, var(--nv-navy) 0%, var(--nv-green) 100%);
  }
}

/* .registration-success__hint — "(opens in a new tab)" for screen readers */
.registration-success__hint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
