.nevv-sdp-voting { width: 100%; }
.nevv-sdp-voting__header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; flex-wrap:wrap; }
.nevv-sdp-voting-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:1rem; width:100%; }
.nevv-sdp-voting-card { border:1px solid var(--nevv-sdp-border-card); border-radius:var(--nevv-sdp-radius-global); background:var(--nevv-sdp-bg-card); padding:1rem; min-height:210px; display:flex; flex-direction:column; gap:.65rem; }
.nevv-sdp-voting-card__head { display:flex; align-items:flex-start; justify-content:space-between; gap:.75rem; }
.nevv-sdp-voting-card__head h3 { margin:0; }
.nevv-sdp-voting-card__head span { font-size:.85rem; opacity:.75; white-space:nowrap; }
.nevv-sdp-voting-card__meta { margin:0; color:var(--nevv-sdp-text-description-color); }
.nevv-sdp-voting-detail, .nevv-sdp-voting-results, .nevv-sdp-voting-form-card { margin-bottom:1rem; }
.nevv-sdp-voting-options { border:1px solid var(--nevv-sdp-border-card); border-radius:var(--nevv-sdp-radius-global); padding:1rem; margin:1rem 0; }
.nevv-sdp-voting-options label { display:block; margin:.5rem 0; }
.nevv-sdp-inline-form { display:inline-flex; margin:0; }
@media (min-width: 900px) { .nevv-sdp-voting-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .nevv-sdp-voting-grid { grid-template-columns: 1fr; } }


.nevv-sdp-voting-detail__head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:.75rem; }
.nevv-sdp-voting-detail__head h2 { margin:0; }
.nevv-sdp-voting-detail__tools { display:flex; justify-content:flex-end; align-items:center; gap:.5rem; }
.nevv-sdp-voting-detail__tools .nevv-sdp-manual-trigger { white-space:nowrap; }
@media (max-width: 700px) { .nevv-sdp-voting-detail__tools { justify-content:flex-start; } }

.nevv-sdp-voting-filterbar { display:flex; align-items:center; justify-content:flex-start; gap:.5rem; flex-wrap:wrap; margin:0 0 1rem 0; }
.nevv-sdp-voting-filterbar--topbar { margin:0; justify-content:center; }
.nevv-sdp-voting-filterbar--topbar .nevv-sdp-button { white-space:nowrap; }
.nevv-sdp-voting-filterbar .nevv-sdp-button.is-active { background:var(--nevv-sdp-color-primary, #111827); color:#fff; }
@media (max-width: 700px) {
  .nevv-sdp-voting-filterbar--topbar { gap:.35rem; width:100%; }
  .nevv-sdp-voting-filterbar--topbar .nevv-sdp-button { padding:.55rem .7rem; font-size:.82rem; }
}

/* v0.1.16: lista glosowan jak lista projektow + frekwencja na kafelku. */
.nevv-sdp-voting-list-card {
  width: 100%;
  box-sizing: border-box;
}
.nevv-sdp-voting-list-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.nevv-sdp-voting-list-card__header h2 {
  margin: 0;
}
.nevv-sdp-voting-list-card__tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.nevv-sdp-voting-sort {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}
.nevv-sdp-voting-sort select {
  min-width: 220px;
}
.nevv-sdp-voting-card {
  min-height: 280px;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.nevv-sdp-voting-card__anchor {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-height: 280px;
  height: 100%;
  padding: 1rem;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
}
.nevv-sdp-voting-card__anchor:hover,
.nevv-sdp-voting-card__anchor:focus {
  color: inherit;
  text-decoration: none;
  outline: none;
}
.nevv-sdp-voting-card--clickable {
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.nevv-sdp-voting-card--clickable:hover,
.nevv-sdp-voting-card--clickable:focus-within {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  border-color: color-mix(in srgb, var(--nevv-sdp-btn-save-bg, #1f7a6d) 35%, var(--nevv-sdp-border-card, #d8dbe2));
}
.nevv-sdp-voting-card__body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 5.2rem;
}
.nevv-sdp-voting-card__bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.nevv-sdp-voting-card__progress {
  width: 100%;
  height: 10px;
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  overflow: hidden;
}
.nevv-sdp-voting-card__progress span {
  display: block;
  height: 100%;
  background: var(--nevv-sdp-btn-save-bg, #1f7a6d);
}
.nevv-sdp-voting-card__turnout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.nevv-sdp-voting-card__turnout-row p {
  margin: 0;
}
.nevv-sdp-voting-empty {
  border: 1px solid var(--nevv-sdp-border-card);
  border-radius: var(--nevv-sdp-radius-global);
  padding: 1rem;
  background: var(--nevv-sdp-bg-card);
}
@media (max-width: 700px) {
  .nevv-sdp-voting-list-card__header { align-items: stretch; }
  .nevv-sdp-voting-list-card__header h2 { width: 100%; }
  .nevv-sdp-voting-list-card__tools { width: 100%; align-items: stretch; }
  .nevv-sdp-voting-sort { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
  .nevv-sdp-voting-sort select { min-width: 0; width: 100%; }
  .nevv-sdp-voting-card,
  .nevv-sdp-voting-card__anchor { min-height: 245px; }
}

/* v0.1.17: dopasowanie kafelkow i sortowania do listy projektow. */
.nevv-sdp-voting-sort select.nevv-sdp-select {
  min-width: 220px;
  min-height: var(--nevv-sdp-control-height, 42px);
  height: var(--nevv-sdp-control-height, 42px);
  box-sizing: border-box;
  border: 1px solid var(--nevv-sdp-select-border, var(--nevv-sdp-input-border, #cbd5e1));
  border-radius: var(--nevv-sdp-radius-global, 12px);
  background: var(--nevv-sdp-select-bg, var(--nevv-sdp-input-bg, #ffffff));
  color: var(--nevv-sdp-select-color, var(--nevv-sdp-input-color, #111827));
  font-family: inherit;
  font-size: var(--nevv-sdp-select-font-size, var(--nevv-sdp-input-font-size, 15px));
  line-height: 1.35;
  padding: 0 12px;
}
.nevv-sdp-voting-card,
.nevv-sdp-voting-card__anchor {
  min-height: 240px;
}
.nevv-sdp-voting-card__body {
  min-height: 6.5rem;
}
.nevv-sdp-voting-card__summary {
  min-height: 3.6em;
  margin: 0;
  color: var(--nevv-sdp-text-description-color);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nevv-sdp-voting-card__result {
  margin: .25rem 0 0;
  font-size: var(--nevv-sdp-h3-size);
  color: var(--nevv-sdp-h3-color);
}
@media (max-width: 700px) {
  .nevv-sdp-voting-sort select.nevv-sdp-select {
    min-width: 0;
    width: 100%;
  }
  .nevv-sdp-voting-card,
  .nevv-sdp-voting-card__anchor {
    min-height: 240px;
  }
}

/* v0.1.18: kafelki glosowan rowne kafelkom projektow, bez meta jawne/tajne i trybu na kafelku. */
.nevv-sdp-voting-card,
.nevv-sdp-voting-card__anchor {
  height: 340px;
  min-height: 340px;
  max-height: 340px;
}
.nevv-sdp-voting-card__anchor {
  gap: .65rem;
}
.nevv-sdp-voting-card__head {
  flex: 0 0 auto;
}
.nevv-sdp-voting-card__head h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nevv-sdp-voting-card__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.nevv-sdp-voting-card__summary {
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nevv-sdp-voting-card__bottom {
  flex: 0 0 auto;
  margin-top: auto;
}
@media (max-width: 700px) {
  .nevv-sdp-voting-card,
  .nevv-sdp-voting-card__anchor {
    height: clamp(270px, 58svh, 330px);
    min-height: clamp(270px, 58svh, 330px);
    max-height: clamp(270px, 58svh, 330px);
  }
}

.nevv-sdp-voting-modal[hidden] { display: none !important; }
.nevv-sdp-voting-modal { position: fixed; inset: 0; z-index: 100000; }
.nevv-sdp-voting-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.nevv-sdp-voting-modal__box { position: relative; max-width: 620px; margin: 8vh auto; background: #fff; border: 1px solid rgba(148, 163, 184, .45); border-radius: 22px; padding: 28px; box-shadow: 0 24px 80px rgba(15, 23, 42, .25); }
.nevv-sdp-voting-modal__close { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 16px; border: 1px solid rgba(148, 163, 184, .45); background: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.nevv-sdp-voting-modal .nevv-sdp-voting-math { margin-top: 18px; }


/* v0.1.41: treść projektu poddana głosowaniu ma układ dokumentu: rozdziały i paragrafy wyśrodkowane. */
.nevv-sdp-voting-voted-version .nevv-sdp-project-structured-content {
  display: block;
}
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block {
  max-width: 100%;
}
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--chapter {
  display: flex;
  justify-content: center;
  text-align: center;
  margin: 2rem 0 1rem;
}
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--chapter:first-child {
  margin-top: .35rem;
}
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--chapter h4 {
  display: inline-block;
  margin: 0;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--section {
  display: flex;
  justify-content: center;
  text-align: center;
  margin: 1.35rem 0 .85rem;
  border: 0;
}
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--section h4 {
  display: inline-flex;
  margin: 0;
  justify-content: center;
  align-items: center;
  font-size: 1.12rem;
  line-height: 1.3;
  white-space: nowrap;
}
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--point,
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--subpoint,
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--subsubpoint {
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
  column-gap: .25em;
  align-items: baseline;
  margin-top: .42rem;
  margin-bottom: .42rem;
}
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--subpoint { margin-left: 1.4rem; }
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--subsubpoint { margin-left: 2.4rem; }
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--point strong,
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--subpoint strong,
.nevv-sdp-voting-voted-version .nevv-sdp-project-content-block--subsubpoint strong {
  white-space: nowrap;
}

/* v0.1.42: protokół wielowyboru jawnego pokazuje listę opcji i numery wskazań przy głosujących. */

/* v0.1.43: archiwum używa zamrożonej migawki uprawnionych, a nie aktualnego składu rady. */

/* v0.1.44: protokół PDF przenosi listę kandydatów/opcji pod treść uchwały, przed jawne decyzje. */

/* v0.1.51: w trakcie i przed startem glosowania pokazujemy zalaczniki oraz tresc projektu przed formularzem glosu. */
.nevv-sdp-voting-project-attachments,
.nevv-sdp-voting-voted-version {
  margin-bottom: 1rem;
}
.nevv-sdp-voting-project-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
}
.nevv-sdp-voting-project-file-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .9rem 1rem;
  border: 1px solid var(--nevv-sdp-border-card, #d8dbe2);
  border-radius: var(--nevv-sdp-radius-global, 14px);
  background: var(--nevv-sdp-bg-card, #fff);
  color: inherit;
  text-decoration: none;
}
.nevv-sdp-voting-project-file-card:hover,
.nevv-sdp-voting-project-file-card:focus {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--nevv-sdp-btn-save-bg, #1f7a6d) 35%, var(--nevv-sdp-border-card, #d8dbe2));
}
.nevv-sdp-voting-project-file-card span,
.nevv-sdp-voting-project-file-card em {
  color: var(--nevv-sdp-text-description-color, #64748b);
}
.nevv-sdp-voting-project-file-card em {
  font-style: normal;
  font-size: .9rem;
}

/* v0.1.53: formularz glosowania rady/komisji musi miec miejsce nad stala dolna belka. */
.nevv-sdp-voting {
  padding-bottom: 6rem;
}
.nevv-sdp-voting-form-card:last-child {
  margin-bottom: 6rem;
}
