/* wg21.org Community → Events page (/community/events/).
   Builds on community.css (page shell, breadcrumb subnav, header, section labels,
   site-card grid) and reuses its tokens. Adds only the pieces unique to Events:
   the "how to attend" card label, the photo hero cards, the tentative grid, and
   the past-meetings table. */
@import "community.css";
@import "_data_table.css";

/* ── How to attend ── */
.events-subhead {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: var(--title);
  font-weight: 500;
  color: var(--ink);
}
/* The lead itself uses the shared .about-lead class for typography; this
   modifier only adds the events-specific spacing and link color. */
.events-subhead-lead {
  margin: 0 0 24px;
}
.events-subhead-lead a { color: var(--accent-blue); }

/* Static guidance cards reuse .site-card but aren't links — no hover affordance. */
.events-attend { cursor: default; }
.events-attend:hover { border-color: var(--line-soft); box-shadow: none; }
.events-attend .step-icon { margin-bottom: 14px; }
.events-attend-label {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-blue);
}
/* These cards' body copy is sans + near-black, unlike the mono .site-card-body
   default shared with the Community page. */
.events-attend .site-card-body {
  font-family: var(--font-sans);
  color: #1c2128;
}

/* ── Confirmed & upcoming: photo hero cards ── */
.events-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.events-hero-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}
.events-hero-photo {
  position: relative;
  min-height: 188px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
}
/* Scrim so the white title and badge stay legible over any photo. */
.events-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 30, 68, .15) 0%, rgba(3, 30, 68, .72) 100%);
}
.events-hero-badge,
.events-hero-title { position: relative; z-index: 1; }
.events-hero-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
}
.events-hero-badge.is-next { background: var(--green); }
.events-hero-badge.is-upcoming { background: var(--accent-blue); }
.events-hero-title {
  margin: 12px 0 0;
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
}
.events-hero-body { padding: 18px; }
.events-meta { margin: 0; }
.events-meta-row {
  display: flex;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.events-meta-row:first-child { padding-top: 0; }
.events-meta-row dt {
  flex: 0 0 76px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}
.events-meta-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--copy);
  color: var(--ink);
}
.events-hero-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-blue);
}

/* ── Tentative ── */
/* One bordered panel: a 3-column grid of clock-iconed rows with column dividers,
   capped by a tinted footnote bar. */
.events-tentative {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
}
.events-tentative-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.events-tentative-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
}
/* Vertical dividers between columns (not before the first of each row). */
.events-tentative-card:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line-soft); }
.events-tentative-card .step-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 9px;
  background: #eef1f4;
  border: 1px solid var(--line-soft);
  color: var(--ink-faint);
}
.events-tentative-card .step-icon svg { width: 20px; height: 20px; }
.events-tentative-text { display: flex; flex-direction: column; gap: 3px; line-height: 1.3; }
.events-tentative-city {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.events-tentative-when {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}
.events-tentative-note {
  margin: 0;
  border-top: 1px solid var(--line-soft);
  background: #f6f7f9;
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
}
.events-note {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ── Past meetings table ── */
/* Uses the shared .data-table component; only the column widths and per-cell
   content styling below are events-specific. Fixed layout keeps the side columns
   pinned and lets Meeting absorb the rest. */
.events-past-table { table-layout: fixed; }
.events-col-id { width: 120px; }
.events-col-date { width: 160px; }
.events-col-mins { width: 140px; }
.events-doc {
  font-family: var(--font-mono);
  font-size: var(--title);
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-soft);
  white-space: nowrap;
}
/* Stack the name + location with gap so spacing isn't carried on margins. */
.events-mtg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.events-mtg-name {
  font-family: var(--font-sans);
  font-size: var(--lead);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}
.events-mtg-loc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--copy);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
}
.events-loc-pin { width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-soft); }
.events-date { color: var(--ink-soft); white-space: nowrap; }
.events-mins { text-align: right; white-space: nowrap; }
.events-mins a { font-weight: 400; color: var(--accent-blue); }
.events-mins-none { color: var(--ink-faint); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .events-hero-grid { grid-template-columns: 1fr; }
  /* Two columns: divider before the right cell of each pair, top border on row 2+. */
  .events-tentative-grid { grid-template-columns: repeat(2, 1fr); }
  .events-tentative-card { border-left: 0; }
  .events-tentative-card:not(:nth-child(2n + 1)) { border-left: 1px solid var(--line-soft); }
  .events-tentative-card:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 560px) {
  /* Single column: stack with horizontal dividers only. */
  .events-tentative-grid { grid-template-columns: 1fr; }
  .events-tentative-card { border-left: 0; }
  .events-tentative-card:not(:first-child) { border-top: 1px solid var(--line-soft); }
  /* Drop the doc-id column on phones; meeting + date + minutes carry the row. */
  .data-table .events-doc { display: none; }
}
