/* Community matches: the few styles site.css and theme.css lack. Colours,
   fonts and spacing come from their custom properties. */

.page-head__action { margin-left: auto; }
.chip--live { background: var(--pink); color: var(--bg-deep); }
.linklike { padding: 0; border: 0; background: none; color: var(--cyan); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; text-underline-offset: 3px; }
.match-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 700 12px/1.4 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.match-kicker svg { width: 16px; height: 16px; flex: none; color: var(--cyan); }

/* ---- Schedule: the introduction and, beside it, the line that says who is playing (docs/presence.md).
   Without the line the introduction sits exactly where .page-intro puts it. ---- */
.match-intro { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 40px; margin: -4px 0 32px; }
.match-intro .page-intro { margin: 0; }

/* ---- Schedule: updates for the visitor, the next 14 days, the agenda ---- */

.match-updates { margin-bottom: 14px; padding: 20px 24px; }
.match-updates__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; }
.match-updates__head h2 { margin-right: auto; font-size: 26px; }
.match-updates ul { list-style: none; }
.match-updates li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 9px 0 9px 18px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 14px; }
.match-updates li::before { content: ""; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; background: var(--line-hi); }
.match-updates li.is-unread { color: var(--text); }
.match-updates li.is-unread::before { background: var(--pink); }
.match-updates li.is-unread a { font-weight: 700; }
.match-updates li em { margin-right: 6px; color: var(--text-mute); font-size: 10.5px; font-style: normal; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.match-updates li.is-unread em { color: var(--pink); }
.match-updates li > span { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.match-updates li > time { color: var(--text-mute); font-size: 12.5px; white-space: nowrap; }
.match-discord { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 26px; color: var(--text-dim); font-size: 13.5px; }
.match-discord svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--text-mute); }
.match-discord strong { color: var(--text); }
.match-updates__more { margin: 10px 0 0; font-size: 13.5px; }

.day-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; margin-bottom: 34px; }
.day-strip__day { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 2px 8px; border: 1px solid var(--line); background: var(--bg-deep); color: var(--text-mute); text-align: center; line-height: 1.1; }
.day-strip__day small { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.day-strip__day b { font: 800 24px/1 var(--display); }
.day-strip__day em { min-height: 12px; font-size: 10.5px; font-style: normal; font-weight: 700; }
a.day-strip__day { border-color: var(--line-hi); background: var(--panel); box-shadow: inset 0 2px var(--accent); color: var(--text); }
a.day-strip__day em { color: var(--cyan); }
a.day-strip__day:hover { background: var(--raised); text-decoration: none; }

.agenda-day + .agenda-day { margin-top: 38px; }
.agenda-day__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; font-size: 32px; }
.agenda-day__title span { font: 700 13px/1.4 var(--font); color: var(--text-mute); }

.match-list { display: flex; flex-direction: column; gap: 10px; container-type: inline-size; }
.match-row { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr) auto minmax(176px, auto); grid-template-areas: "time main seats state"; align-items: center; gap: 12px 28px; padding: 20px 24px; border: 1px solid var(--line); background: var(--panel); transition: border-color .15s, background-color .15s; }
.match-row:hover, .match-row:focus-within { border-color: var(--line-hi); background: var(--raised); }
.match-row--in { box-shadow: inset 3px 0 #3ddc84; }
.match-row--off .match-row__time, .match-row--off .match-row__main, .match-row--off .match-row__seats { opacity: .55; }
.match-row__time { grid-area: time; display: flex; flex-direction: column; gap: 5px; }
.match-row__time > :first-child { font: 800 36px/1 var(--display); color: var(--text); }
.match-row__time > .is-unset { color: var(--text-mute); }
.match-row__zone { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); }
.match-row__main { grid-area: main; min-width: 0; }
.match-row__title { font-size: 26px; line-height: 1.12; overflow-wrap: anywhere; }
.match-row__title a { color: var(--text); }
.match-row__title a::after { content: ""; position: absolute; inset: 0; } /* the whole row opens the match */
.match-row__title a:hover { color: var(--cyan); text-decoration: none; }
.match-row__what { margin: 7px 0 2px; color: var(--text); font-size: 14.5px; }
.match-row__line { display: flex; align-items: flex-start; gap: 8px; margin: 5px 0 0; color: var(--text-dim); font-size: 13.5px; }
.match-row__line svg { width: 15px; height: 15px; flex: none; margin: 4px 3px 0 4px; color: var(--text-mute); }
.match-row__seats { grid-area: seats; width: 152px; }
.match-row__state { grid-area: state; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
@container (max-width: 760px) {
  .match-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "time state" "main main" "seats seats"; align-items: start; gap: 12px 14px; padding: 16px; }
  .match-row__time { flex-direction: row; align-items: baseline; gap: 8px; }
  .match-row__time > :first-child { font-size: 30px; }
  .match-row__seats { width: auto; }
}

.seats { display: inline-flex; align-items: center; gap: 10px; }
.seats__pips { display: inline-flex; gap: 3px; }
.seats__pips i { width: 7px; height: 16px; background: var(--line-hi); }
.seats__pips i.is-on { background: var(--accent); }
.seats__num { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.match-mark { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.match-mark svg { width: 14px; height: 14px; }
.match-mark--in { color: #3ddc84; }

/* ---- One match ---- */

.match-head { display: block; }
.match-head .chips { align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.page-head h1.match-title { font-size: clamp(38px, 4.6vw, 62px); line-height: 1.02; overflow-wrap: anywhere; }
.match-head__by { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--text-dim); font-size: 14px; }
.match-cancelled { margin-bottom: 28px; }

.match-when { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.match-when p { margin: 0; }
.match-when__date { font: 800 clamp(32px, 3.6vw, 46px)/1.05 var(--display); color: var(--text); }
.match-when__count { margin-top: 8px !important; font-size: 17px; font-weight: 700; color: var(--cyan); }
.match-when__zone { margin-top: 6px !important; font-size: 13px; color: var(--text-mute); }
.match-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; margin: 0; }
.match-dl > div { min-width: 0; }
.match-dl .full { grid-column: 1 / -1; }
.match-dl dt { margin-bottom: 5px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); }
.match-dl dd { margin: 0; color: var(--text); font-size: 15.5px; overflow-wrap: anywhere; }
.match-dl dd small { display: block; margin-top: 5px; color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }
.match-dl dd p { margin: 0 0 .7em; color: var(--text-dim); }
.match-dl dd p:last-child { margin-bottom: 0; }
.match-dl--one { grid-template-columns: minmax(0, 1fr); gap: 14px; }

.match-action { display: flex; flex-direction: column; gap: 14px; }
.match-action p { margin: 0; color: var(--text-dim); font-size: 14.5px; }
.match-action p.match-action__status { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 17px; font-weight: 700; }
.match-action__status svg { width: 18px; height: 18px; flex: none; color: var(--text-dim); }
.match-action__status--in svg { color: #3ddc84; }
.match-action .seg, .match-form .seg { padding: 0; gap: 8px; }
.match-action fieldset > legend, .match-form fieldset > legend { margin-bottom: 9px; padding: 0; }
.match-action__buttons, .match-share, .match-manage__row { display: flex; flex-wrap: wrap; gap: 10px; }
.match-action .btn { max-width: 100%; padding-block: 9px; white-space: normal; text-align: center; }
.match-action__buttons .btn { flex: 1 1 auto; }

.team__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.team--b .team__head { border-color: var(--pink); }
.team__head h3 { font-size: 26px; overflow-wrap: anywhere; }
.team__head span { color: var(--text-dim); font-size: 13px; font-weight: 700; white-space: nowrap; }
.seat-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.seat-list--cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.seat { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 46px; padding: 6px 10px; border: 1px solid var(--line); background: var(--panel); }
.seat__name { flex: 1; min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.seat__name small { margin-left: 8px; color: var(--cyan); font-size: 11.5px; font-weight: 700; }
.seat__wish { flex: none; color: var(--text-mute); font-size: 12.5px; }
.seat__n { flex: none; width: 20px; color: var(--text-mute); font-size: 13px; font-weight: 700; text-align: center; }
.seat__tools { display: flex; flex: none; gap: 6px; }
.seat--me { border-color: #3ddc84; }
.seat--free { border-style: dashed; background: none; color: var(--text-mute); font-size: 13px; padding-left: 14px; }
.match-roster .match-discord { margin: 16px 0 0; }
.match-waitlist { margin-top: 26px; }

.match-manage__row + *, .match-manage form + * { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.match-manage__danger { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; color: var(--text-mute); font-size: 13.5px; }

/* ---- The form ---- */

.match-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); gap: 40px; align-items: start; }
.match-edit__preview { position: sticky; top: calc(var(--header-h) + 20px); min-width: 0; }
.match-edit__preview > p { margin: 0 0 14px; color: var(--text-dim); font-size: 13.5px; }
.match-form__title { display: flex; align-items: baseline; gap: 12px; font-size: 32px; }
.match-form__title span { color: var(--cyan); }
.match-form .check strong { display: block; color: var(--text); }
.match-form__end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.field__err { margin: 0; color: var(--err); font-size: 13.5px; }
.field__err:empty { display: none; }
.match-form [aria-invalid="true"] { border-color: var(--err); }

/* ---- Administration: the Discord bot ---- */

.dc { max-width: 900px; }
.dc .match-form__title { font-size: 26px; }
.dc-status { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: var(--text); font-size: 17px; font-weight: 700; line-height: 1.45; }
.dc-status svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--text-mute); }
.dc-status--ok svg { color: #3ddc84; }
.dc-status--err svg { color: var(--err); }
.dc-status--small { font-size: 14.5px; }
.dc-status--small svg { width: 17px; height: 17px; }
.dc .field__err { margin: 0; color: var(--err); }
.dc-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; color: var(--text); }
.dc-saved svg { width: 16px; height: 16px; flex: none; color: #3ddc84; }
.dc-saved span { margin-right: 6px; }
.dc-roles { margin-top: 16px; }
.dc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dc .check strong { display: block; color: var(--text); }
.dc-forget { padding-top: 16px; border-top: 1px solid var(--line); }
.dc [aria-invalid="true"] { border-color: var(--err); }

@media (max-width: 1100px) {
  .match-edit { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .match-edit__preview { position: static; }
}
@media (max-width: 800px) {
  .page-head__action { margin-left: 0; }
  .day-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .day-strip__day small { font-size: 10px; letter-spacing: 0; }
  .day-strip__day em span { display: none; }
  .agenda-day__title { font-size: 28px; }
  .match-updates { padding: 18px; }
  .match-filters .spacer { display: none; }
  .match-filters .field--inline { flex: 1 1 100%; }
  .match-filters .field--inline label { width: 60px; }
  .match-filters .field--inline .select { flex: 1; }
}
@media (max-width: 640px) {
  .match-dl { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Administration: who is playing (docs/presence.md) ---- */
.po-numbers { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 0; }
.po-numbers div { display: flex; flex-direction: column-reverse; gap: 4px; }
.po-numbers dt { font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); }
.po-numbers dd { margin: 0; color: var(--text); font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.po-table td { white-space: nowrap; vertical-align: middle; }
.po-table small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-mute); }
.po-table .po-name { min-width: 170px; white-space: normal; overflow-wrap: anywhere; }
.po-table .po-hidden td { opacity: .6; }
