/*
NÉV: Mi épül itt? UI v2 – base.css
PROJEKT: NextSheet Építési Intelligence
TÍPUS: CSS
VERZIÓ: v0.88.0
UTOLSÓ FRISSÍTÉS: 2026-10-25
LEÍRÁS: UI v2 helyi integráció, meglévő adat- és útvonalszerződéssel.
FEJLESZTŐ: Balázs Bakos · NextSheet · https://www.nextsheet.hu
CHANGELOG: v0.88.0 - 2026-10-25 - Főoldal és találati felület bekötése.
*/
/* Mi épül itt? – UI v2 · alap és közös komponensek */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--radius-s); background: var(--strong); color: var(--on-strong); }
.skip-link:focus { top: 12px; }
.disp { font-family: var(--font-display); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* ---------- Fejléc ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line-2); }
.site-header .wrap { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-btn); display: grid; place-items: center; flex: 0 0 auto; }
.brand-name { font: 800 19px/1 var(--font-display); white-space: nowrap; }
.main-nav { display: none; gap: 28px; }
.main-nav a { color: var(--text-2); font-weight: 500; font-size: 15px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 1024px) { .main-nav { display: flex; } .header-left { display: flex; align-items: center; gap: 40px; } }

/* ---------- Gombok ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 15px; white-space: nowrap; text-decoration: none !important; }
.btn-primary { background: var(--accent-btn); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-strong { background: var(--strong); color: var(--on-strong); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); font-weight: 600; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-grid; place-items: center; padding: 0; flex: 0 0 auto; }
.icon-btn:hover { border-color: var(--muted); }
.icon-btn svg, .btn svg { flex: 0 0 auto; }
.theme-toggle .label { display: none; }
@media (min-width: 1024px) {
  .theme-toggle { width: auto; padding: 0 14px; gap: 8px; display: inline-flex; align-items: center; font-weight: 600; font-size: 14px; height: 40px; border-radius: 10px; }
  .theme-toggle .label { display: inline; }
}
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
.account-btn .label { display: none; }
@media (min-width: 1024px) { .account-btn { width: auto; padding: 0 16px; height: 40px; border-radius: 10px; background: var(--strong); color: var(--on-strong); border-color: var(--strong); font-weight: 600; font-size: 14px; } .account-btn svg { display: none; } .account-btn .label { display: inline; } }
.submit-btn { display: none !important; }
@media (min-width: 1024px) { .submit-btn { display: inline-flex !important; } }

/* ---------- Chipek, szegmens ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none !important; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--strong); color: var(--on-strong); border-color: var(--strong); }
.chip .count { opacity: .75; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-scroll { position: relative; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.segmented button, .segmented a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important; }
.segmented [aria-selected="true"], .segmented [aria-pressed="true"] { background: var(--seg-on); color: var(--text); box-shadow: 0 1px 3px var(--shadow); }

/* ---------- Státusz ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; box-sizing: border-box; flex: 0 0 auto; }
.status--prep { background: var(--st-prep-bg); color: var(--st-prep-fg); }
.status--prep::before { border: 2px solid var(--mk-prep); }
.status--build { background: var(--st-build-bg); color: var(--st-build-fg); }
.status--build::before { background: var(--mk-build); }
.status--done { background: var(--st-done-bg); color: var(--st-done-fg); }
.status--done::before { width: 10px; height: 10px; border-radius: 0; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; }
.legend { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 12px; background: var(--overlay); border: 1px solid var(--line); box-shadow: 0 2px 8px var(--shadow); font-size: 12px; font-weight: 500; }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 13px; height: 13px; border-radius: 50%; box-sizing: border-box; display: inline-block; }
.legend .lg-prep { border: 3px solid var(--mk-prep); background: var(--mk-ring); }
.legend .lg-build { background: var(--mk-build); }
.legend .lg-done { background: var(--mk-done); }

/* ---------- Kártya ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px; box-shadow: 0 1px 2px var(--shadow); display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none !important; position: relative; }
a.card:hover, .card.is-link:hover { border-color: var(--muted); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { margin: 0; font: 700 18px/1.25 var(--font-display); }
.card-title a { color: inherit; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .meta { font-size: 13px; color: var(--muted); }
.card .warn { display: flex; align-items: center; gap: 6px; font: 600 13px/1.3 var(--font-body); color: var(--st-build-fg); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.card-foot .icon-btn { width: 40px; height: 40px; position: relative; z-index: 1; }
.card .here { font: 700 12px/1 var(--font-body); color: var(--accent); }
.card .dist { font: 600 13px/1 var(--font-body); color: var(--text); font-variant-numeric: tabular-nums; }
.card.is-selected { border: 1.5px solid var(--accent); }
.follow-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.eyebrow { font: 600 12px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; }
.h2 { margin: 0; font: 700 22px/1.2 var(--font-display); letter-spacing: -.01em; }
@media (min-width: 768px) { .h2 { font-size: 30px; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.section-head p { margin: 6px 0 0; }

/* ---------- Kereső ---------- */
.search-field { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 6px 0 16px; border-radius: var(--radius-m); background: var(--field); border: 1.5px solid var(--field-line); box-shadow: 0 4px 14px var(--shadow); position: relative; }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-weight: 500; font-size: 16px; outline: none; }
.search-field input::placeholder { color: var(--muted); }
.search-field:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 1px; }
.search-field .btn { height: 44px; }
.search-compact { height: 46px; border-width: 1px; box-shadow: none; background: var(--bg-2); border-color: var(--line); padding: 0 6px 0 12px; border-radius: 12px; }
.search-compact input { font-size: 15px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; list-style: none; margin: 0; padding: 6px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px var(--shadow-strong); max-height: 360px; overflow: auto; }
.suggest[hidden] { display: none; }
.suggest li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.suggest li small { color: var(--muted); white-space: nowrap; font-size: 13px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-2); }
.suggest .kind { font-size: 12px; color: var(--muted); display: block; }

/* ---------- Értesítő / inverz doboz ---------- */
.inverse-box { border-radius: 20px; padding: 22px 20px; background: var(--inverse); border: 1px solid var(--inverse-line); color: var(--inverse-text); display: flex; flex-direction: column; gap: 12px; }
.inverse-box p { margin: 0; color: var(--inverse-muted); font-size: 14px; }
.inverse-box .ico { width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: var(--inverse-accent); flex: 0 0 auto; }
@media (min-width: 900px) {
  .inverse-box { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px 40px; border-radius: var(--radius-xl); gap: 32px; }
  .inverse-box .body { display: flex; align-items: center; gap: 20px; }
}

/* ---------- Visszajelzés ---------- */
.feedback-inline { padding: 18px 16px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line); display: flex; flex-direction: column; gap: 12px; }
.feedback-inline .row { display: flex; gap: 8px; }
.feedback-inline .row button { flex: 1; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.feedback-inline .row button[aria-pressed="true"] { background: var(--strong); color: var(--on-strong); border-color: var(--strong); }

/* ---------- Dialógus ---------- */
dialog.sheet-dialog { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 0; background: var(--surface); color: var(--text); width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 60px var(--shadow-strong); }
dialog.sheet-dialog::backdrop { background: rgba(10, 12, 16, .45); }
dialog.sheet-dialog form { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
dialog.sheet-dialog h2 { margin: 0; font: 700 22px/1.2 var(--font-display); }
dialog.sheet-dialog label { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
dialog.sheet-dialog input, dialog.sheet-dialog select { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 12px; font-size: 15px; }
dialog.sheet-dialog .actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- Lábléc ---------- */
.site-footer { border-top: 1px solid var(--line-2); background: var(--bg-2); padding: 28px 0 36px; margin-top: auto; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 16px; }
.site-footer nav { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.site-footer nav a { color: var(--text-2); }
.site-footer small { color: var(--muted); font-size: 12px; }
@media (min-width: 900px) { .site-footer .wrap { flex-direction: row; align-items: center; justify-content: space-between; } .site-footer nav { flex-direction: row; gap: 24px; flex-wrap: wrap; } }

/* ---------- Térkép elemek ---------- */
.map-el { position: absolute; inset: 0; background: var(--map-tone); }
.map-attrib { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 2px 6px; border-radius: 4px; background: var(--overlay); font-size: 11px; color: var(--muted); }
.map-attrib a { color: inherit; }
.user-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent-btn); border: 3px solid #fff; box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent-btn) 18%, transparent), 0 1px 4px rgba(0,0,0,.35); }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.maplibregl-ctrl-group { background: var(--surface) !important; border: 1px solid var(--line); box-shadow: 0 2px 6px var(--shadow) !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
:root[data-theme="dark"] .maplibregl-ctrl-icon { filter: invert(1); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.link-btn { border: 0; background: none; padding: 0; color: var(--text-2); font-size: 14px; text-align: left; }
.link-btn:hover { text-decoration: underline; }
button.card { font: inherit; text-align: left; width: 100%; cursor: pointer; }
