/* popups.css — Eingabe-Popup, Menü, Undo, Tie-Break-Auswahlfenster,
   Silent-Write-Popup. Alle sitzen absolut über der Schiefertafel. */

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
}

/* ---------- Eingabe-Popup ---------- */
.overlay--entry {
  background: rgba(0, 0, 0, 0.5);
}
.overlay--entry.is-a {
  align-items: flex-end;
}
.overlay--entry.is-b {
  align-items: flex-start;
}

.entry-panel {
  width: 100%;
  background: var(--leiste-grund);
  border-top: 1px solid var(--hairline-stark);
}
.overlay--entry.is-b .entry-panel {
  transform: rotate(180deg);
}

.schnelladd {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline-schwach);
}
.schnelladd button {
  background: var(--sekundaertaste);
  color: var(--kreide);
  padding: 20px 0;
  font-size: 24px;
  border: none;
  border-radius: 0;
  font-family: var(--font-cond);
  cursor: pointer;
}
.schnelladd button:active {
  background: #2f343a;
}

.anzeigezeile {
  display: flex;
  gap: 12px;
  padding: 12px 12px 0;
}
.puffer {
  flex: 1;
  height: 58px;
  background: var(--papier);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.puffer__plus {
  font: 600 24px/1 var(--font-cond);
  color: rgba(29, 31, 32, 0.45);
}
.puffer__val {
  flex: 1;
  font: 600 30px/1 var(--font-cond);
  color: var(--tinte);
}
.puffer__note {
  font: 500 13px/1 var(--font-cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(29, 31, 32, 0.45);
}

/* Trumpf-Combobox hell (im Popup) */
.trump-pad {
  position: relative;
  width: 190px;
  height: 58px;
  background: var(--papier);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  cursor: pointer;
  flex: none;
}
.trump-pad .trump-icon {
  width: 32px;
  height: 32px;
  font-size: 26px;
  -webkit-text-stroke: 1.6px var(--tinte);
  color: var(--tinte);
}
.trump-pad .faktor-badge {
  background: var(--akzent);
  color: var(--papier);
}
.trump-pad .caret {
  margin-left: auto;
  color: rgba(29, 31, 32, 0.5);
  font-size: 13px;
}
.trump-dropdown--pad {
  position: absolute;
  left: 0;
  bottom: 60px;
  top: auto;
  width: 190px;
  background: var(--papier);
  border: 1px solid rgba(29, 31, 32, 0.25);
  box-shadow: var(--shadow-dropdown-oben);
  z-index: 5;
}
.trump-dropdown--pad .trump-option {
  border-bottom: 1px solid rgba(29, 31, 32, 0.12);
  color: var(--tinte);
}
.trump-dropdown--pad .trump-option[aria-selected="true"] {
  background: var(--akzent);
  color: var(--papier);
}
.trump-dropdown--pad .trump-icon {
  color: currentColor;
  -webkit-text-stroke-color: currentColor;
}

/* Ziffernblock + Aktionsspalte */
.eingabe-grid {
  display: flex;
  gap: 12px;
  padding: 12px 12px 14px;
}
.ziffernblock {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 70px;
  gap: 1px;
  background: var(--hairline-schwach);
}
.ziffernblock button {
  background: var(--zifferntaste);
  color: var(--kreide);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  border: none;
  border-radius: 0;
  font-family: var(--font-cond);
  cursor: pointer;
}
.ziffernblock button:active {
  background: #4d545b;
}
.ziffernblock button.sekundaer {
  background: var(--sekundaertaste);
  font-size: 24px;
}
.aktionsspalte {
  width: 190px;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 1px;
  background: var(--hairline-schwach);
}
.aktionsspalte button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: none;
  border-radius: 0;
  font-family: var(--font-cond);
  cursor: pointer;
}
.btn-primary {
  background: var(--akzent);
  color: var(--papier);
}
.btn-primary:active {
  background: var(--akzent-dunkel);
}
.btn-secondary {
  background: var(--sekundaertaste);
  color: var(--kreide);
}
.btn-secondary:active {
  background: #2f343a;
}
.btn-cancel {
  background: var(--abbruch);
  color: rgba(233, 232, 220, 0.75);
  font-size: 20px;
}

/* Partieende-Zeile */
.partieende-zeile {
  display: flex;
  gap: 12px;
  padding: 0 12px 14px;
}
.partieende-zeile button {
  flex: 1;
  height: 52px;
  font-size: 18px;
  border: none;
  border-radius: 0;
  font-family: var(--font-cond);
  cursor: pointer;
}
.partieende-zeile button[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

/* ---------- Modale (Menü / Undo / Tie-Break / Silent-Write) ---------- */
.overlay--modal {
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
}
.modal {
  background: var(--leiste-grund);
  border: 1px solid var(--hairline-stark);
  box-shadow: var(--shadow-modal);
}
.modal--menu {
  width: 420px;
}
.modal--undo {
  width: 560px;
}
.modal--tie {
  width: 480px;
}
.modal--silent {
  width: 420px;
}
.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 20px 15px;
  border-bottom: 1px solid rgba(233, 232, 220, 0.2);
  font: 600 28px/1 var(--font-cond);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--kreide);
}
.modal__note {
  font: 500 12px/1 var(--font-cond);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(233, 232, 220, 0.5);
}
.modal__title-text {
  padding: 18px 20px 12px;
  font: 600 20px/1.3 var(--font-cond);
  color: var(--kreide);
  border-bottom: 1px solid rgba(233, 232, 220, 0.2);
}

.modal__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hairline-schwach);
}
.menu-item {
  padding: 20px;
  font-size: 22px;
  font-family: var(--font-cond);
  cursor: pointer;
  color: var(--kreide);
}
.menu-item--primary {
  background: var(--akzent);
  color: var(--papier);
}
.menu-item--secondary {
  background: var(--sekundaertaste);
}
.menu-item--cancel {
  background: var(--abbruch);
  color: rgba(233, 232, 220, 0.75);
}

/* Undo-Zeilen */
.undo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(233, 232, 220, 0.12);
  cursor: pointer;
}
.undo-row.is-selected {
  background: rgba(89, 128, 166, 0.2);
}
.undo-check {
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid rgba(233, 232, 220, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--kreide);
}
.undo-row.is-selected .undo-check {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--papier);
}
.undo-kind {
  width: 86px;
  flex: none;
  font: 600 15px/1 var(--font-cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(233, 232, 220, 0.55);
}
.undo-value {
  font: 600 24px/1 var(--font-cond);
  color: var(--kreide);
  white-space: nowrap;
}
.undo-icon {
  width: 32px;
  height: 32px;
  flex: none;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 24px/1 sans-serif;
  -webkit-text-stroke: 1.6px var(--kreide);
  color: var(--kreide);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.modal__foot {
  display: flex;
  gap: 1px;
  background: var(--hairline-schwach);
}
.modal__foot button {
  flex: 1;
  padding: 20px 0;
  text-align: center;
  font-size: 22px;
  border: none;
  border-radius: 0;
  font-family: var(--font-cond);
  cursor: pointer;
}
.modal__foot .btn-cancel {
  font-size: 20px;
}
.modal__foot .btn-primary.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Tie-Break-Zeilen (Radio-Auswahl) */
.tie-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(233, 232, 220, 0.12);
  cursor: pointer;
  font: 600 22px/1.1 var(--font-cond);
  color: var(--kreide);
}
.tie-row.is-selected {
  background: rgba(89, 128, 166, 0.2);
}
.tie-row__sub {
  font: 400 14px/1 var(--font-body);
  color: rgba(233, 232, 220, 0.55);
  margin-left: 8px;
}

/* Silent-Write-Zeilen (reine Information) */
.silent-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(233, 232, 220, 0.12);
}
.silent-row .undo-kind {
  color: rgba(233, 232, 220, 0.7);
}
