/**
 * Eigentümerversammlung (WEG governance) workbench styles.
 *
 * Built on the authored design tokens in legacy-design.css, which redefine every
 * --legacy-* token for dark mode, so this sheet is theme-aware without a second
 * palette. The lowest text pair is --legacy-ink-soft on --legacy-paper at 5.18:1,
 * over the 4.5:1 WCAG AA floor. Every status is a coloured dot plus a text label —
 * colour never carries meaning alone — and each scrollable list sits in a
 * focusable region so keyboard users can reach what it scrolls (the exact defect
 * the recovered GovernanceMeetingPage carried on mobile).
 */

.vw-root {
  --vw-gap: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--vw-gap);
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  color: var(--legacy-ink, #232323);
  font-family: inherit;
}

/* ---------- header ---------- */

.vw-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--legacy-blue, #1300ff);
}

.vw-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.vw-lede {
  margin: 0;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--legacy-ink-soft, #6b6560);
}

.vw-announce {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--legacy-ink-soft, #6b6560);
}

/* ---------- picker ---------- */

.vw-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 16px;
  align-items: end;
  background: var(--legacy-surface, #fff);
  border: 1px solid var(--legacy-line, #e7e4e0);
  border-radius: var(--legacy-radius-md, 16px);
  padding: 16px 18px;
}

.vw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.vw-label {
  font-size: 13px;
  font-weight: 600;
}

.vw-select {
  min-height: 42px;
  padding: 8px 12px;
  font: inherit;
  color: var(--legacy-ink, #232323);
  background: var(--legacy-surface, #fff);
  border: 1px solid var(--legacy-line-strong, #d8d4cf);
  border-radius: var(--legacy-radius-sm, 10px);
}

.vw-select:focus-visible,
.vw-button:focus-visible,
.vw-scroll:focus-visible,
.vw-section__title:focus-visible {
  outline: 3px solid var(--legacy-blue, #1300ff);
  outline-offset: 2px;
}

/* ---------- section ---------- */

.vw-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 6px;
  border-top: 1px solid var(--legacy-line, #e7e4e0);
}

.vw-section__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vw-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.vw-section__lede {
  margin: 0;
  font-size: 13.5px;
  color: var(--legacy-ink-soft, #6b6560);
  line-height: 1.5;
}

.vw-subhead {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.vw-totals {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--legacy-ink-soft, #6b6560);
  line-height: 1.5;
}

.vw-empty-line {
  margin: 0;
  font-size: 14px;
  color: var(--legacy-ink-soft, #6b6560);
}

/* ---------- focusable scroll region + lists ---------- */

.vw-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
  border-radius: var(--legacy-radius-sm, 10px);
}

.vw-list,
.vw-agenda {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vw-agenda {
  counter-reset: none;
}

/* ---------- meeting ---------- */

.vw-meeting__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.vw-meeting__date {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.vw-meeting__ort {
  font-size: 14px;
  color: var(--legacy-ink-soft, #6b6560);
}

.vw-agenda__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--legacy-surface, #fff);
  border: 1px solid var(--legacy-line, #e7e4e0);
  border-radius: var(--legacy-radius-sm, 10px);
}

.vw-agenda__no {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--legacy-blue, #1300ff);
}

.vw-agenda__titel {
  font-size: 14.5px;
  font-weight: 600;
}

.vw-agenda__mehrheit,
.vw-agenda__summary {
  font-size: 13px;
  color: var(--legacy-ink-soft, #6b6560);
}

/* ---------- resolutions ---------- */

.vw-res,
.vw-duty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--legacy-surface, #fff);
  border: 1px solid var(--legacy-line, #e7e4e0);
  border-radius: var(--legacy-radius-md, 16px);
}

.vw-res__head,
.vw-duty__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.vw-res__nr {
  font-weight: 700;
  font-size: 13px;
  color: var(--legacy-ink-soft, #6b6560);
}

.vw-res__titel {
  font-size: 14.5px;
  font-weight: 600;
  flex: 1 1 auto;
}

.vw-res__meta,
.vw-duty__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--legacy-ink-soft, #6b6560);
}

.vw-res__umsetzung {
  font-weight: 600;
  color: var(--legacy-ink, #232323);
}

.vw-res__ergebnis {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.vw-duty__result {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- badge (dot + text, never colour alone) ---------- */

.vw-badge {
  --vw-tone: var(--legacy-ink-soft, #6b6560);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--legacy-ink, #232323);
  background: var(--legacy-surface, #fff);
  border: 1px solid var(--legacy-line-strong, #d8d4cf);
  border-radius: 999px;
}

.vw-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vw-tone);
}

.vw-badge--success { --vw-tone: var(--legacy-success, #087a55); }
.vw-badge--info { --vw-tone: var(--legacy-blue, #1300ff); }
.vw-badge--warning { --vw-tone: var(--legacy-warning, #855000); }
.vw-badge--danger { --vw-tone: #9b1c1c; }
.vw-badge--neutral { --vw-tone: var(--legacy-ink-soft, #6b6560); }

/* ---------- detail ---------- */

.vw-detail {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.vw-detail__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--legacy-line, #e7e4e0);
}

.vw-detail__row:last-child {
  border-bottom: 0;
}

.vw-detail__row dt {
  font-size: 13.5px;
  color: var(--legacy-ink-soft, #6b6560);
}

.vw-detail__row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

/* ---------- states ---------- */

.vw-state {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--legacy-line, #e7e4e0);
  border-radius: var(--legacy-radius-md, 16px);
  background: var(--legacy-surface, #fff);
  color: var(--legacy-ink-soft, #6b6560);
  line-height: 1.55;
}

.vw-state--empty {
  background: var(--legacy-paper, #f6f4f1);
}

.vw-state--error {
  border-color: #9b1c1c; /* 8.15:1 on white */
  background: #fdf5f5;
  color: var(--legacy-ink, #232323);
}

.vw-state__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--legacy-ink, #232323);
}

.vw-state__reason,
.vw-state__hint {
  margin: 0 0 8px;
  color: var(--legacy-ink-soft, #6b6560);
  line-height: 1.55;
}

.vw-state--error .vw-state__reason {
  color: #9b1c1c;
}

.vw-button {
  margin-top: 6px;
  min-height: 42px;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--legacy-blue, #1300ff);
  border: 1px solid transparent;
  border-radius: var(--legacy-radius-sm, 10px);
  cursor: pointer;
}

.vw-button:hover {
  background: var(--legacy-blue-hover, #0f00cc);
}

/* ---------- footnote ---------- */

.vw-page-footnote {
  border-top: 1px solid var(--legacy-line, #e7e4e0);
  padding-top: 14px;
}

.vw-page-footnote p {
  margin: 0;
  max-width: 72ch;
  font-size: 12.5px;
  color: var(--legacy-ink-soft, #6b6560);
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .vw-root * {
    transition: none !important;
    animation: none !important;
  }
}

/* ==================================================================== */
/* Cockpit alignment: this console speaks the casework workbench's      */
/* visual language. The scoped token remap recolours every rule above;  */
/* the structural overrides below add the card panels, pill states and  */
/* lifted buttons. Selectors and markup are unchanged.                  */
/* ==================================================================== */

.vw-root {
  /* Brand tokens only; inherits the native MeinZuhause colours. */
  --legacy-paper-soft: #faf9f7;
  --legacy-radius-sm: 11px;
  --legacy-radius-md: 14px;
  max-width: 1240px;
  padding: 34px 30px 60px;
}

.vw-title {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.vw-eyebrow {
  font-weight: 800;
  letter-spacing: 0.09em;
}

.vw-section {
  padding: 22px 24px;
  background: var(--legacy-surface);
  border: 1px solid var(--legacy-line);
  border-top: 1px solid var(--legacy-line);
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(21, 24, 43, 0.05);
}

.vw-filters {
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(21, 24, 43, 0.05);
}

.vw-select:focus-visible,
.vw-button:focus-visible,
.vw-scroll:focus-visible,
.vw-section__title:focus-visible {
  outline-color: rgba(59, 54, 242, 0.28);
}

.vw-badge {
  gap: 0;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  border: 0;
  color: #526079;
  background: #eef0f5;
}

.vw-badge::before {
  display: none;
}

.vw-badge--success { color: var(--legacy-success); background: #e2f5ed; }
.vw-badge--info { color: var(--legacy-blue, #1300ff); background: var(--legacy-blue-soft, #eceaff); }
.vw-badge--warning { color: var(--legacy-warning); background: #fdf1dc; }
.vw-badge--danger { color: #9b1c1c; background: #fbe4e4; }
.vw-badge--neutral { color: #526079; background: #eef0f5; }

.vw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-weight: 750;
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(59, 54, 242, 0.19);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.vw-button:hover {
  transform: translateY(-1px);
}

.vw-res:hover,
.vw-duty:hover,
.vw-agenda__item:hover {
  border-color: var(--legacy-line-strong, #d8d4cf);
  box-shadow: 0 6px 18px rgba(21, 24, 43, 0.07);
}
