/* VoteMap Laenderansicht: Laenderprofil und Rangliste */

.panel {
  background: var(--surface); border-radius: var(--r-card);
  box-shadow: var(--shadow); padding: 22px 26px; margin: 16px 0;
}
.panel h3, .sec-head h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 0; }
.intro p { margin: 0; color: var(--muted); }
.intro .ghost { margin-top: 14px; }
.empty { color: var(--faint); margin: 10px 0 0; font-size: 14px; }
.note { margin: 14px 0 0; font-size: 12px; color: var(--faint); }
.scope { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-head .hint { font-size: 12.5px; color: var(--faint); }

/* ---------- Bedienleiste: Land/Thema, Zeitraum ---------- */
.controls { display: flex; flex-direction: column; gap: 14px; }
.picker { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.picker select, .question select {
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: var(--surface);
  padding: 9px 12px; min-width: 0; flex: 1; max-width: 420px; cursor: pointer;
}
.picker select:focus, .question select:focus { border-color: var(--un); outline: 0; box-shadow: 0 0 0 4px var(--un-softer); }
.question { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin: 0; line-height: 1.6; }
.question label { margin-right: 6px; }
.question select { font-family: var(--font-display); font-size: 17px; flex: none; color: var(--un-deep); }

.periodbar { display: flex; gap: 6px; flex-wrap: wrap; }
.periodbar button, .ghost, .customrange button, .listsearch button {
  font: 700 13px/1 var(--font-body); padding: 8px 13px; border-radius: var(--r-pill); cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted);
  transition: all .15s;
}
.periodbar button:hover, .ghost:hover, .customrange button:hover, .listsearch button:hover { border-color: var(--un); color: var(--un-deep); }
.periodbar button[aria-pressed="true"] { background: var(--un-soft); border-color: var(--un-soft); color: var(--un-deep); }
.ghost { margin-top: 12px; }
a.ghost { display: inline-block; text-decoration: none; }
.comparelink { margin-top: 16px; }
.customrange { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); font-weight: 700; }
.customrange[hidden] { display: none; }
.customrange input {
  width: 84px; font: inherit; font-size: 16px; color: var(--ink); margin-left: 6px;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 8px;
}

/* ---------- Laenderkopf und Stimmband ---------- */
.country-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.country-name { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin: 0; letter-spacing: -0.01em; }
.country-head .sub { color: var(--faint); font-size: 13px; font-weight: 600; }

.vband { display: flex; gap: 4px; height: 34px; margin-bottom: 12px; }
.vband button {
  border: 0; cursor: pointer; min-width: 22px; padding: 0; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
  transition: filter .15s, box-shadow .15s, transform .15s;
}
.vband button:hover { filter: brightness(.96); transform: translateY(-1px); }
.vband button.on { box-shadow: inset 0 0 0 2.5px currentColor; }
.vband button[data-narrow] .pct { display: none; }
.vband .pct { pointer-events: none; }
.s-yes  { background: var(--yes-bg);  color: var(--yes-ink); }
.s-no   { background: var(--no-bg);   color: var(--no-ink); }
.s-abst { background: var(--abst-bg); color: var(--abst-ink); }
.s-nv   { background: var(--nv-bg);   color: var(--nv-ink); }

.vlegend { display: flex; gap: 8px; flex-wrap: wrap; }
.vlegend button {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--line); background: var(--surface);
  border-radius: var(--r-pill); padding: 7px 14px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--muted); transition: all .15s;
}
.vlegend button b { color: var(--ink); }
.vlegend button .share { color: var(--faint); font-weight: 600; }
.vlegend button:hover:not(:disabled) { border-color: currentColor; }
.vlegend button:disabled { opacity: .45; cursor: default; }
.vlegend button.on.t-yes  { background: var(--yes-bg);  border-color: var(--yes-bg);  color: var(--yes-ink); }
.vlegend button.on.t-no   { background: var(--no-bg);   border-color: var(--no-bg);   color: var(--no-ink); }
.vlegend button.on.t-abst { background: var(--abst-bg); border-color: var(--abst-bg); color: var(--abst-ink); }
.vlegend button.on.t-nv   { background: var(--nv-bg);   border-color: var(--nv-bg);   color: var(--nv-ink); }
.vlegend button.on b, .vlegend button.on .share { color: inherit; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Themenliste ---------- */
.topics { display: flex; flex-direction: column; gap: 4px; }
.trow {
  display: grid; grid-template-columns: minmax(0, 1fr) 140px 72px; align-items: center; gap: 14px;
  border: 1.5px solid transparent; background: transparent; border-radius: 10px;
  padding: 8px 10px; cursor: pointer; text-align: left; color: var(--ink); transition: all .15s;
}
.trow:hover { background: var(--un-softer); }
.trow.on { background: var(--un-soft); border-color: var(--un-soft); }
.tname { font-weight: 700; font-size: 14px; }
.tnum { text-align: right; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.tnum small { color: var(--faint); font-weight: 600; font-size: 12px; }
.minibar { display: flex; gap: 2px; height: 9px; border-radius: var(--r-pill); overflow: hidden; background: #F0F3F7; }
.minibar i { display: block; min-width: 3px; }

/* ---------- Filter-Chips, Suche, Resolutionsliste ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chip {
  font: 700 12.5px/1 var(--font-body); padding: 6px 10px; border-radius: var(--r-pill); cursor: pointer;
  border: 0; background: var(--un-soft); color: var(--un-deep);
}
.chip:hover { background: #CBE2F6; }
.listsearch { display: flex; gap: 8px; margin-bottom: 12px; }
.listsearch input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 8px 12px;
}
.listsearch input:focus { border-color: var(--un); outline: 0; box-shadow: 0 0 0 4px var(--un-softer); }

.vlist { display: flex; flex-direction: column; }
.vrow {
  display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit;
  padding: 12px 8px; border-top: 1px solid var(--line); border-radius: 8px; transition: background .15s;
}
.vrow:first-child { border-top: 0; }
.vrow:hover { background: var(--un-softer); }
.vrow:hover .vtitle { color: var(--un-deep); }
.vote {
  flex: none; width: 98px; text-align: center; margin-top: 1px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .03em; padding: 4px 6px; border-radius: var(--r-pill);
}
.vote.t-yes  { background: var(--yes-bg);  color: var(--yes-ink); }
.vote.t-no   { background: var(--no-bg);   color: var(--no-ink); }
.vote.t-abst { background: var(--abst-bg); color: var(--abst-ink); }
.vote.t-nv   { background: var(--nv-bg);   color: var(--nv-ink); }
.vmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vtitle { font-weight: 700; font-size: 14.5px; line-height: 1.45; }
.vmeta { color: var(--muted); font-size: 12.5px; }

/* ---------- Rangliste ---------- */
.rank { list-style: none; margin: 0; padding: 0; }
.rank a {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(80px, 200px) 112px; align-items: center; gap: 12px;
  text-decoration: none; color: inherit; padding: 9px 8px; border-radius: 9px; transition: background .15s;
}
.rank a:hover { background: var(--un-softer); }
.rank a:hover .rname { color: var(--un-deep); }
.rank .pos { color: var(--faint); font-weight: 800; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.rank .rname { font-weight: 700; font-size: 14.5px; }
.rank .rbar { height: 10px; border-radius: var(--r-pill); background: #F0F3F7; overflow: hidden; }
.rank .rbar i { display: block; height: 100%; border-radius: var(--r-pill); }
.rank .rbar i.s-nv { background: #AEBCCB; }  /* --nv-bg verschwindet sonst auf der grauen Spur */
.rank .rval { text-align: right; font-variant-numeric: tabular-nums; }
.rank .rval b { font-weight: 800; font-size: 14px; }
.rank .rval small { display: block; color: var(--faint); font-size: 11.5px; font-weight: 600; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .panel { padding: 18px 16px; border-radius: 14px; margin: 12px 0; }
  .picker { flex-direction: column; align-items: stretch; gap: 6px; }
  .picker select { max-width: none; }
  .question { font-size: 17px; }
  .country-name { font-size: 20px; }
  .vband { height: 30px; gap: 3px; }
  .vlegend { gap: 6px; }
  .vlegend button { padding: 6px 11px; font-size: 12.5px; }
  .trow { grid-template-columns: minmax(0, 1fr) 64px; gap: 4px 10px; padding: 8px 6px; }
  .trow .minibar { grid-column: 1 / -1; grid-row: 2; }
  .vrow { flex-direction: column; gap: 6px; padding: 12px 4px; }
  .vote { width: auto; align-self: flex-start; padding: 3px 10px; }
  .rank a { grid-template-columns: 26px minmax(0, 1fr) 84px; gap: 4px 10px; padding: 8px 4px; }
  .rank .rbar { grid-column: 2 / -1; grid-row: 2; }
}
