/* Le Cinq: the starting five of a team in a playoff game, to find. The board, the chips (.chip--wrong),
   the field and the buttons are shared (assets/styles.css, DESIGN.md). */

.notice {
  margin: 26px 0 18px;
  color: var(--ink-soft);
  font-size: 15px;
  text-align: center;
}

/* The moment in Anton, the result of the team to find in an ink frame (neither green nor red: those
   say right or wrong), as Le Box score. */
.sf-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 2px 0 6px;
}

.sf-context strong {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sf-result {
  padding: 3px 10px;
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 600;
}

/* The game: the visitor first, the home team second, the date. */
.sf-match {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* The team to find, in a dark hardwood band with a gold rule. */
.sf-target {
  display: grid;
  gap: 2px;
  justify-items: center;
  margin: 0;
  padding: 10px 14px 12px;
  text-align: center;
  background: var(--cover);
  color: var(--paper);
  border-bottom: 3px solid var(--gold);
}

.sf-target span {
  font-size: 13px;
  font-weight: 600;
  color: var(--sand);
}

.sf-target strong {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Half a court, the basket at the bottom: the point guard at the top, the shooting guard and the small
   forward on the wings, the power forward and the center on the blocks. The lines are drawn in --rule:
   the paint, and the three-point arc. */
.sf-court {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    '. b0 .'
    'b2 . b1'
    'b3 . b4';
  gap: 14px 12px;
  padding: 18px 12px 22px;
  border: 2px solid var(--ink);
  border-top: 0;
  background: color-mix(in srgb, var(--gold-soft) 45%, var(--card));
  overflow: hidden;
}

.sf-court::before,
.sf-court::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  pointer-events: none;
}

/* The paint, under the basket. */
.sf-court::before {
  width: 34%;
  height: 46%;
  transform: translateX(-50%);
  border: 2px solid var(--rule);
  border-bottom: 0;
}

/* The three-point arc. */
.sf-court::after {
  width: 88%;
  height: 150%;
  transform: translate(-50%, 50%);
  border: 2px solid var(--rule);
  border-radius: 50%;
}

.sf-box--0 { grid-area: b0; }
.sf-box--1 { grid-area: b1; }
.sf-box--2 { grid-area: b2; }
.sf-box--3 { grid-area: b3; }
.sf-box--4 { grid-area: b4; }

/* A box: its position at the top; still to find, dashed with « ? », or the hints given; found, the
   name in Anton and the line under it, with a gold rim; given at the end, a red rim. */
.sf-box {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 92px;
  padding: 22px 6px 8px;
  font: inherit;
  text-align: center;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, var(--card));
  border: 2px dashed var(--ink-soft);
}

button.sf-box {
  cursor: pointer;
}

@media (hover: hover) {
  button.sf-box:hover {
    border-color: var(--ink);
  }
}

button.sf-box:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.sf-pos {
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.sf-q {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-soft);
}

.sf-name,
.sf-clue {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.sf-clue {
  letter-spacing: 0.06em;
}

.sf-line {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.sf-box.is-hinted {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.sf-box.is-found,
.sf-box.is-given {
  background: var(--card);
  border: 2px solid var(--ink);
  border-top: 6px solid var(--gold);
  padding-top: 18px;
}

.sf-box.is-given {
  border-top-color: var(--red-strong);
}

.sf-box.is-found .sf-pos,
.sf-box.is-given .sf-pos {
  top: 1px;
}

/* The box picked for the next hint, and those that can take it while « Indice » waits for a box. */
.sf-box.is-picked,
.sf-box.is-choosing {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.sf-box.is-choosing {
  border-style: solid;
}

.sf-misses {
  margin-top: 16px;
}

.sf-misses-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.sf-misses ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.sf-misses .chip {
  padding: 3px 8px;
  font-size: 12px;
}

.sf-note:empty {
  display: none;
}

.sf-note {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--red-strong);
}

.sf-card .dock {
  margin-top: 16px;
}

.sf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

/* Phone: smaller boxes and titles, the court still in three columns. */
@media (max-width: 560px) {
  .sf-context strong {
    font-size: 16px;
  }

  .sf-target strong {
    font-size: 20px;
  }

  .sf-court {
    gap: 12px 8px;
    padding: 14px 8px 18px;
  }

  .sf-box {
    min-height: 84px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .sf-name,
  .sf-clue {
    font-size: 14px;
  }

  .sf-pos {
    font-size: 10px;
  }

  .sf-line {
    font-size: 11px;
  }
}
