/* F7: what the GM puts in front of the players: tests asked for (a card with
   the d20 rolling on screen) and dialogues (at the bottom, BG3 style); and the
   GM's blocks in the log window to ask for them. */

.table-prompts { position: absolute; inset: 0; pointer-events: none; z-index: 28; }

.check-card {
  pointer-events: auto; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(360px, 92vw);
  padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center;
  background: rgba(20, 18, 14, 0.97); border: 1px solid var(--accent); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.reaction-card { top: 22%; border-color: var(--danger); }
.reaction-buttons { justify-content: center; gap: 8px; }
.check-head { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.check-head strong { font-family: var(--font-title); font-size: 1.3rem; }
.check-dc { color: var(--accent); font-weight: 700; letter-spacing: 0.04em; }
.check-label { margin: 0; font-style: italic; }
.check-odds { font-size: 1.1rem; font-weight: 700; }
.btn-big { padding: 10px 26px; font-size: 1.05rem; }

.d20-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 120px; }
.d20 {
  width: 92px; height: 92px; display: grid; place-items: center; color: var(--accent-ink);
  background: var(--accent); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  font: 700 2.2rem var(--font-title);
}
.d20.is-rolling { animation: d20-spin 0.25s linear infinite; }
.d20.is-landed { animation: d20-land 0.3s ease-out; }
.d20.is-twenty { background: #f3d27a; box-shadow: 0 0 24px #f3d27a; }
.d20.is-one { background: var(--danger); color: var(--text); }
.d20-sum { font-variant-numeric: tabular-nums; }
.d20-verdict { font: 700 1.4rem var(--font-title); min-height: 1.6rem; }
.is-success { color: var(--ok); }
.is-failure { color: var(--danger); }
@keyframes d20-spin { to { transform: rotate(360deg); } }
@keyframes d20-land { from { transform: scale(1.35); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .d20.is-rolling, .d20.is-landed { animation: none; } }

.dialogue-box {
  pointer-events: auto; position: absolute; left: 50%; bottom: 190px; transform: translateX(-50%); width: min(560px, 94vw);
  padding: 16px 20px; display: flex; flex-direction: column; gap: 8px;
  background: rgba(16, 15, 12, 0.96); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.dialogue-speaker { color: var(--accent); font: 700 1.05rem var(--font-title); }
.dialogue-text { margin: 0; font-family: var(--font-title); font-size: 1.1rem; line-height: 1.5; white-space: pre-wrap; }
.dialogue-options { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dialogue-option {
  width: 100%; text-align: left; padding: 6px 10px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--text); font: inherit; cursor: pointer;
}
.dialogue-option:hover:not(:disabled), .dialogue-option:focus-visible { border-color: var(--accent); background: rgba(212, 162, 76, 0.1); }
.dialogue-option:disabled { opacity: 0.6; cursor: default; }
.dialogue-n { color: var(--muted); }
.dialogue-test { color: var(--accent); font-weight: 700; }
.dialogue-chosen { margin: 0; font-style: italic; }

.gm-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; margin-bottom: 10px; }
.gm-block > summary { cursor: pointer; font-weight: 700; }
.gm-block[open] > summary { margin-bottom: 8px; }
.gm-block .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.check-waiting { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.dialogue-rows { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.dialogue-row { display: flex; flex-direction: column; gap: 4px; }
.dialogue-row-dc { width: 70px; }
.dialogue-current { border-left: 3px solid var(--accent); padding-left: 8px; margin-bottom: 8px; }
.dialogue-current:empty { display: none; }
.roll-check .action-result { margin-top: 2px; }

/* F11e: the cemetery window and the box to bury a fallen character. */
.cemetery-counts { margin: 0; }
.cemetery-epitaph { margin: 2px 0; padding-left: 10px; border-left: 3px solid var(--accent); font-family: var(--font-title); font-style: italic; }
.cemetery-form { display: grid; gap: 6px; }
.cemetery-form label { display: grid; gap: 2px; font-size: 0.85rem; color: var(--muted); }
.grave-box { display: grid; gap: 6px; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; }
.grave-box p { margin: 0; }
