/* TriviaRound — o ecrã de jogo (jogar.php), por cima de css/ecras.css.
   O js/play.js cria botões, listas e avisos sem as classes do protótipo
   (button, button.secondary, .note, .status…), por isso estas regras
   dão-lhes o mesmo aspeto. As cores vêm dos temas (css/app.css). */

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.chip { padding: 3px 12px; border: var(--chip-line); border-radius: 999px; color: var(--sub); font-size: 15px; }

.jogo { display: flex; flex-direction: column; gap: 14px; }

/* Botões sem classe do protótipo, como os que o play.js cria (só dentro da
   página: o aviso de segurança do safety.js fica fora de .app e tem o seu
   próprio estilo). */
.app button:not([class]), .app button.secondary, .app button.danger {
  min-height: 48px;
  padding: 0 18px;
  border: var(--bord);
  border-radius: 24px;
  background: var(--b3);
  color: var(--b3-t);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.app button.secondary { background: transparent; color: var(--fg); border: var(--outline); }
.app button:disabled { opacity: .55; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.button-row > button, .button-row > a { flex: 1 1 150px; }

.status { min-height: 1.4em; color: var(--sub); font-size: 17px; }
.status.error { color: var(--warn); }
.status.success { color: var(--ok); }
.note { padding: 12px 14px; border-left: 4px solid var(--accent); border-radius: 0 16px 16px 0; background: var(--bg); color: var(--fg); font-size: 16px; line-height: 1.45; }
.note .button-row { margin-top: 10px; }
.description { white-space: pre-line; line-height: 1.5; }
details summary { color: var(--accent); cursor: pointer; font-weight: 700; }
details[open] { display: flex; flex-direction: column; gap: 10px; }
a { color: var(--link); }

.campo textarea {
  min-height: 96px;
  padding: 12px 16px;
  border-radius: 18px;
  border: var(--field-line);
  background: var(--field);
  color: var(--fg);
  font: inherit;
}
.campo input.codigo { width: 100%; }

/* Mapa */
.mapa-jogo { overflow: hidden; border-radius: 28px; border: var(--card-line); background: var(--card); }
#map { height: min(46vh, 420px); min-height: 260px; background: var(--card); }
.leaflet-container { font: inherit; }

/* Setas: «Próximo tesouro» como o .destino do protótipo */
.arrow-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 24px; border: var(--card-line); background: var(--card); }
.arrow { display: grid; width: 60px; height: 60px; flex: 0 0 60px; place-items: center; border-radius: 50%; background: var(--bg); }
.arrow svg { width: 42px; height: 42px; transition: transform .3s; }
.arrow-row.unvisited .arrow svg path { fill: var(--gold); stroke: var(--gold); }
.arrow-row.visited .arrow svg path { fill: none; stroke: var(--sub); stroke-width: 3; }
.arrow-label { font-size: 15px; font-weight: 700; }
.arrow-row.visited .arrow-label { color: var(--sub); }
.arrow-name { font-weight: 700; overflow-wrap: anywhere; }
.arrow-distance { color: var(--sub); font-size: 15px; }
.destino.arrow-row { padding: 16px 20px; border-radius: 28px; border: var(--bord); background: var(--b4); color: var(--b4-t); }
.destino .arrow-label, .destino .arrow-name { color: inherit; }
.destino .arrow-distance { display: block; color: inherit; font-size: 32px; line-height: 1.1; }

/* Percurso sem mapa (trails.guidance no_map ou arrow): a seta ocupa o lugar do mapa. */
.jogo--sem-mapa .destino.arrow-row { flex-direction: column; text-align: center; padding: 28px 20px; }
.jogo--sem-mapa .destino .arrow { width: 180px; height: 180px; flex-basis: auto; }
.jogo--sem-mapa .destino .arrow svg { width: 130px; height: 130px; }
.jogo--sem-mapa .destino .arrow-distance { font-size: 48px; }

/* Saco, fotos, perguntas */
.sack-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sack-list li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: var(--card-line); border-radius: 18px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photo { margin: 0; overflow: hidden; border: var(--card-line); border-radius: 14px; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { padding: 4px 8px; color: var(--sub); font-size: 13px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.app .options button { min-height: 60px; padding: 10px 18px; border: var(--field-line); background: var(--card); color: var(--fg); text-align: left; font-weight: 700; }
.app .options button.right { border: var(--sel-line); background: var(--b3); color: var(--b3-t); }
.app .options button.wrong { border-color: var(--warn); background: var(--b2); color: var(--b2-t); }
.timer { height: 10px; overflow: hidden; border-radius: 999px; background: var(--track); border: var(--track-line); }
.timer div { height: 100%; background: var(--accent); transition: width .25s linear; }
.share-link { flex: 1 1 120px; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px; border: var(--outline); border-radius: 24px; color: var(--fg); text-decoration: none; font-weight: 700; }

.report-flag:not(.btn) { min-height: 40px; padding: 0 12px; border: var(--chip-line); background: transparent; color: var(--sub); font-size: 18px; font-weight: 400; }
.report-dialog { width: min(100% - 24px, 460px); padding: 22px; border: var(--card-line); border-radius: 28px; background: var(--card); color: var(--fg); }
.report-dialog::backdrop { background: var(--shade); }
.report-dialog form { display: flex; flex-direction: column; gap: 14px; }
.report-dialog fieldset { display: flex; flex-direction: column; gap: 8px; }
