/* Barbu: its own marks and panels, on top of the card table's kit (card-table/ui/kit.css). */

/* the versions on trial (?try): one row per trial, each version a button that chooses it (and plays it, for a sound);
   narrow, at the bottom right, clear of the person's hand */
#tries {
  position: fixed; inset-inline-end: 12px; bottom: 74px; z-index: 40; max-width: min(300px, calc(100vw - 24px)); max-height: calc(100vh - 96px); overflow-y: auto; padding: 8px 10px;
  border-radius: 8px; font: 12px/1.5 var(--sans, system-ui); color: #f3ead6; background: rgba(12, 10, 8, 0.78);
}
#tries .row { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 3px 0; }
#tries .nm { min-width: 112px; margin-inline-end: 4px; opacity: 0.8; }
#tries kbd { display: inline-block; min-width: 16px; margin-inline-end: 4px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 3px; }
#tries button {
  padding: 1px 7px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.22); background: transparent;
  color: inherit; font: inherit; cursor: pointer;
}
#tries button:hover { background: rgba(255, 255, 255, 0.1); }
#tries .head { border: 0; padding: 0 2px 2px; font-weight: 700; opacity: 0.85; }
#tries .head:hover { background: transparent; opacity: 1; }
#tries .sls { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 12px; margin: 0 0 6px 22px; }
#tries .sl { display: flex; align-items: center; gap: 6px; min-width: 0; }
#tries .sl span { flex: none; width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.8; }
#tries .sl input { flex: 1; min-width: 60px; accent-color: #e8c56a; }
#tries .sl output { flex: none; width: 44px; text-align: end; font-variant-numeric: tabular-nums; }
#tries.shut .row { display: none; }
#tries button.on { background: #e8c56a; border-color: #e8c56a; color: #1a140a; font-weight: 700; }
/* on a phone, at the top: the bottom is the person's own (their name, their buttons, what they chose) */

/* a place taken in the domino, beside the name: gold for the first two, outlined for the next */
.trole[data-kind] {
  padding: 1px 8px; border-radius: var(--mark-r, 8px); font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  white-space: nowrap; color: #ffe9b0; background: rgba(14, 11, 8, 0.72); border: 1px solid rgba(224, 178, 74, 0.6);
}
.trole[data-kind="place1"], .trole[data-kind="place2"] { color: var(--good-ink, #1a1405); background: var(--good, linear-gradient(#ffe9a3, #e0b24a)); border-color: transparent; }

/* the score sheet's button, apart from the grid */
.sheet .row { display: flex; justify-content: center; margin-top: 14px; }

/* the winner's screen: no row stands out in gold (the first read as "you") */
.winner .srow.lead { background: none; }

/* the winner's screen: its buttons apart from the last row */
.winner .row { margin-top: 18px; }

/* Settings: its tabs on one line, the Rules tab included, in the longer languages too (as Président's); on a phone one
   low row across the sheet, scrolling sideways where the words do not fit, the page under it keeping the height */
.tpl-panel.options .tpl-tabs { flex-wrap: nowrap; }
.tpl-panel.options .tpl-tabs button { padding: 8px 12px; font-size: 17px; white-space: nowrap; }
@media (max-width: 480px) {
  .tpl-panel.options .tpl-head .tpl-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tpl-panel.options .tpl-head .tpl-tabs button { flex: 1 0 auto; padding: 7px 7px; font-size: 14px; }
}

/* on a phone held upright, the round's points under its name, smaller: the whole rule beside it is too long */
@container (max-width: 480px) {
  #roundinfo { white-space: normal; line-height: 1.2; }
  #roundinfo b, #roundinfo .short { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #roundinfo .short { font-size: 11.5px; }
}

/* a card that may not be played, touched: the line that says what to play pulses once, in gold */
@keyframes barbuNudge { 30% { transform: scale(1.07); color: var(--gold); } }
#prompt.nudge { animation: barbuNudge 0.42s ease-out; }
@media (prefers-reduced-motion: reduce) { #prompt.nudge { animation: none; } }

/* the start screen: the six numbers of players beside their label, as the difficulty below them */
.start .start-choices .seg button { min-width: 48px; padding: 0 14px; }
