/* Vote-Seite /vote/ (Stand 15.11.2026). Baut auf styles.css auf.
   Kompakt: Kopf mit Namensfeld, darunter je Liste eine Kachel mit Logo. Die ganze Kachel ist der Link.
   Die nächste offene Liste ist blau hervorgehoben, geöffnete bekommen einen grünen Haken. */

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Kurze Seite: Fußzeile trotzdem unten halten */
body:has(.vote-page) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.vote-page { flex: 1 0 auto; padding: 28px 0 56px; }

/* ---------- Kopf ---------- */

.vote-head { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
.vote-intro h1 { margin-bottom: 10px; }
.vote-intro .lead { margin: 0; max-width: 32em; font-size: var(--fs-text); }

.vote-feld label { display: block; margin-bottom: 8px; font-family: var(--display); font-weight: 700; font-size: var(--fs-md); line-height: 1.25; }
.vote-feld .optional { font-family: "Figtree", system-ui, sans-serif; font-weight: 600; font-size: var(--fs-sm); }
.vote-feld input {
  width: 100%;
  min-height: 54px;
  padding: 11px 16px;
  font: 600 20px "Figtree", system-ui, sans-serif;
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-md);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.vote-feld input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-line); }
.vote-feld input[aria-invalid="true"] { border-color: var(--red); }
.vote-feld input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #f7c9c4; }
.vote-name-fehler { margin-top: 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--red); }

/* ---------- Kacheln ---------- */

.vote-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.vote-list li { min-width: 0; }

.vote-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  min-height: 76px;
  padding: 10px 14px 10px 12px;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  touch-action: manipulation;
  transition: border-color 0.12s, background-color 0.12s;
}
.vote-card:hover { color: var(--text); border-color: var(--primary-line); background: #fafcff; }
.vote-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.vote-logo { flex: none; width: 52px; height: 52px; object-fit: contain; }
.vote-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.vote-name { font-family: var(--display); font-weight: 800; font-size: var(--fs-text); line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: break-word; max-width: 100%; }

/* Status unter dem Namen: "Voten" als Link, bei der nächsten Liste ein blauer Knopf, danach grün mit Uhrzeit */
.vote-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-sm);
  line-height: 1.2;
  color: var(--primary);
}
.vote-status::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13'%3E%3Cpath d='M4 0h9v9h-2.6V4.4L1.8 13 0 11.2 8.6 2.6H4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13'%3E%3Cpath d='M4 0h9v9h-2.6V4.4L1.8 13 0 11.2 8.6 2.6H4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.vote-card:hover .vote-status { color: var(--primary-dark); }

.vote-card.is-next { border-color: var(--primary); }
.vote-card.is-next .vote-status {
  margin-top: 2px;
  padding: 5px 12px 7px;
  color: #ffffff;
  background: var(--primary);
  border-radius: var(--r-sm);
  box-shadow: 0 3px 0 var(--primary-dark);
  transition: background-color 0.12s, transform 0.08s, box-shadow 0.08s;
}
.vote-card.is-next:hover .vote-status { color: #ffffff; background: var(--primary-hover); }
.vote-card.is-next:active .vote-status { transform: translateY(2px); box-shadow: 0 1px 0 var(--primary-dark); }

.vote-card.is-done .vote-status { color: var(--green-dark); }
.vote-card.is-done .vote-status::after { display: none; }
.vote-card.is-done .vote-status::before {
  content: "";
  flex: none;
  width: 12px;
  height: 7px;
  margin: 0 2px 4px 1px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}

.vote-ingame { margin-top: 20px; font-size: var(--fs-md); }

/* ---------- Größere Bildschirme ---------- */

@media (min-width: 720px) {
  .vote-page { padding: 44px 0 72px; }
  .vote-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .vote-logo { width: 56px; height: 56px; }
  .vote-card { min-height: 84px; padding: 12px 16px 12px 14px; }
}

@media (min-width: 1000px) {
  .vote-head { grid-template-columns: minmax(0, 1fr) 400px; align-items: end; gap: 40px; margin-bottom: 30px; }
  .vote-intro .lead { font-size: var(--fs-title); }
  .vote-list { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .vote-card, .vote-status, .vote-feld input { transition: none; }
}
