/* Members' guide (src/pages/members.njk). Loaded only on that page.
   1 launch tiles · 2 coming later · 3 guide · 4 home-screen install steps and illustrations · 5 print (one page) */

.print-only {
  display: none;
}

/* ---------- 1. Launch tiles: Book a court across the full width, the rest beneath it ---------- */

.members-go {
  padding-top: 1.5rem;
}

.members-tiles > .members-tiles__book {
  grid-column: 1 / -1;
}

.members-tiles__book .tile {
  min-height: 7rem;
  justify-content: center;
}

.members-tiles__book .tile__title {
  font-size: 1.6em;
}

/* Coming later: six tiles in two rows of three on wide screens */
@media (min-width: 60em) {
  .members-later .tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 48em) {
  .members-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 75em) {
  .members-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Opened from the home-screen icon: it's already installed, so the install tile isn't needed. */
@media (display-mode: standalone) {
  .members-tiles > .members-tiles__install {
    display: none;
  }
  @media (min-width: 75em) {
    .members-tiles {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
}

/* Phones and tablets: "Rather not use the app? Use CourtReserve in your web browser", right under the Book a court
   tile, in the same grid cell. (Hidden on computers and without JavaScript.) */
.members-tiles > .members-tiles__book {
  flex-direction: column;
}

.members-browser {
  margin: 0.5rem 0 0;
}

.members-also {
  margin-bottom: 1.5rem;
}

/* ---------- 2. Coming later ---------- */

.tile__more {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding-block: 0.25rem;
  font-weight: 700;
}

/* ---------- 3. The guide ---------- */

.members-guide__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.5rem;
}

.members-guide__head h2 {
  margin-bottom: 0;
}

.members-guide__print {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0;
  color: var(--muted);
}

.members-guide__print .btn[hidden] {
  display: none;
}

.members-guide__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* the long club email address may wrap instead of widening the page */
  gap: 2rem 3rem;
}

.members-guide__item a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

@media (min-width: 60em) {
  .members-guide__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.members-guide__item {
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
}

.members-guide__item > :last-child,
.members-guide__item .steps > li:last-child {
  margin-bottom: 0;
}

.members-guide__item .steps {
  margin-bottom: 1rem;
}

.members-stores {
  margin: 1rem 0;
}

/* ---------- 4. Add to home screen ---------- */

.members-install__button {
  margin: 0 0 2rem;
}

.members-install__button .btn[hidden] {
  display: none;
}

.members-install__platforms {
  gap: 2.5rem 3rem;
  margin-top: 2rem;
}

.members-install__platform {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.install-steps {
  margin-bottom: 0;
}

.install-steps > li {
  margin-bottom: 2rem;
}

.install-steps > li:last-child {
  margin-bottom: 0;
}

.install-steps > li > p {
  margin-bottom: 0.75rem;
}

.members-install__note {
  margin: 2rem 0 1.5rem;
}

/* Illustrations: drawn at 240px wide (1 SVG unit = 1px), so their labels show at 16px. */
.ill {
  width: 15rem;
  max-width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius);
}

.ill text {
  fill: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
}

.ill .ill-bold {
  font-weight: 700;
}

.ill .ill-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
}

.ill .ill-link {
  fill: var(--green);
  font-weight: 700;
}

.ill-panel {
  fill: var(--white);
  stroke: var(--ink);
  stroke-width: 2;
}

.ill-wall {
  fill: var(--green-tint);
  stroke: var(--ink);
  stroke-width: 2;
}

.ill-dim {
  fill: var(--line);
  stroke: var(--ink);
  stroke-width: 2;
}

.ill-shadow {
  fill: var(--line);
}

.ill-bar {
  fill: var(--sand);
}

.ill-line {
  fill: var(--line);
}

.ill-app {
  fill: var(--white);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.ill-divider {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
}

.ill-stroke {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill-dot {
  fill: var(--ink);
}

/* The thing to tap: logo yellow behind dark ink, circled in club green */
.ill-hi {
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.ill-ring {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
}

.ill-on {
  fill: var(--green);
}

.ill-knob {
  fill: var(--white);
}

/* ---------- 5. Print: the plain guide and the install steps, on one page ---------- */

@media print {
  @page {
    size: auto;
    margin: 12mm 14mm;
  }

  body {
    font-size: 10pt;
    line-height: 1.3;
  }

  h1 {
    font-size: 20pt;
    margin-bottom: 0.2em;
  }

  h2 {
    font-size: 13pt;
    margin-bottom: 0.3em;
  }

  h3 {
    font-size: 11pt;
    margin-bottom: 0.25em;
  }

  p,
  ol,
  ul {
    margin-bottom: 0.4em;
  }

  a {
    color: #000;
  }

  .print-only {
    display: block;
  }

  /* Only the guide goes on paper: no tiles, demo notes, buttons, pictures or footer, and no pointers to the phones'
     web browser line (.members-guide__web), which isn't on paper */
  .members-go,
  .members-later,
  .members-guide__print,
  .members-guide__web,
  .members-install__button,
  .members-install .lead,
  .members-install .callout--demo,
  .members-install__note,
  .members-stores,
  .ill,
  .site-footer {
    display: none !important;
  }

  /* The club's name and address are printed under the title instead of the site header */
  .site-header {
    display: none !important;
  }

  .demo-ribbon__inner {
    padding-block: 0.1rem;
  }

  .demo-ribbon__links {
    display: none;
  }

  .page-intro {
    padding-top: 0.4rem;
    padding-bottom: 0.2rem;
  }

  .page-intro .lead {
    max-width: none;
    font-size: 11pt;
  }

  .page-intro .print-only {
    margin-bottom: 0;
  }

  .section {
    padding-block: 0.25rem;
  }

  .members-guide__head {
    margin-bottom: 0.2rem;
  }

  .members-guide__grid {
    display: block;
    column-count: 2;
    column-gap: 8mm;
  }

  .members-guide__item {
    padding-top: 0.3rem;
    margin-bottom: 0.3rem;
    border-top-width: 1px;
  }

  .members-guide__item h3 {
    break-after: avoid;
  }

  .members-guide__item p,
  .members-guide__item li {
    break-inside: avoid;
  }

  .members-guide__item .steps {
    margin-bottom: 0.4em;
  }

  .steps > li {
    min-height: 0;
    margin-bottom: 0.15em;
    padding-left: 1.6em;
  }

  .steps > li::before {
    top: 0.1em;
    width: 1.2em;
    height: 1.2em;
    background: none;
    border: 1px solid #000;
    color: #000;
    font-size: 8pt;
  }

  .members-install .callout {
    margin-bottom: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-width: 1px;
    border-left-width: 3px;
  }

  .members-install .callout p {
    margin-bottom: 0.1rem;
  }

  .members-install__platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8mm;
    margin-top: 0.2rem;
  }

  .members-install__platform {
    padding: 0;
    border: 0;
  }

  .install-steps > li,
  .install-steps > li > p {
    margin-bottom: 0.15em;
  }
}
