/*
 * Ötletlabor – közös alap CSS.
 * Minden ötlet a saját theme.css-ében írja felül a változókat (szín, betű, lekerekítés),
 * a szerkezet és az űrlap viselkedése itt közös.
 */

:root {
  --ol-bg: #ffffff;
  --ol-surface: #f3f4f6;
  --ol-ink: #1d232a;
  --ol-muted: #5b6570;
  --ol-line: #d9dde2;
  --ol-accent: #2f5bea;
  --ol-accent-ink: #ffffff;
  --ol-error: #b42318;
  --ol-focus: #2f5bea;

  --ol-font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ol-font-display: var(--ol-font-body);

  --ol-radius-control: 10px;
  --ol-radius-panel: 18px;

  --ol-measure: 36rem;
  --ol-page: 72rem;
  --ol-gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ol-bg);
  color: var(--ol-ink);
  font-family: var(--ol-font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--ol-font-display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 6.2vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid var(--ol-focus);
  outline-offset: 2px;
}

.ol-wrap {
  width: 100%;
  max-width: var(--ol-page);
  margin-inline: auto;
  padding-inline: var(--ol-gutter);
}
@media (min-width: 720px) { :root { --ol-gutter: 32px; } }

.ol-measure { max-width: var(--ol-measure); }

.ol-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ol-ink); color: var(--ol-bg); padding: 8px 12px; z-index: 10;
}
.ol-skip:focus { left: 8px; top: 8px; }

/* ---------- Űrlap ---------- */

.ol-form { display: grid; gap: 10px; max-width: 30rem; }

.ol-form__label { font-weight: 600; font-size: 0.95rem; }

.ol-form__row { display: grid; gap: 8px; }
@media (min-width: 520px) {
  .ol-form__row { grid-template-columns: 1fr auto; }
}

.ol-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ol-ink);
  background: var(--ol-bg);
  border: 1.5px solid var(--ol-line);
  border-radius: var(--ol-radius-control);
}
.ol-input:focus-visible { border-color: var(--ol-focus); }

.ol-button {
  min-height: 52px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  color: var(--ol-accent-ink);
  background: var(--ol-accent);
  border: 0;
  border-radius: var(--ol-radius-control);
  cursor: pointer;
  white-space: nowrap;
}
.ol-button:hover { filter: brightness(1.06); }
.ol-button:disabled { opacity: 0.6; cursor: progress; }

.ol-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.875rem;
  color: var(--ol-muted);
}
.ol-consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ol-accent); }

.ol-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; opacity: 0; }

.ol-status { margin: 0; font-size: 0.9rem; }
.ol-status:empty { margin-top: -10px; }
.ol-status.is-error { color: var(--ol-error); font-weight: 600; }

.ol-reassure { margin: 0; font-size: 0.875rem; color: var(--ol-muted); }

.ol-done { font-weight: 600; }

/* ---------- Köszönő panel és kérdés ---------- */

.ol-thanks {
  max-width: 30rem;
  padding: 20px;
  background: var(--ol-surface);
  border-radius: var(--ol-radius-panel);
}
.ol-thanks h3 { margin-bottom: 0.35em; }
.ol-thanks h3:focus { outline: none; }

.ol-survey { margin-top: 16px; }
.ol-survey__q { font-weight: 600; margin-bottom: 10px; }
.ol-survey__options { display: flex; flex-wrap: wrap; gap: 8px; }
.ol-survey__options button {
  min-height: 44px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ol-ink);
  background: var(--ol-bg);
  border: 1.5px solid var(--ol-line);
  border-radius: 999px;
  cursor: pointer;
}
.ol-survey__options button[aria-pressed="true"] {
  border-color: var(--ol-accent);
  background: var(--ol-accent);
  color: var(--ol-accent-ink);
}
.ol-survey__options button:disabled:not([aria-pressed="true"]) { opacity: 0.5; cursor: default; }
.ol-survey__done { margin: 12px 0 0; font-size: 0.95rem; color: var(--ol-muted); }

/* ---------- GYIK ---------- */

.ol-faq { border-top: 1px solid var(--ol-line); }
.ol-faq details { border-bottom: 1px solid var(--ol-line); }
.ol-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  font-weight: 600;
  position: relative;
}
.ol-faq summary::-webkit-details-marker { display: none; }
.ol-faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; line-height: 1;
  color: var(--ol-muted);
}
.ol-faq details[open] summary::after { content: "–"; }
.ol-faq details p { padding-bottom: 8px; color: var(--ol-muted); }

/* ---------- Lábléc ---------- */

.ol-footer {
  padding-block: 28px 40px;
  font-size: 0.875rem;
  color: var(--ol-muted);
}
.ol-footer p { margin: 0 0 0.4em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
