/* VoteMap Listenansicht */

/* ---------- Suche mit schwebendem Button ---------- */
.searchrow { display: flex; gap: 10px; margin: 18px 0 14px; }
.search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-ctl); padding: 0 6px 0 14px; height: 48px;
  transition: border-color .15s, box-shadow .15s;
  /* Button ragt vertikal ueber die Zeile hinaus */
  overflow: visible;
}
.search:focus-within { border-color: var(--un); box-shadow: 0 0 0 4px var(--un-softer); }
.search svg { color: var(--muted); flex: none; }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 16px; /* >=16px verhindert iOS-Auto-Zoom */
  color: var(--ink); min-width: 0; width: 0; /* Breite kommt allein aus flex-grow */
}
.search input::placeholder { color: var(--faint); }

/* Schwebender Search-Button: eigene Ebene, hoeher als die Suchzeile */
.search button {
  /* Normales Flex-Kind: kann die Suchleiste horizontal nie verlassen.
     Schwebt vertikal ueber die Zeile hinaus (negativer Margin + Schatten). */
  flex: none;
  height: 58px; margin: -5px -10px -5px 0; padding: 0 24px;
  border: 0; border-radius: 15px; cursor: pointer;
  background: linear-gradient(160deg, #E7F2FC, #C9E1F7);
  color: var(--un-deep); font-weight: 800; font-size: 15px;
  box-shadow: 0 2px 4px rgba(43,95,147,.10),
              0 10px 24px rgba(43,95,147,.20),
              inset 0 1px 0 rgba(255,255,255,.85);
  transition: transform .15s, box-shadow .15s, background .15s;
  z-index: 2;
}
.search button:hover {
  transform: translateY(-2px);
  background: linear-gradient(160deg, #DEEDFA, #BCD9F4);
  box-shadow: 0 3px 6px rgba(43,95,147,.12),
              0 14px 30px rgba(43,95,147,.26),
              inset 0 1px 0 rgba(255,255,255,.85);
}
.search button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(43,95,147,.10),
              0 4px 12px rgba(43,95,147,.18),
              inset 0 1px 0 rgba(255,255,255,.7);
}

.result-count { color: var(--muted); font-size: 13px; margin: 0 0 20px 2px; min-height: 20px; }

/* ---------- Resolution-Karte ---------- */
.card {
  display: block; text-decoration: none;
  background: var(--surface); border-radius: var(--r-card);
  padding: 20px 22px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow); border: 1px solid transparent;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  scroll-margin-top: 24px;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--un-soft); }
.card:hover .title { color: var(--un-deep); }

.card.highlight { border-color: var(--un); animation: highlight-fade 2.5s ease-out; }
@keyframes highlight-fade {
  0% { background: var(--un-softer); }
  100% { background: var(--surface); }
}

.title {
  font-family: var(--font-display); font-weight: 600; font-size: 16.5px;
  line-height: 1.45; margin: 0 0 8px; letter-spacing: -0.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .15s;
}
.meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px; margin-bottom: 14px;
}
.meta .dot { color: #B6C4D2; }

/* ---------- Signatur-Element: das Abstimmungsband ---------- */
.band {
  display: flex; gap: 3px; height: 12px; border-radius: var(--r-pill);
  overflow: hidden; margin-bottom: 9px;
}
.band > span { display: block; border-radius: 3px; min-width: 6px; }
.band .s-yes  { background: var(--yes-bg); }
.band .s-no   { background: var(--no-bg); }
.band .s-abst { background: var(--abst-bg); }
.band .s-nv   { background: var(--nv-bg); }

.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend b { color: var(--ink); font-weight: 700; }
.legend .k { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.legend .total { margin-left: auto; color: var(--faint); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pagination button {
  min-width: 38px; height: 38px; padding: 0 12px;
  border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--muted); font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.pagination button:hover { border-color: var(--un); color: var(--un-deep); }
.pagination button.cur { background: var(--un-soft); border-color: var(--un-soft); color: var(--un-deep); }
.pagination button:disabled { opacity: .4; cursor: default; border-color: var(--line); color: var(--muted); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .searchrow { margin: 14px 0 12px; }
  .search { height: 46px; padding: 0 5px 0 12px; }
  .search button {
    height: 52px; margin: -4px -9px -4px 0; padding: 0 16px;
    font-size: 14px; border-radius: 13px;
  }

  .result-count { margin-bottom: 16px; }

  .card { padding: 16px 16px 15px; border-radius: 14px; }
  .title { font-size: 15px; }
  .meta { font-size: 12.5px; gap: 6px; margin-bottom: 12px; }
  .band { height: 11px; }

  /* Legende als ruhiges 2-Spalten-Raster */
  .legend {
    display: grid; grid-template-columns: repeat(2, minmax(0, max-content));
    column-gap: 24px; row-gap: 5px; font-size: 12.5px;
  }
  .legend .k { white-space: nowrap; }
  .legend .total { grid-column: 1 / -1; margin: 3px 0 0; }

  .pagination button { min-width: 36px; height: 36px; }
}
