/* Inviting players and checking them in (event-invite.js): the group link with its QR, personal
   links and the RSVP board, the check-in desk, the full-screen desk QR and the printed poster.
   Tokens from style.css (the website's Apple product-page look). */
a.button, a.chip { display: inline-block; text-decoration: none !important; }
a.chip { color: var(--ink); }
.badge.visibility { vertical-align: middle; }
.badge.visibility.link { background: var(--brand-light); color: var(--brand); }
.badge.visibility.public { background: #e3f6e8; color: var(--green); }
.badge.walk-in { background: #fff4e5; color: var(--warning); font-size: 13px; }
.callout.small { font-size: 15px; padding: 10px 14px; margin: 10px 0; }

/* The group link */
.invite-grid { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 26px; align-items: start; }
.qr-box { width: 196px; aspect-ratio: 1; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 8px; display: grid; place-items: center; }
.qr-box img, .qr-box svg { display: block; width: 100%; height: 100%; }
.invite-link { font: 600 21px/1.25 var(--font-display); letter-spacing: -0.01em; word-break: break-all; margin: 2px 0 6px; }
.invite-main .button-row { margin-top: 12px; }
/* The series link: always the series' next event */
.series-link { margin-top: 20px; padding-top: 6px; border-top: 1px solid var(--hairline); }
.invite-grid.compact { grid-template-columns: 128px minmax(0, 1fr); gap: 20px; }
.invite-grid.compact .qr-box { width: 128px; padding: 6px; }
.invite-grid.compact .invite-link { font-size: 17px; }

/* Personal links and the RSVP board */
.personal-links { margin-top: 20px; padding-top: 6px; border-top: 1px solid var(--hairline); }
.rsvp-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 10px; }
.rsvp-tile { font: inherit; color: var(--ink); text-align: left; display: grid; gap: 2px; padding: 12px 16px; background: var(--paper); border: 1px solid transparent; border-radius: var(--r-lg); cursor: pointer; }
.rsvp-tile strong { font: 700 28px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rsvp-tile span { font-size: 15px; color: var(--gray-600); }
.rsvp-tile.in strong { color: var(--green); }
.rsvp-tile.out strong { color: var(--warning); }
.rsvp-tile:hover { border-color: var(--gray-200); }
.rsvp-tile.active { background: #fff; border-color: var(--ink); }
.links-details > summary, .declined-requests > summary, .access-limits > summary { cursor: pointer; color: var(--link); font-size: 16px; margin: 8px 0; }
.links-details > summary { font-weight: 600; }
.link-rows { display: grid; gap: 1px; margin: 8px 0; background: var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.link-rows > p { background: var(--surface); margin: 0; padding: 12px 14px; }
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--surface); }
.link-name { display: grid; min-width: 0; }
.link-name strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-name small { font-size: 14px; }
.link-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.rsvp-chip { font-size: 14px; font-weight: 600; white-space: nowrap; border-radius: 980px; padding: 3px 10px; background: var(--paper); color: var(--gray-600); }
.rsvp-chip.in { background: #e3f6e8; color: var(--green); }
.rsvp-chip.out { background: #fff4e5; color: var(--warning); }

/* The check-in desk */
.checkin-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 4px; }
.checkin-head h2 { margin-bottom: 0; }
.checkin-counts { margin: 0; font-size: 16px; color: var(--gray-600); }
.checkin-counts strong { color: var(--ink); }
.helper-code .facts { margin: 6px 0 0; }
.checkin-search { display: block; margin: 16px 0 10px; }
.checkin-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 8px; }
.checkin-list > li.muted { padding: 6px 2px; }
.checkin-row { display: flex; align-items: center; gap: 8px; padding-right: 10px; background: var(--paper); border-radius: var(--r-md); }
.checkin-row.here { background: #e3f6e8; }
.checkin-row.left { opacity: .6; }
.checkin-toggle { font: inherit; color: inherit; text-align: left; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: none; border: 0; border-radius: var(--r-md); cursor: pointer; }
.checkin-toggle:hover { background: rgba(0, 0, 0, .03); }
.checkin-mark { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid var(--gray-300); border-radius: 50%; color: #fff; font-size: 15px; font-weight: 700; background: #fff; }
.checkin-row.here .checkin-mark { background: var(--green); border-color: var(--green); }
.checkin-name { display: grid; min-width: 0; }
.checkin-name strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkin-name small { font-size: 14px; }

/* Who can see and join (the event dialogs) */
.access-field { margin-top: 10px; padding-top: 2px; border-top: 1px solid var(--hairline); }
.access-field .check { align-items: flex-start; }
.access-field .check input { flex: none; margin-top: 4px; }

/* The desk QR: a laptop or TV at the check-in desk */
.desk-screen { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; overflow: auto; background: #fff; color: var(--ink); }
.desk-bar { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; transition: opacity .3s; }
.desk-screen:fullscreen .desk-bar { opacity: 0; }
.desk-screen:fullscreen .desk-bar:hover, .desk-screen:fullscreen .desk-bar:focus-within { opacity: 1; }
.desk-body { flex: 1; display: grid; grid-template-columns: auto minmax(280px, 1fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: 0 clamp(20px, 5vw, 80px) 40px; }
.desk-qr { width: min(80vh, 52vw); aspect-ratio: 1; }
.desk-qr svg { display: block; width: 100%; height: 100%; }
.desk-event { font: 600 clamp(22px, 2.6vw, 36px)/1.15 var(--font-display); letter-spacing: -0.02em; }
.desk-when { font-size: clamp(17px, 1.8vw, 24px); color: var(--gray-600); }
.desk-text h1 { font-size: clamp(42px, 6vw, 88px); margin: 18px 0 12px; }
.desk-hint { max-width: 30ch; font-size: clamp(18px, 2vw, 28px); line-height: 1.3; color: var(--gray-600); }
.desk-counts { margin-top: 26px; font: 700 clamp(22px, 2.6vw, 36px)/1.2 var(--font-display); }
.desk-countdown { color: var(--gray-600); font-variant-numeric: tabular-nums; }
.desk-status { color: var(--warning); }
.desk-brand { display: flex; align-items: center; gap: 8px; margin-top: 30px; font-weight: 600; }
.desk-brand img { border-radius: 7px; }
@media (max-width: 800px), (orientation: portrait) {
  .desk-body { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .desk-qr { width: min(86vw, 56vh); }
  .desk-hint { margin: 0 auto; }
  .desk-brand { justify-content: center; }
}

@media (max-width: 800px) {
  .invite-grid, .invite-grid.compact { grid-template-columns: 1fr; gap: 16px; }
  .qr-box { width: 176px; }
  .rsvp-board { gap: 6px; }
  .rsvp-tile { padding: 10px 12px; }
  .link-row { grid-template-columns: minmax(0, 1fr) auto; }
  .link-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* The poster: printed on its own, the rest of the page hidden */
.poster-sheet { display: none; }
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  body.printing-poster { background: #fff; }
  body.printing-poster > :not(.poster-sheet) { display: none !important; }
  body.printing-poster .poster-sheet { display: block; }
  .poster { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2mm; min-height: 262mm; text-align: center; color: #000; }
  .poster-brand { display: flex; align-items: center; gap: 3mm; margin: 0 0 8mm; font: 700 16pt var(--font-display); }
  .poster-brand img { width: 11mm; height: 11mm; border-radius: 2.6mm; }
  .poster-by { font-weight: 400; font-size: 11pt; color: #555; }
  .poster-title { max-width: 175mm; font-size: 40pt; line-height: 1.05; }
  .poster-when { margin-top: 4mm; font-size: 18pt; font-weight: 600; }
  .poster-place { font-size: 15pt; color: #333; }
  .poster .qr-box { width: 118mm; margin: 8mm 0 5mm; padding: 0; border: 0; border-radius: 0; }
  .poster-call { margin: 0; font: 700 30pt var(--font-display); letter-spacing: -0.02em; }
  .poster-hint { font-size: 13pt; color: #333; }
  .poster-link { margin-top: 6mm; font: 600 15pt ui-monospace, SFMono-Regular, Menlo, monospace; }
  .poster-code { font-size: 11pt; color: #555; }
  /* The venue sticker: a card with a cut line, for the club's desk or entrance */
  .poster.venue-sticker { justify-content: flex-start; min-height: 0; padding-top: 6mm; }
  .sticker-card { display: flex; flex-direction: column; align-items: center; gap: 2mm; width: 125mm; padding: 9mm 10mm 8mm; border: 0.4mm dashed #9a9a9a; border-radius: 6mm; }
  .sticker-card .poster-brand { margin: 0 0 3mm; }
  .sticker-venue { max-width: 105mm; font-size: 24pt; line-height: 1.1; }
  .sticker-card .qr-box { width: 92mm; margin: 4mm 0 3mm; }
  .sticker-call { max-width: 100mm; margin: 0; font: 700 17pt/1.2 var(--font-display); }
  .sticker-card .poster-link { margin-top: 3mm; font-size: 12pt; }
}
