/* The website's own styles, on top of the game's (/static/app.css) and its skin (/skin/skin.css). */

/* The game's code, one box a character: read off the board, typed on a phone. */
.room-code { display: flex; gap: 6px; margin: 4px 0 8px; }
.room-code span { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5ch; padding: 2px 8px;
  font-size: calc(var(--font-header) * 2); line-height: 1.15; color: var(--text-accent); background: var(--screen-alt);
  border: 2px solid var(--text-accent); letter-spacing: 0; }
.code-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.code-form .setup-field { margin: 0; }
input.field.code-field { width: 8ch; font-size: var(--font-header); letter-spacing: 3px; text-transform: uppercase; text-align: center; }

/* Something that looks like a button but can't be pressed: a full server's Create, a bot that isn't this account's. */
.px-btn.locked { opacity: 0.45; cursor: not-allowed; display: inline-block; }
.px-btn.locked:hover, .px-btn.locked:active { filter: none; }
.apology { font-size: var(--font-header); }
.account-line a, .home a:not(.px-btn), .play-page a:not(.px-btn) { color: var(--text-accent); }

/* The lobby's paid computer players. */
.paid-head { margin-top: 10px; }
.paid-bot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0; }

/* A tournament's table. */
.tournament-table td, .tournament-table th { white-space: nowrap; }
.tournament-table .total { color: var(--text-accent); font-size: var(--font-header); }
.tournament-table tr.winner td { background: var(--screen-alt); }
.tournament-head { margin-top: 10px; text-transform: uppercase; letter-spacing: 1px; }
.table-wrap { overflow-x: auto; }

/* The home and join pages: a column of panels, their choices one under another. */
.home .stack .px-btn, .play-page .stack .px-btn { align-self: stretch; text-align: center; }

/* The account pages' forms. */
.account-form { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; max-width: 420px; }
.account-field { display: flex; flex-direction: column; gap: 2px; }
.account-field input.field { width: 100%; box-sizing: border-box; font: inherit; padding: 4px 6px; }
.tabs { margin-bottom: 6px; }

/* The unsent letters (/dev/outbox, only with --dev). */
.outbox article { border: 2px solid #3A3A3A; padding: 6px 10px; margin: 8px 0; background: var(--screen-alt); }
.outbox h1 { font-size: var(--font-header); color: var(--text-accent); }
.outbox h2 { font-size: var(--font-body); margin: 0; color: var(--text-accent); }
.outbox pre { white-space: pre-wrap; word-break: break-all; font: inherit; margin: 4px 0 0; }

/* The setup screen's own fields (a single player's name and alias). */
.setup-grid .setup-field input.field:not(.alias-field) { width: 12ch; }  /* (the alias: app.css alias-field) */

/* A device's LIVE tag (site.js liveTag): red and blinking while it's connected, grey and still while it isn't. */
.live-tag { display: inline-flex; align-items: center; gap: 5px; padding: 0 6px; background: #ED1C24; color: #fff;
  font-size: 0.75em; line-height: 1.6; letter-spacing: 1px; white-space: nowrap; vertical-align: middle; }
.live-dot { width: 7px; height: 7px; background: #fff; animation: live-blink 1.2s steps(1, end) infinite; }
@keyframes live-blink { 50% { opacity: 0.15; } }
.live-tag.off { background: #3A3A3A; color: #A0A0A0; }
.live-tag.off .live-dot { animation: none; background: none; box-shadow: inset 0 0 0 2px #A0A0A0; }

/* Setting a game up (/new): the questions' choices, each with what it means, and where the questions stand. */
.setup-choices { margin: 8px 0 12px; max-width: 620px; }
.setup-choice .px-btn { display: block; width: 100%; text-align: left; font-size: var(--font-header); margin: 0 0 2px; }
.setup-trail { margin: 0 0 6px; }
.setup-you { margin: 8px 0; max-width: 420px; }

/* What kind of game it is, on every device's lobby (setup.js gameTypePanel). */
.game-type { border-collapse: collapse; width: 100%; }
.game-type th { text-align: left; font-weight: normal; color: var(--text-accent); text-transform: uppercase; letter-spacing: 1px;
  padding: 1px 12px 1px 0; vertical-align: top; white-space: nowrap; }
.game-type td { padding: 1px 0; }

/* A seat that belongs to an account. */
.account-tag { font-size: 0.75em; line-height: 1.6; padding: 0 5px; border: 1px solid var(--text-accent); color: var(--text-accent);
  letter-spacing: 1px; vertical-align: middle; white-space: nowrap; }
.devices-line .live-tag { margin: 0 2px; }

/* An Elo: a computer player's, or a signed-in player's (site.js seatElo); a results screen's Elo part. */
.elo-tag { font-size: 0.75em; line-height: 1.6; padding: 0 5px; border: 1px solid #6FA8FF; color: #6FA8FF;
  letter-spacing: 1px; vertical-align: middle; white-space: nowrap; }
.elo-results { margin-top: 8px; padding-top: 6px; border-top: 1px solid #3A3A3A; }
.elo-results p { margin: 2px 0; }
/* The bots an account has beaten (account.js). */
.beaten-row { flex-wrap: wrap; gap: 6px; }
.beaten-badge { padding: 1px 8px; border: 1px solid #3A3A3A; color: var(--text-dim); white-space: nowrap; }
.beaten-badge.done { border-color: var(--text-accent); color: var(--text-accent); }
.play-page .qr img { width: min(70vw, 300px); }

/* A bot end point's page (bot.js): the address its program plays at, and what it asks there. */
.bot-address { font-size: var(--font-header); word-break: break-all; color: var(--text-accent); background: var(--screen-alt);
  border: 2px solid var(--text-accent); padding: 4px 8px; margin: 4px 0 8px; user-select: all; }
.bot-request { word-break: break-all; }

/* The player's page on a screen wider than it is tall (play-web.js landscapeMap): the map on the left, the
   rest in a column beside it that scrolls by itself, as the map device lays out its board. */
.play-land { position: fixed; inset: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 8px;
  box-sizing: border-box; }
.play-left, .play-right { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.play-left { scrollbar-width: none; }
.play-right { display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.play-right > * { flex: none; }
/* (Confirm and Cancel stay in sight at the bottom of the column, not across the map) */
.play-land .aim-bar { position: sticky; bottom: 0; left: auto; transform: none; width: auto; padding: 0; order: 99; }
body.play-landscape .tutorial-card { left: calc(var(--land-left, 50vw) + 8px); right: 8px; transform: none; width: auto; }
body.play-landscape.coached .play-right { padding-bottom: calc(var(--coach-h, 230px) + 30px); }
body.play-landscape.coached .play-land .aim-bar { bottom: calc(var(--coach-h, 220px) + 8px); }
