/* ==========================================================================
   ReDiTu komponensek. Mobile first; minden érték token.
   ========================================================================== */

.icon { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 1rem; height: 1rem; }

/* ---------- Navigáció: mindig látható, kontrasztos sáv ----------
   Szerkezet: header.nav > .container.nav__bar > (a.nav__brand, nav.nav__panel > ul.nav__menu, .nav__actions)
   JS nélkül mobilon a menü vízszintesen görgethető sor a sáv alatt — semmi nem vész el. */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--nav-bg); color: var(--text);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
}
.nav__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: var(--nav-h) auto; align-items: center; column-gap: var(--sp-16); }
.nav__brand { justify-self: start; display: inline-flex; align-items: center; gap: var(--sp-8); min-height: var(--control-md); color: var(--heading); font-size: var(--fs-24); font-weight: var(--fw-bold); letter-spacing: -0.02em; text-decoration: none; line-height: 1; }
.nav__brand img { height: var(--control-sm); width: auto; }
@media (min-width: 1024px) { .nav__brand img { height: var(--control-md); } }
.nav__actions { display: flex; align-items: center; gap: var(--sp-8); }
.nav__panel { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
.nav__menu { position: relative; list-style: none; margin: 0; padding: 0 0 var(--sp-8); display: flex; gap: var(--sp-4); overflow-x: auto; }
.nav__menu li { margin: 0; max-width: none; }
.nav__link {
  position: relative; z-index: 1;
  display: flex; align-items: center; min-height: var(--control-md); padding-inline: var(--sp-16);
  border-radius: var(--radius-pill); color: var(--text); font-weight: var(--fw-semibold);
  line-height: var(--lh-ui); text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.nav__link:hover { background: var(--bg-tint); }
.nav__link[aria-current] { background: var(--primary); color: var(--on-primary); }
.nav { transition: box-shadow var(--dur-3) var(--ease-out); }
.nav.is-scrolled { box-shadow: var(--shadow-1); }
.nav__toggle { display: none; }
html.js .nav__toggle { display: inline-flex; }

@media (max-width: 1023.98px) {
  html.js .nav__panel {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    padding: var(--sp-8) var(--gutter) var(--sp-16);
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2);
  }
  html.js .nav.is-open .nav__panel { display: block; }
  html.js .nav__menu { flex-direction: column; padding: 0; overflow: visible; }
}
@media (min-width: 1024px) {
  .nav__bar { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: var(--nav-h); }
  html.js .nav__toggle { display: none; }
  .nav__panel { grid-column: 2; grid-row: 1; justify-self: center; max-width: 100%; }
  .nav__menu {
    gap: 0; padding: var(--sp-4);
    border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-subtle);
  }
  .nav__link { min-height: var(--control-sm); }
}

/* ---------- Gombok ---------- */
.btn {
  --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-8);
  min-height: var(--control-md); padding: 0 var(--sp-24);
  border: 2px solid var(--btn-bd); border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--fs-16); font-weight: var(--fw-semibold); line-height: var(--lh-ui);
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out),
              transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.btn:hover { --btn-bg: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.btn > .icon { transition: transform var(--dur-2) var(--ease-out); }
.btn:not(.btn--icon):hover > .icon:last-child { transform: translateX(var(--sp-4)); }
.btn:active { transform: translateY(0) scale(0.98); box-shadow: none; }
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--on-accent); }
.btn--accent:hover { --btn-bg: var(--accent-hover); }
.btn--secondary { --btn-bg: transparent; --btn-fg: var(--primary); --btn-bd: var(--primary); }
.btn--secondary:hover { --btn-bg: var(--bg-tint); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); }
.btn--ghost:hover { --btn-bg: var(--bg-tint); box-shadow: none; transform: none; }
.btn--sm { min-height: var(--control-sm); padding-inline: var(--sp-16); }
.btn--lg { min-height: var(--control-lg); padding-inline: var(--sp-32); font-size: var(--fs-20); }
.btn--icon { width: var(--control-md); padding: 0; }
.btn--icon.btn--sm { width: var(--control-sm); }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { --btn-bg: var(--bg-subtle); --btn-fg: var(--text-muted); --btn-bd: var(--border); cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Jelvény / státusz ---------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-8);
  min-height: var(--sp-24); padding: 0 var(--sp-8);
  border-radius: var(--radius-pill); background: var(--bg-subtle); color: var(--text-2);
  font-size: var(--fs-12); font-weight: var(--fw-bold); line-height: var(--lh-ui); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.badge--live { background: var(--live-bg); color: var(--live-text); }
.badge--success { background: var(--success-bg); color: var(--success-text); }
.badge--warning { background: var(--warning-bg); color: var(--warning-text); }
.badge--danger { background: var(--danger-bg); color: var(--danger-text); }
.badge--info { background: var(--info-bg); color: var(--info-text); }
.dot { width: var(--sp-8); height: var(--sp-8); border-radius: 50%; background: currentColor; flex: none; }
.badge--live .dot { background: var(--live); }

/* ---------- Kártya ---------- */
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text);
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), border-color var(--dur-3) var(--ease-out);
}
.card__body { display: flex; flex-direction: column; gap: var(--sp-8); padding: var(--sp-24); flex: 1; }
.card__title { font-size: var(--fs-20); line-height: var(--lh-h4); font-weight: var(--fw-bold); color: var(--heading); margin: 0; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* az egész kártya kattintható, egyetlen linkkel */
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-16); margin-top: auto; padding-top: var(--sp-16); }
.card__media-tag { position: absolute; left: var(--sp-16); top: var(--sp-16); z-index: 1; }
.card--interactive:hover, .card--interactive:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--brand); }
.card--interactive .media > * { transition: transform var(--dur-4) var(--ease-out); }
.card--interactive:hover .media > * { transform: scale(1.04); }

/* Üveg panel — csak sötét/színes háttér fölött van értelme */
.glass {
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  background: var(--glass-bg); box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
}
.panel { padding: var(--sp-24); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }

/* ---------- KPI csempe ---------- */
.kpi { display: flex; flex-direction: column; gap: var(--sp-8); padding: var(--sp-24); }
.kpi__label { font-size: var(--fs-16); line-height: var(--lh-ui); color: var(--text-muted); }
.kpi__value { font-size: var(--fs-40); line-height: 1.2; font-weight: var(--fw-bold); color: var(--heading); letter-spacing: -0.02em; }
.kpi__delta { display: inline-flex; align-items: center; gap: var(--sp-4); font-size: var(--fs-16); line-height: var(--lh-ui); font-weight: var(--fw-semibold); color: var(--success-text); }
.kpi__delta--down { color: var(--danger-text); }

/* ---------- Folyamatjelző ---------- */
.progress { height: var(--sp-8); border-radius: var(--radius-pill); background: var(--bg-tint); overflow: hidden; }
.progress__bar { height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); transform-origin: left; transform: scaleX(var(--value, 0)); }

/* ---------- Szegmentált vezérlő / tabok ---------- */
.segmented { position: relative; display: inline-flex; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-subtle); max-width: 100%; overflow-x: auto; }
.segmented button, .segmented .pill__item {
  display: inline-flex; align-items: center;
  min-height: var(--control-sm); padding: 0 var(--sp-16); border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-2); font-weight: var(--fw-semibold); line-height: var(--lh-ui); white-space: nowrap;
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.segmented button[aria-selected="true"], .segmented button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

/* ---------- Űrlap ---------- */
.field { display: flex; flex-direction: column; gap: var(--sp-8); }
.field__label { font-weight: var(--fw-semibold); line-height: var(--lh-ui); }
.field__hint, .field__error { font-size: var(--fs-16); line-height: var(--lh-ui); color: var(--text-muted); }
.field__error { color: var(--danger-text); font-weight: var(--fw-medium); display: flex; gap: var(--sp-8); align-items: center; }
.input {
  width: 100%; min-height: var(--control-md); padding: var(--sp-8) var(--sp-16);
  border: 1px solid var(--border-control); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); line-height: var(--lh-ui);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.input::placeholder { color: var(--text-muted); opacity: 1; }
.input:hover { border-color: var(--primary); }
.input:focus-visible { outline-offset: 0; border-color: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger-text); box-shadow: inset 0 0 0 1px var(--danger-text); }
textarea.input { min-height: var(--sp-96); resize: vertical; }

.check { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: var(--sp-16); min-height: var(--control-md); cursor: pointer; line-height: var(--lh-ui); }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: var(--sp-24); height: var(--sp-24); margin: 0; border: 2px solid var(--border-control); border-radius: var(--sp-4); background: var(--surface); display: grid; place-content: center; transition: background-color var(--dur-1), border-color var(--dur-1); cursor: pointer; }
.check input::after { content: ""; width: 0.75rem; height: 0.5rem; border: solid var(--on-primary); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg) scale(0); transition: transform var(--dur-2) var(--ease-spring); }
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { transform: translateY(-2px) rotate(-45deg) scale(1); }

.switch input { width: var(--sp-48); border-radius: var(--radius-pill); place-content: center start; padding: 0 2px; }
.switch input::after { width: 1rem; height: 1rem; border: 0; border-radius: 50%; background: var(--border-control); transform: none; transition: transform var(--dur-2) var(--ease-spring), background-color var(--dur-2); }
.switch input:checked::after { background: var(--on-primary); transform: translateX(1.5rem); }

/* ---------- Értesítés ---------- */
.alert { display: flex; gap: var(--sp-16); align-items: flex-start; padding: var(--sp-16); border-radius: var(--radius-md); background: var(--info-bg); color: var(--info-text); border: 1px solid transparent; }
.alert p { color: var(--text); max-width: none; }
.alert strong { color: inherit; display: block; }
.alert--success { background: var(--success-bg); color: var(--success-text); }
.alert--warning { background: var(--warning-bg); color: var(--warning-text); }
.alert--danger { background: var(--danger-bg); color: var(--danger-text); }

/* ---------- Táblázat ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; margin: 0; }
.table th, .table td { padding: var(--sp-16); text-align: left; line-height: var(--lh-ui); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { font-size: var(--fs-12); font-weight: var(--fw-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); background: var(--bg-subtle); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.table tbody tr { transition: background-color var(--dur-1); }
.table tbody tr:hover { background: var(--bg-tint); }

/* ---------- Grafikon (SVG) ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart__line { fill: none; stroke: var(--chart-1); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart__line--2 { stroke: var(--chart-2); stroke-dasharray: 6 6; stroke-width: 2; }
.chart__area { fill: var(--chart-1); opacity: 0.14; }
.chart__label { fill: var(--text-muted); font-size: 12px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: var(--sp-16); font-size: var(--fs-16); line-height: var(--lh-ui); color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: var(--sp-8); }
.legend i { width: var(--sp-16); height: var(--sp-4); border-radius: var(--radius-pill); background: var(--chart-1); }
.legend i.l2 { background: var(--chart-2); }

/* ---------- Skeleton ---------- */
.skeleton { border-radius: var(--radius-sm); background: var(--bg-tint); position: relative; overflow: hidden; min-height: var(--sp-16); }

/* ---------- Ugró pirula (nav + szegmentált vezérlő) ----------
   A .pill a csoport fedőrétege: az elemek másolata az aktív színekben, clip-path-szal kivágva.
   A motion.js építi fel; JS nélkül az aria-current / aria-pressed háttér jelöli az aktív elemet. */
@property --pill-t { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --pill-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --pill-b { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --pill-l { syntax: "<length>"; inherits: false; initial-value: 0px; }
.pill { display: none; }
.has-pill > .pill {
  position: absolute; inset: 0; z-index: 2; margin: 0; max-width: none;
  display: flex; flex-direction: inherit; gap: inherit; padding: inherit;
  width: max-content; min-width: 100%;
  background: var(--primary); color: var(--on-primary); pointer-events: none;
  clip-path: inset(var(--pill-t) var(--pill-r) var(--pill-b) var(--pill-l) round var(--radius-pill));
  /* előre (jobbra/le): a jobb és alsó él vezet, a bal és felső késve követi */
  transition: --pill-r var(--dur-3) var(--ease-out), --pill-b var(--dur-3) var(--ease-out),
              --pill-l var(--dur-3) var(--ease-out) 80ms, --pill-t var(--dur-3) var(--ease-out) 80ms,
              opacity var(--dur-2) var(--ease-out);
}
.has-pill > .pill[data-dir="back"] {
  transition: --pill-l var(--dur-3) var(--ease-out), --pill-t var(--dur-3) var(--ease-out),
              --pill-r var(--dur-3) var(--ease-out) 80ms, --pill-b var(--dur-3) var(--ease-out) 80ms,
              opacity var(--dur-2) var(--ease-out);
}
.has-pill > .pill.pill--instant { transition: none; }
.pill__item { color: inherit !important; background: none !important; }
.has-pill .nav__link[aria-current],
.has-pill > button[aria-pressed="true"], .has-pill > button[aria-selected="true"] { background: transparent; color: var(--text); }

/* ---------- Logók ---------- */
.logo { display: block; width: auto; height: var(--logo-h, var(--control-md)); }

/* ---------- Kedvezményezetti infoblokk (kötelező támogatói elem) ----------
   A képfájl a palyazat.gov.hu-ról származó eredeti: NEM vágjuk, NEM színezzük, NEM tömörítjük újra.
   Csak arányosan méretezzük; rögzítve a jobb alsó sarokban, a szélektől 8 (mobil) / 16 px-re, minden oldalon. */
.infoblokk {
  position: fixed; right: var(--sp-8); bottom: var(--sp-8); z-index: calc(var(--z-nav) - 1);
  width: 10rem; height: auto; aspect-ratio: 1504 / 450;
  background: var(--white); pointer-events: none;
}
@media (min-width: 640px) { .infoblokk { width: 13.5rem; right: var(--sp-16); bottom: var(--sp-16); } }
@media print { .infoblokk { position: static; } }

/* ---------- Lábléc ---------- */
.footer { padding-block: var(--sp-48) var(--sp-96); border-top: 1px solid var(--border); background: var(--bg); color: var(--text); }
.footer__grid { display: grid; gap: var(--sp-32); }
.footer__logos { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-32); --logo-h: var(--control-md); }
.footer__project { margin: 0; display: grid; gap: var(--sp-8); line-height: var(--lh-ui); }
.footer__project div { display: grid; gap: 0 var(--sp-16); }
.footer__project dt { color: var(--text-muted); }
.footer__project dd { margin: 0; font-weight: var(--fw-semibold); }
@media (min-width: 640px) { .footer__project div { grid-template-columns: 16rem minmax(0, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--sp-64); } }
.footer__project dt.visually-hidden + dd { grid-column: 1 / -1; font-weight: var(--fw-regular); }

/* ---------- Hullám-motívum (az MTPA arculat díszítőeleme) — csak dekoráció, alt="" ---------- */
.wave { display: block; width: 10rem; height: auto; }
@media (min-width: 1024px) { .wave { width: 15rem; } }

/* ---------- Rádiógomb + mezőcsoport ---------- */
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset > legend { padding: 0; margin-bottom: var(--sp-8); font-weight: var(--fw-semibold); line-height: var(--lh-ui); }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]::after { width: 0.75rem; height: 0.75rem; border: 0; border-radius: 50%; background: var(--on-primary); transform: scale(0); }
.check input[type="radio"]:checked::after { transform: scale(1); }
.field-row { display: grid; gap: var(--sp-24) var(--sp-16); }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Kereshető lenyíló (forms.js építi egy natív <select>-ből) ---------- */
.combo { position: relative; }
.combo__input { padding-right: var(--sp-48); text-overflow: ellipsis; }
.combo__chevron { position: absolute; right: var(--sp-16); top: 0; height: var(--control-md); display: flex; align-items: center; pointer-events: none; color: var(--text-muted); transition: transform var(--dur-2) var(--ease-out); }
.combo.is-open .combo__chevron { transform: rotate(180deg); }
.combo__list {
  position: absolute; left: 0; right: 0; top: calc(100% + var(--sp-8)); z-index: var(--z-overlay);
  list-style: none; margin: 0; padding: var(--sp-8); max-height: 18rem; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-hi); box-shadow: var(--shadow-2);
}
.combo__option, .combo__empty { display: flex; align-items: center; gap: var(--sp-8); min-height: var(--control-md); margin: 0; padding: var(--sp-8) var(--sp-16); max-width: none; border-radius: var(--radius-sm); line-height: var(--lh-ui); cursor: pointer; }
.combo__option.is-active { background: var(--bg-tint); }
.combo__option[aria-selected="true"] { font-weight: var(--fw-semibold); color: var(--heading); }
.combo__option[aria-selected="true"]::after { content: ""; margin-left: auto; width: 0.75rem; height: 0.4rem; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
.combo__option mark { background: none; color: inherit; font-weight: var(--fw-bold); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.combo__empty { color: var(--text-muted); cursor: default; }

/* ---------- Dátumválasztó (forms.js; a mező natív <input type="date"> marad) ---------- */
.datepicker { position: relative; }
.datepicker--enhanced .input { padding-right: var(--sp-48); }
.datepicker--enhanced .input::-webkit-calendar-picker-indicator { display: none; }
.datepicker__btn { position: absolute; right: 0; top: 0; width: var(--control-md); height: var(--control-md); display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: none; color: var(--primary); }
.datepicker__pop {
  position: absolute; left: 0; top: calc(100% + var(--sp-8)); z-index: var(--z-overlay); width: 20rem; max-width: calc(100vw - 2 * var(--gutter));
  padding: var(--sp-16); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-hi); box-shadow: var(--shadow-2);
}
.datepicker__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-8); }
.datepicker__month { font-weight: var(--fw-bold); color: var(--heading); line-height: var(--lh-ui); }
.datepicker__month::first-letter { text-transform: uppercase; }
.datepicker__nav { width: var(--control-sm); height: var(--control-sm); display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--text); transition: background-color var(--dur-1); }
.datepicker__nav:hover { background: var(--bg-tint); }
.datepicker__week, .datepicker__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.datepicker__week span { display: grid; place-items: center; height: var(--sp-32); font-size: var(--fs-12); font-weight: var(--fw-bold); letter-spacing: 0.04em; color: var(--text-muted); }
.datepicker__day { aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; transition: background-color var(--dur-1), color var(--dur-1); }
.datepicker__day:hover:not(:disabled) { background: var(--bg-tint); }
.datepicker__day.is-outside { color: var(--text-muted); }
.datepicker__day[aria-current="date"] { box-shadow: inset 0 0 0 2px var(--accent); font-weight: var(--fw-bold); }
.datepicker__day[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); font-weight: var(--fw-bold); }
.datepicker__day:disabled { color: var(--text-muted); opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.datepicker__foot { display: flex; justify-content: flex-end; margin-top: var(--sp-8); padding-top: var(--sp-8); border-top: 1px solid var(--border); }

/* ---------- Chip (ki-be kapcsolható szűrő) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-8); min-height: var(--control-sm); padding: 0 var(--sp-16);
  border: 1px solid var(--border-control); border-radius: var(--radius-pill); background: var(--surface); color: var(--text);
  font-weight: var(--fw-semibold); line-height: var(--lh-ui); white-space: nowrap;
  transition: opacity var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.chip[aria-pressed="false"] { border-style: dashed; background: transparent; color: var(--text-muted); }
.chip[aria-pressed="false"] .dot { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.chip__count { font-size: var(--fs-12); font-weight: var(--fw-bold); padding: 0 var(--sp-8); border-radius: var(--radius-pill); background: var(--bg-tint); color: var(--text-2); }
.chip--live .dot { background: var(--map-live); }
.chip--up .dot { background: var(--map-up); }
.chip--past .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--map-past); }

/* ---------- Eseménytérkép (map.js) ---------- */
.map { display: grid; gap: var(--sp-24); }
.map__filters { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.map__stage { position: relative; min-width: 0; }
.map__svg { display: block; width: 100%; height: auto; aspect-ratio: 1048 / 663; overflow: visible; }
.map__county { fill: var(--map-land); stroke: var(--map-border); stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: fill var(--dur-2) var(--ease-out); }
.map__county:hover { fill: var(--map-land-hover); }
.map__marker { cursor: pointer; outline: none; transition: opacity var(--dur-3) var(--ease-out); }
.map__hit { fill: transparent; }
.map__core { transition: stroke-width var(--dur-1); stroke: var(--bg); stroke-width: 1.5; }
.map__halo { opacity: 0.22; }
.map__ring { fill: none; stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
/* Állapot = szín + forma: élő tömör + gyűrűk, közelgő tömör, lezárult üres karika */
.map__marker--live :is(.map__core, .map__halo) { fill: var(--map-live); }
.map__marker--live .map__ring { stroke: var(--map-live); }
.map__marker--up :is(.map__core, .map__halo) { fill: var(--map-up); }
.map__marker--past .map__core { fill: var(--bg); stroke: var(--map-past); stroke-width: 3; }
.map__marker--past .map__halo { fill: none; }
.map__marker:is(:hover, .is-current) .map__core { stroke: var(--text); stroke-width: 3; }
.map__marker:focus-visible .map__hit { stroke: var(--focus); stroke-width: 3; }
.map--hide-live .map__marker--live, .map--hide-up .map__marker--up, .map--hide-past .map__marker--past { opacity: 0; pointer-events: none; visibility: hidden; }
.map--hide-live .map__item[data-state="live"], .map--hide-up .map__item[data-state="up"], .map--hide-past .map__item[data-state="past"] { display: none; }
.map__tip {
  position: absolute; z-index: 2; transform: translateX(-50%); pointer-events: none; width: max-content; max-width: 16rem;
  display: grid; gap: var(--sp-4); justify-items: start; padding: var(--sp-16);
  border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: var(--surface-hi); color: var(--text); box-shadow: var(--shadow-2); line-height: var(--lh-ui);
}
.map__tip-num { font-size: var(--fs-20); font-weight: var(--fw-bold); color: var(--heading); }
.map__tip-num small { font-size: var(--fs-12); font-weight: var(--fw-semibold); color: var(--text-muted); }
.map__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); align-content: start; }
.map__item { display: flex; align-items: center; gap: var(--sp-16); margin: 0; max-width: none; padding: var(--sp-8) var(--sp-16); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); line-height: var(--lh-ui); transition: border-color var(--dur-1), background-color var(--dur-1); }
.map__item .badge { flex: none; min-width: 5.5rem; justify-content: center; }
.map__item.is-current { border-color: var(--brand); background: var(--surface-hi); }
.map__item-text { display: grid; min-width: 0; }
.map__error { padding: var(--sp-24); color: var(--text-muted); }
@media (min-width: 1024px) {
  .map { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .map__filters { grid-column: 1 / -1; }
  .map__list { max-height: 28rem; overflow-y: auto; padding-right: var(--sp-8); }
}

/* ---------- Süti-sáv ----------
   Nem modális, nem takarja a tartalmat és az infoblokkot; az elutasítás ugyanolyan könnyű, mint az elfogadás. */
.cookie {
  position: fixed; z-index: calc(var(--z-nav) - 1); left: var(--sp-8); right: var(--sp-8); bottom: var(--sp-64);
  display: grid; gap: var(--sp-16); padding: var(--sp-24);
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-hi); color: var(--text); box-shadow: var(--shadow-2);
}
.cookie__title { font-size: var(--fs-20); line-height: var(--lh-h4); margin: 0; }
.cookie p { max-width: none; }
.cookie__actions { display: grid; gap: var(--sp-8); }
@media (min-width: 640px) {
  .cookie { left: var(--sp-16); right: auto; bottom: var(--sp-16); width: 28rem; max-width: calc(100vw - 13.5rem - 3 * var(--sp-16)); }
  .cookie__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cookie__actions .btn--ghost { grid-column: 1 / -1; }
}

/* ---------- Fájlfeltöltő (forms.js) ----------
   JS nélkül a natív fájlmező látszik és működik; JS-sel a zóna veszi át a szerepét. */
.upload { display: grid; gap: var(--sp-16); }
.upload__drop {
  position: relative; display: grid; justify-items: center; gap: var(--sp-8); padding: var(--sp-32) var(--sp-24);
  border: 2px dashed var(--border-control); border-radius: var(--radius-md); background: var(--bg-subtle); color: var(--text);
  text-align: center; line-height: var(--lh-ui); cursor: pointer;
  transition: border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.upload__drop > .icon { width: var(--sp-40); height: var(--sp-40); color: var(--brand); transition: transform var(--dur-3) var(--ease-spring); }
.upload__drop:hover { border-color: var(--primary); }
.upload__drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.upload__title { font-weight: var(--fw-semibold); }
.upload__title u { color: var(--link); text-underline-offset: 0.2em; }
.upload__hint { color: var(--text-muted); }
html.js .upload__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.upload.is-dragover .upload__drop { border-style: solid; border-color: var(--primary); background: var(--bg-tint); transform: scale(1.01); }
.upload.is-dragover .upload__drop > .icon { transform: translateY(calc(-1 * var(--sp-4))) scale(1.1); }
.upload__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); }
.upload__list:empty { display: none; }
.upload__item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-8) var(--sp-16);
  margin: 0; max-width: none; padding: var(--sp-8) var(--sp-8) var(--sp-8) var(--sp-16);
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); line-height: var(--lh-ui);
}
.upload__icon { display: grid; place-items: center; color: var(--brand); }
.upload__meta { display: grid; min-width: 0; }
.upload__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__status { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.upload__remove { width: var(--control-sm); height: var(--control-sm); display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--text-muted); transition: background-color var(--dur-1), color var(--dur-1); }
.upload__remove:hover { background: var(--bg-tint); color: var(--text); }
.upload__item .progress { grid-column: 1 / -1; height: var(--sp-4); margin-bottom: var(--sp-4); }
.upload__item .progress__bar { transition: transform var(--dur-2) linear; }
.upload__item[data-state="done"] .upload__icon { color: var(--success-text); }
.upload__item[data-state="done"] .progress__bar { background: var(--success-text); }
.upload__item[data-state="error"] { border-color: var(--danger-text); background: var(--danger-bg); }
.upload__item[data-state="error"] :is(.upload__icon, .upload__status) { color: var(--danger-text); }
.upload__item[data-state="error"] .upload__status { font-weight: var(--fw-medium); }
