/* =====================================================
   Book pre-order bonus — the claim page (page-templates/free-seat.php) and the
   offer notes on the homepage and workshop page. Loaded only on those pages
   (inc/free-seat.php). The claim page is built from the free training signup
   hero and next-step section (free-training.css) and the workshop styles
   (workshop.css); only what differs lives here.
===================================================== */

/* #region OFFER STATES */

/* Each offer element carries .ppc-offer and the state for today:
   --upcoming, --open or --ended. The server sets it, and
   ppc-free-seat-status.js updates it on cached copies. */
.ppc-offer:not(.ppc-offer--upcoming) .ppc-offer-upcoming-only,
.ppc-offer:not(.ppc-offer--open) .ppc-offer-open-only,
.ppc-offer-open-only.ppc-offer:not(.ppc-offer--open),
.ppc-offer:not(.ppc-offer--ended) .ppc-offer-ended-only,
.ppc-offer--ended .ppc-offer-not-ended {
  display: none !important;
}

/* #endregion OFFER STATES */

/* #region OFFER NOTES */

/* Homepage, under "Pre-order Now" in the navy book section. The copy column
   is a constrained layout, which centres narrower children; keep it flush
   left with the button. */
.ppc-book-copy-inner .ppc-offer-note--home {
  color: rgba(247, 244, 239, 0.92);
  font-family: "Quicksand", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  margin: 1.5rem 0 0 !important;
  max-width: 34rem;
}

/* The site's link style (style.css, [data-link="type-2"]) is uppercase at
   1vw, under 4px on phones; keep the look at a readable size. */
.ppc-book-copy-inner .ppc-offer-note--home a {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* Workshop page, under the registration buttons. */
.ppc-workshop .ppc-offer-note--workshop {
  font-size: 1rem;
  line-height: 1.6;
  margin: 1.25rem 0 0;
  max-width: 34rem;
}

.ppc-workshop .ppc-offer-note--workshop a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* In the navy hero. pages.css styles the hero's paragraphs with
   .page-section-right__content > .wp-block-group > p:not(...), so this needs
   a stronger selector. */
.ppc-workshop .ppc-workshop__hero .page-section-right__inner-content > p.ppc-offer-note--workshop {
  color: var(--ws-on-dark-soft);
  font-size: 1rem;
  margin: 1.25rem 0 0;
}

.ppc-workshop__hero .ppc-offer-note--workshop a {
  color: var(--ws-on-dark);
}

/* In the cream details section, centred under its button. */
.ppc-workshop__details .ppc-offer-note--workshop {
  color: var(--ws-ink-soft);
  margin-inline: auto;
  text-align: center;
}

.ppc-workshop__details .ppc-offer-note--workshop a {
  color: var(--ws-button);
}

/* #endregion OFFER NOTES */

/* #region CLAIM HERO */

/* Editor-only notes (preview mode, missing coupon). */
.ppc-free-seat__notice {
  background: #fbf3dc;
  border-radius: 0.625rem;
  color: #4a3b12;
  font-family: var(--ws-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
}

/* The Stay Connected copy styles set paragraph margins with high specificity. */
.ppc-free-seat .ppc-email-copy-inner .ppc-free-seat__window {
  color: var(--ft-eyebrow-on-dark);
  font-family: var(--ws-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.5;
  margin: 1.5rem 0 0 !important;
  text-transform: uppercase;
}

.ppc-free-seat .ppc-email-copy-inner .ppc-free-seat__steps {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  list-style: none;
  margin: 2.25rem 0 0 !important;
  padding: 0;
}

.ppc-free-seat__step {
  align-items: flex-start;
  display: flex;
  gap: 1.125rem;
  margin: 0;
}

.ppc-free-seat__step-number {
  align-items: center;
  border: 1px solid rgba(216, 209, 199, 0.55);
  border-radius: 50%;
  color: var(--ft-eyebrow-on-dark);
  display: flex;
  flex: 0 0 2.5rem;
  font-family: var(--ws-serif);
  font-size: 1.25rem;
  height: 2.5rem;
  justify-content: center;
  line-height: 1;
}

.ppc-free-seat__step-body {
  flex: 1 1 0;
  min-width: 0;
}

.ppc-free-seat .ppc-free-seat__step-title {
  color: var(--ft-on-dark) !important;
  font-family: var(--ws-serif) !important;
  font-size: 1.375rem !important;
  font-weight: 400;
  line-height: 1.3;
  margin: 0.35rem 0 0.4rem;
}

.ppc-free-seat .ppc-free-seat__step-text {
  color: var(--ft-on-dark-soft);
  font-family: var(--ws-sans);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.ppc-free-seat .ppc-free-seat__book {
  margin-top: 1.125rem;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
}

/* #endregion CLAIM HERO */

/* #region CLAIM CARD */

/* Spacing inside the card comes from its flex gap (below). */
.ppc-free-seat .ppc-free-seat__card-text {
  color: var(--ws-ink-soft);
  font-family: var(--ws-sans);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

.ppc-free-seat__card .ppc-workshop__actions {
  justify-content: center;
  margin-top: 0.25rem;
}

/* The card holds three states and shows one. The Stay Connected card spaces
   its children with a flex gap; each state wrapper passes it on. */
.ppc-free-seat__card-state {
  display: flex;
  flex-direction: column;
  gap: inherit;
}

/* Dropdown: the placeholder option reads like the other placeholders until
   a store is picked. */
.ppc-free-seat__card .fluentform select.ff-el-form-control {
  -webkit-appearance: none;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231f2f46' stroke-width='1.5'/%3E%3C/svg%3E") right 1rem center / 0.75rem no-repeat !important;
  cursor: pointer;
  padding-right: 2.5rem !important;
}

.ppc-free-seat__card .fluentform select.ff-el-form-control:has(option[value=""]:checked) {
  color: color-mix(in srgb, var(--ppc-midnight) 48%, var(--color-warm) 52%) !important;
}

/* "I've pre-ordered" checkbox. */
.ppc-free-seat__card .fluentform .ff-el-tc,
.ppc-free-seat__card .fluentform .ff_t_c {
  color: var(--ws-ink-soft);
  font-family: var(--ws-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ppc-free-seat__card .fluentform .ff-el-form-check-label {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  gap: 0.6rem;
}

.ppc-free-seat__card .fluentform input[type="checkbox"] {
  accent-color: var(--ws-button);
  flex: 0 0 auto;
  height: 1.125rem;
  margin: 0.15rem 0 0;
  width: 1.125rem;
}

.ppc-free-seat__card .fluentform input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-accent, #35679a);
  outline-offset: 2px;
}

/* Form-wide messages (offer not open, too many tries). */
.ppc-free-seat__card .ff-errors-in-stack {
  color: #9b2c2c;
  font-family: var(--ws-sans);
  font-size: 0.9375rem;
  margin-top: 1rem;
  text-align: center;
}

/* After a successful claim, Fluent Forms hides the form (.ff_force_hide) and
   shows its confirmation message. The Stay Connected styles set the form to
   display: grid !important, which would keep its empty space. */
html body .wp-block-cover.ppc-email-section .ppc-free-seat__card .fluentform form.ff_force_hide {
  display: none !important;
}

/* The confirmation message. */
.ppc-free-seat__card .ff-message-success {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--ws-ink);
  font-family: var(--ws-sans);
  font-size: 1rem;
  line-height: 1.6;
  margin: 1rem 0 0;
  padding: 0;
  text-align: center;
}

.ppc-free-seat__card .ff-message-success p {
  margin: 0 0 1rem;
}

.ppc-free-seat__card .ff-message-success strong {
  color: var(--ws-navy);
}

/* "You're in, Name!" reads as the card's new heading. */
.ppc-free-seat__card .ff-message-success p:first-child strong {
  font-family: var(--ws-serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
}

/* The registration button from {ppc.free_seat_button}. It carries inline
   styles for email clients, which ignore stylesheets; on the page it matches
   the site buttons. */
.ppc-free-seat__card .ppc-free-seat__register {
  box-shadow: 0 10px 24px rgba(24, 39, 56, 0.18);
  font-family: var(--ws-sans);
  font-size: 1rem;
  letter-spacing: 0.16em !important;
  line-height: 1.35;
  padding: 1rem 2.25rem !important;
  transition: background 260ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.ppc-free-seat__card .ppc-free-seat__register:hover {
  background: var(--ws-button-hover) !important;
  transform: translateY(-1px);
}

.ppc-free-seat__card .ppc-free-seat__register:focus-visible {
  outline: 3px solid var(--color-accent, #35679a);
  outline-offset: 4px;
}

/* #endregion CLAIM CARD */

/* #region WORKSHOP SECTION */

/* The session list comes from the workshop hero, which is navy; here it sits
   on cream. */
.ppc-free-seat__workshop .ppc-workshop__sessions {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.ppc-free-seat__workshop .ppc-workshop__session-date {
  color: var(--ws-navy);
}

.ppc-free-seat__workshop .ppc-workshop__session-time {
  color: var(--ws-warm-text);
}

/* #endregion WORKSHOP SECTION */

/* #region RESPONSIVE */

@media (max-width: 576px) {
  .ppc-free-seat .ppc-email-copy-inner .ppc-free-seat__steps {
    gap: 1.5rem;
  }

  .ppc-free-seat__step {
    gap: 0.875rem;
  }

  .ppc-free-seat__step-number {
    flex-basis: 2.25rem;
    font-size: 1.125rem;
    height: 2.25rem;
  }

  .ppc-free-seat .ppc-free-seat__step-title {
    font-size: 1.25rem !important;
  }

  .ppc-free-seat__card .ppc-free-seat__register {
    letter-spacing: 0.12em !important;
    padding-inline: 1.5rem !important;
  }
}

/* #endregion RESPONSIVE */
