/* Join MITC (src/pages/membership.njk). Uses the tokens and components in main.css. */

/* "On this page" links under the intro */
.page-toc {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.page-toc__title {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.page-toc__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-toc__list > li + li {
  margin-top: 0;
}

.page-toc__list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* Prices */
.rates-line {
  max-width: var(--measure);
}

.price-notes {
  max-width: var(--measure);
  padding-left: 1.25em;
}

.price-notes > li + li {
  margin-top: 0.5rem;
}

.compare-table td strong {
  font-weight: 700;
}

/* "Side by side" repeats the price cards line for line. On a phone the table would stack into blocks under the
   cards and double the length of the section, so it shows only where the columns fit. */
@media (max-width: 39.99em) {
  .compare {
    display: none;
  }
}

@media (min-width: 40em) {
  .compare-table tbody th {
    width: 30%;
  }
}

/* A week at MITC */
.week-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.week-list > li {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.week-list__name {
  display: block;
}

/* How joining works: every step is visible without JavaScript; membership.js shows one at a time */
.join-walk__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.join-walk__nav > li {
  display: flex;
  margin: 0;
}

.join-walk__nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: var(--tap);
  padding: 0.5rem 0.875rem;
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.join-walk__nav a:hover {
  background: var(--green-tint);
  color: var(--green-dark);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.join-walk__num {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--green);
  border-radius: 50%;
  color: var(--white);
}

.join-walk__nav a[aria-current="step"] {
  background: var(--green);
  color: var(--white);
}

.join-walk__nav a[aria-current="step"] .join-walk__num {
  background: var(--white);
  color: var(--green);
}

.join-walk__nav a[aria-current="step"]:hover {
  background: var(--green-dark);
  color: var(--white);
}

.join-step {
  margin: 0 0 1rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.join-step > :last-child {
  margin-bottom: 0;
}

.join-step__count {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-weight: 700;
}

.join-step h3:focus {
  outline: none;
}

.join-step h3:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.join-step__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
}

.join-step .callout {
  margin-bottom: 0;
}

/* Step 3: a sketch of the payment step (not CourtReserve's real screen) */
.app-sketch {
  max-width: 22rem;
  margin: 0;
}

.app-sketch__screen {
  padding: 1.25rem;
  background: var(--paper);
  border: 2px dashed var(--line-strong);
  border-radius: 1rem;
}

.app-sketch__screen > * {
  margin: 0 0 0.75rem;
}

.app-sketch__screen > :last-child {
  margin-bottom: 0;
}

.app-sketch__bar {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.app-sketch__item {
  font-weight: 700;
}

.app-sketch__lines {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
}

.app-sketch__lines dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.app-sketch__lines dt:last-of-type,
.app-sketch__lines dd:last-of-type {
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.app-sketch .btn {
  width: 100%;
}

.app-sketch figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
}

/* Application form */
.apply-layout {
  align-items: start;
}

/* Let the columns shrink below the width of the long club email address (320px screens) */
.apply-layout > * {
  min-width: 0;
}

.apply-aside a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

@media (min-width: 60em) {
  .apply-layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.apply-aside {
  padding: 1.5rem;
  background: var(--sand);
  border-radius: var(--radius);
}

.apply-aside h3 {
  font-size: 1.25rem;
}

.apply-aside h3 + * {
  margin-top: 0;
}

.apply-aside .steps > li {
  margin-bottom: 1rem;
}

.apply-form .field--error,
.apply-form .choices.field--error {
  padding-left: 1rem;
  border-left: 4px solid var(--error);
}

.apply-form .choices .field__hint {
  margin-top: -0.25rem;
}

.error-summary {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 3px solid var(--error);
  border-radius: var(--radius);
}

.error-summary:focus {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.error-summary__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
  font-size: 1.1em;
  font-weight: 700;
}

.error-summary__list {
  margin: 0;
  padding-left: 1.25em;
}

.error-summary__list a {
  color: var(--error);
  font-weight: 700;
}

.demo-sent {
  background: var(--yellow-pale);
  border-left-color: var(--ink);
}

.demo-sent:focus {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.demo-sent p {
  margin: 0 0 0.75rem;
}

/* Shares */
.shares-table caption {
  padding-inline: 1rem;
}

.shares-none {
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* FAQ */
.faq h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.faq h3:first-child {
  margin-top: 0;
}

.faq > :last-child {
  margin-bottom: 0;
}

.btn-group--center {
  justify-content: center;
}

/* Print every step of the walkthrough, even if the page script shows one at a time */
@media print {
  .join-walk [data-step][hidden] {
    display: block !important;
  }
  .page-toc,
  .join-step__nav {
    display: none !important;
  }
}
