/* ==========================================================================
   M-A-S-T-E-R.ai — plugin-rendered components
   Owned by m-a-s-t-e-r-core (shortcodes): [master_cohort_cards],
   [master_contact_form], [master_starter_kit_form]. Design tokens mirror the 3.0
   inline styles (Camp dates band + Contact/StarterKit cards).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Cohort date cards (Camp "Upcoming dates" idiom — dark band context)
   -------------------------------------------------------------------------- */

.master-cohort-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.master-cohort-card {
  background: var(--master-color-soot);
  border-radius: 16px;
  border-top: 3px solid var(--master-color-verdigris);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.master-cohort-card--intro { border-top-color: var(--master-color-verdigris); }
.master-cohort-card--intensive { border-top-color: var(--master-color-index); }
.master-cohort-card--masterclass { border-top-color: var(--master-color-index); }
.master-cohort-card--mastermind { border-top-color: var(--master-color-index); }

.master-cohort-card__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--master-color-verdigris);
}

.master-cohort-card--intro .master-cohort-card__tag { color: var(--master-color-verdigris); }
.master-cohort-card--intensive .master-cohort-card__tag { color: var(--master-color-verdigris); }
.master-cohort-card--masterclass .master-cohort-card__tag { color: var(--master-color-verdigris); }
.master-cohort-card--mastermind .master-cohort-card__tag { color: var(--master-color-verdigris); }

.master-cohort-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.master-cohort-card__label {
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--master-color-chalk);
  margin: 0;
}

.master-cohort-card__seats {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.master-cohort-card__seats--open { color: #0b7d58; background: var(--master-color-index-wash); }
.master-cohort-card__seats--low { color: #9a6200; background: var(--master-color-annotation); }
.master-cohort-card__seats--wait { color: #d7374f; background: var(--master-color-minium-wash); }

.master-cohort-card__long {
  font-size: 13px;
  color: var(--master-color-pumice);
  line-height: 1.5;
}

.master-cohort-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.master-cohort-card__price {
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--master-color-chalk);
}

.master-cohort-card__cta {
  display: inline-block;
  background: var(--master-color-chalk);
  color: var(--master-color-plumb);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   A deck holding more than one class, split by class.
   Six cards in one auto-fit grid meant the fourth card on row one belonged to
   a different program than the three beside it — the reader had to check every
   eyebrow to know what they were looking at. Each class now gets its own
   heading and its own grid; the per-card eyebrow drops away because the
   heading is doing that job.
   -------------------------------------------------------------------------- */

.master-cohort-cards--split {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 3.4vw, 38px);
}

.master-cohort-group__title {
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: clamp(15px, 1.7vw, 17px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
  padding: 0 0 10px;
  color: var(--master-color-chalk);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

/* The rule under the heading carries the class's own colour, so the group and
   its cards' top borders read as one object. */
.master-cohort-group--intro .master-cohort-group__title { border-bottom-color: rgba(51, 181, 229, 0.5); }
.master-cohort-group--intensive .master-cohort-group__title { border-bottom-color: rgba(255, 176, 0, 0.5); }
.master-cohort-group--masterclass .master-cohort-group__title { border-bottom-color: rgba(255, 90, 95, 0.5); }
.master-cohort-group--mastermind .master-cohort-group__title { border-bottom-color: rgba(36, 71, 198, 0.6); }

.master-cohort-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

/* On a light section the heading is ink on cream, not white on navy. */
.master-cohort-cards--light .master-cohort-group__title {
  color: var(--master-color-plumb);
  border-bottom-color: var(--master-color-caliper);
}

.master-cohort-cards--empty {
  grid-template-columns: 1fr;
}

.master-cohort-cards__none {
  margin: 0;
  padding: 20px;
  border-radius: 16px;
  background: var(--master-color-soot);
  color: var(--master-color-pumice);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Cohort date cards — LIGHT variant ([master_cohort_cards variant="light"])
   The MasterClass "Upcoming cohorts" treatment: a cream card on a white
   section, no program eyebrow, two information lines (the long date line,
   then "{time} · {price}"), and a coral Enroll button.
   -------------------------------------------------------------------------- */

.master-cohort-card--light {
  background: var(--master-color-foolscap);
  border: 1px solid var(--master-color-scribe);
  border-top: 1px solid var(--master-color-scribe);
  border-radius: 16px;
  padding: 20px;
  gap: 10px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.master-cohort-card--light .master-cohort-card__label {
  font-size: 19px;
  color: var(--master-color-plumb);
}

.master-cohort-card--light .master-cohort-card__long {
  font-size: 13.5px;
  color: var(--master-color-graphite);
  line-height: 1.5;
}

.master-cohort-card--light .master-cohort-card__meta {
  font-size: 13px;
  color: var(--master-color-graphite);
}

.master-cohort-card--light .master-cohort-card__foot {
  margin-top: 4px;
}

.master-cohort-card--light .master-cohort-card__cta {
  background: var(--master-color-index);
  color: var(--master-color-chalk);
  padding: 11px 20px;
  font-size: 14px;
}

.master-cohort-cards--light .master-cohort-cards__none {
  background: var(--master-color-foolscap);
  border: 1px solid var(--master-color-scribe);
  color: var(--master-color-graphite);
}

/* --------------------------------------------------------------------------
   Forms (Contact + Starter Kit cards)
   -------------------------------------------------------------------------- */

.master-form-card {
  background: var(--master-color-chalk);
  border: 1px solid var(--master-color-scribe);
  border-radius: 16px;
  padding: clamp(22px, 3.5vw, 32px);
  display: flex;
  flex-direction: column;
}

.master-form-card--kit {
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.06);
}

.master-form-card form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
}

.master-form-card--kit form {
  gap: 16px;
}

.master-form-card form[hidden],
.master-form__success[hidden],
.master-form__error[hidden] {
  display: none;
}

.master-form__label,
.master-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--master-color-plumb);
}

.master-form__label--kit {
  font-size: 15px;
}

.master-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.master-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.master-in {
  padding: 13px 15px;
  border: 1.5px solid var(--master-color-scribe);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--master-color-plumb);
  background: var(--master-color-chalk);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.master-in:focus {
  border-color: var(--master-color-index);
}

textarea.master-in {
  resize: vertical;
  line-height: 1.5;
}

.master-in--lg {
  padding: 14px 16px;
  font-size: 16px;
}

/* Topic pills — radio inputs styled as the Contact page's pressed pills. */

.master-form__topics {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-inline-size: 0;
}

.master-form__topics legend {
  padding: 0;
}

.master-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.master-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.master-pill span {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--master-color-scribe);
  background: var(--master-color-chalk);
  color: var(--master-color-plumb);
  cursor: pointer;
  min-height: 44px;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.master-pill input:checked + span {
  background: var(--master-color-pitch);
  border-color: var(--master-color-gesso);
  color: var(--master-color-gesso);
}

.master-pill input:focus-visible + span {
  outline: 2px solid var(--master-color-index);
  outline-offset: 2px;
}

/* Buttons */

.master-btn {
  border: none;
  border-radius: 8px;
  padding: 15px 26px;
  font-family: "Inter", Arial, sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.master-btn--cobalt {
  background: var(--master-color-index);
  color: var(--master-color-chalk);
  align-self: flex-start;
}

.master-btn--green {
  background: var(--master-color-index);
  color: var(--master-color-chalk);
  padding: 15px 24px;
}

/* Error + success states */

.master-form__error {
  font-size: 13.5px;
  color: var(--master-color-minium);
  font-weight: 500;
}

.master-form__success {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.master-form__check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--master-color-index-wash);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--master-color-index);
  font-weight: 700;
}

.master-form__success-title {
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--master-color-plumb);
}

.master-form__success-sub {
  font-size: 15px;
  color: var(--master-color-graphite);
  line-height: 1.5;
}

.master-form__fine {
  font-size: 12.5px;
  color: var(--master-color-graphite);
  line-height: 1.5;
}

/* Honeypot — visually gone, still in the accessibility-hidden DOM for bots. */

.master-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
}
