/* =========================================================================
   2B Élő Árazási Önértékelő — frontend
   A megjelenés a 2B Kontroll "Árazás munkafüzet" arculatát követi
   (Roboto display, Montserrat UI, zöld #7aa22b, sötét #0c1004).
   ========================================================================= */

.two-b-live {
  /* Márka színek – a Figma arculati táblából átvéve */
  --green-500: #7aa22b;
  --green-600: #6a8f25;
  --green-400: #8cbf40;
  --green-300: #a1cb3a;
  --dark-900: #0c1004;
  --ink-700: #404040;
  --ink-500: #62636a;
  --white: #ffffff;
  --tint-50: #f8fcf0;
  --surface-100: #f7f8f9;
  --line-200: #d9d9d9;

  --font-display: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --radius-card: 20px;
  --shadow-header: 8px 16px 40px 0 rgba(0, 0, 0, 0.08);

  font-family: var(--font-sans);
  color: var(--ink-700);
  font-size: 16px;
  line-height: 1.6;
  background: transparent;
  display: flex;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}
.two-b-live * { box-sizing: border-box; }
/* A téma globális kép-szabályai (pl. img{height:auto}) ne torzítsák a logót/ikonokat */
.two-b-live img { max-width: 100%; }

/* Telefon-szerű állványzat (max 460px, fehér lap) */
.tbl-shell {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ---- Fejléc + haladásjelző ---- */
.tbl-header {
  background: #fff;
  border-bottom: 1px solid var(--line-200);
  padding: 12px 20px 10px;
}
.tbl-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  min-width: 0;
}
/* A logó fix magasságú, a témák height:auto szabálya ellenére is */
.two-b-live .tbl-logo {
  height: 20px !important;
  width: auto !important;
  max-width: 96px;
  display: block;
  flex-shrink: 0;
}
.tbl-head-right {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-500);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.tbl-progress { display: flex; gap: 6px; }
.tbl-progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line-200);
  transition: background .3s ease;
}
.tbl-progress span.is-active { background: var(--green-500); }

/* ---- Törzs: természetes magasság, az oldallal együtt görget (nincs belső görgetés) ---- */
.tbl-scroll {
  display: flex;
  flex-direction: column;
}

/* ---- Borító ---- */
.tbl-cover {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 26px 28px;
}
.tbl-cover-accent {
  height: 5px;
  width: 56px;
  background: var(--green-500);
  margin-bottom: 26px;
}
.two-b-live .tbl-cover .tbl-logo { height: 28px !important; max-width: 140px; margin-bottom: 34px; }
.tbl-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--green-500);
  text-transform: uppercase;
  margin: 0;
}
.tbl-cover h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.18;
  color: var(--dark-900);
  margin: 14px 0 0;
}
.tbl-cover-sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  color: var(--green-500);
  margin: 12px 0 0;
}
.tbl-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-700);
  margin: 20px 0 0;
  text-wrap: pretty;
}
.tbl-pills { display: flex; gap: 8px; margin: 26px 0 0; flex-wrap: wrap; }
.tbl-pills span {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-900);
  background: var(--tint-50);
  padding: 7px 14px;
  border-radius: 20px;
}
.tbl-spacer { flex: 1; }
.tbl-presenter {
  border-top: 1px solid var(--line-200);
  padding-top: 18px;
  margin-top: 30px;
  margin-bottom: 22px;
}
.tbl-presenter b { display: block; font-size: 14px; font-weight: 600; color: var(--dark-900); }
.tbl-presenter span { display: block; font-size: 13px; color: var(--ink-500); margin-top: 3px; }
.tbl-privacy { font-size: 12px; color: var(--ink-500); margin: 12px 0 0; text-align: center; }

/* ---- Nagy elsődleges gomb (kitöltött, hoverre sötét) ---- */
.two-b-live button.tbl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid var(--green-500) !important;
  border-radius: 0 !important;
  background: var(--green-500) !important;
  background-image: none !important;
  color: var(--white) !important;
  font: 700 16px/1.3 var(--font-sans) !important;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.two-b-live button.tbl-button:hover { background: var(--dark-900) !important; border-color: var(--dark-900) !important; color: #fff !important; }
.two-b-live button.tbl-button:disabled { background: #dfe6d4 !important; border-color: #dfe6d4 !important; color: #9aa38c !important; cursor: not-allowed; }
.tbl-button .tbl-arrow { font-size: 18px; line-height: 1; }
.two-b-live button.tbl-button.tbl-outline { background: #fff !important; color: var(--dark-900) !important; }
.two-b-live button.tbl-button.tbl-outline:hover { background: var(--dark-900) !important; color: #fff !important; }
.tbl-link {
  background: none;
  border: 0;
  color: var(--ink-500);
  font: 600 13px var(--font-sans);
  cursor: pointer;
  padding: 6px;
  text-decoration: underline;
}
.tbl-link:hover { color: var(--dark-900); }

/* ---- Blokk kérdések ---- */
.tbl-block { padding: 24px 20px 130px; }
.tbl-block-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.tbl-block-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-card);
  background: var(--tint-50);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tbl-block-icon svg { width: 30px; height: 30px; display: block; }
.tbl-block-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.2;
  color: var(--dark-900);
  margin: 2px 0 0;
}
.tbl-prompt {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-700);
  margin: 6px 0 0;
  font-weight: 600;
}
.tbl-scale-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 4px;
  font-size: 12px;
  color: var(--ink-500);
}
.tbl-questions { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.tbl-question {
  border: 1px solid var(--line-200);
  border-radius: var(--radius-card);
  padding: 16px 16px 18px;
  background: #fff;
}
.tbl-question-top { display: flex; gap: 11px; margin-bottom: 14px; }
.tbl-question-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--dark-900);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tbl-question p {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--dark-900);
  margin: 2px 0 0;
  text-wrap: pretty;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.two-b-live .tbl-rates {
  display: flex !important;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}
/* Erős szabályok, hogy a téma gombstílusai ne írják felül a méretet és a kijelölést.
   A flex/min-width/width/padding kényszerítése kell, különben az 5. gomb kilóg. */
.two-b-live button.tbl-rate {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: 50px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 2px solid var(--line-200) !important;
  background: #fff !important;
  background-image: none !important;
  color: var(--ink-700) !important;
  font: 700 17px/1 var(--font-sans) !important;
  cursor: pointer;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  position: relative;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.two-b-live button.tbl-rate.is-selected {
  background: var(--green-500) !important;
  background-image: none !important;
  color: #fff !important;
  border-color: var(--green-600) !important;
  box-shadow: 0 4px 12px rgba(122, 162, 43, .35) !important;
}
/* A kiválasztott értéken pipa jelenik meg, hogy egyértelmű legyen */
.two-b-live button.tbl-rate.is-selected::after {
  content: "✓";
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  opacity: .9;
}

/* ---- Ragadós alsó sáv ---- */
.tbl-sticky {
  background: #fff;
  padding: 8px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.tbl-sticky-note { text-align: center; font-size: 12px; color: var(--ink-500); margin: 0; }

/* ---- Középre igazított állapotképernyők (váró / lezárva) ---- */
.tbl-center {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 28px;
  text-align: center;
}
.tbl-center h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: var(--dark-900);
  margin: 12px 0 6px;
}
.tbl-center p { max-width: 340px; font-size: 14px; color: var(--ink-700); margin: 4px 0 0; }
.tbl-count {
  margin-top: 24px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--tint-50);
  color: var(--ink-700);
  font-size: 13px;
}
.tbl-count strong { color: var(--green-500); font-size: 20px; font-family: var(--font-display); font-weight: 700; }
.tbl-check {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--green-500);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}
.tbl-pulse { position: relative; width: 68px; height: 68px; }
.tbl-pulse > span { position: absolute; inset: 15px; border-radius: 50%; background: var(--green-500); }
.tbl-pulse:before, .tbl-pulse:after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--green-500);
  border-radius: 50%;
  animation: tblPulse 2s infinite;
}
.tbl-pulse:after { animation-delay: 1s; }

/* ---- Teremeredmény (blokk) ---- */
.tbl-results { padding: 26px 20px 40px; }
.tbl-results h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--dark-900);
  margin: 6px 0 0;
}
.tbl-score-card {
  background: var(--tint-50);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  margin-top: 18px;
}
.tbl-score-top { display: flex; align-items: baseline; justify-content: space-between; }
.tbl-score-top > span { font-size: 14px; font-weight: 600; color: var(--ink-700); }
.tbl-score-val { font-family: var(--font-display); font-weight: 700; color: var(--dark-900); font-size: 15px; }
.tbl-score-val b { font-size: 36px; color: var(--green-500); font-weight: 700; }
.tbl-score-track {
  height: 12px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 14px;
}
.tbl-score-fill {
  height: 100%;
  background: var(--green-500);
  border-radius: inherit;
  transform-origin: left;
  animation: tblGrowX .9s cubic-bezier(.22, 1, .36, 1) both;
}
.tbl-score-feedback { font-size: 14px; line-height: 1.5; color: var(--ink-700); margin: 14px 0 0; }

.tbl-dist-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--dark-900);
  margin: 28px 0 0;
}
.tbl-dist-caption { font-size: 12px; line-height: 1.5; color: var(--ink-500); margin: 5px 0 0; }
.tbl-dist-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 5px 11px;
  border-radius: 20px;
  background: var(--tint-50);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-700);
}
.tbl-dist-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--green-500);
  display: inline-block;
}
.tbl-dist-list { display: flex; flex-direction: column; gap: 20px; margin-top: 18px; }
.tbl-dist-q > p { font-size: 13.5px; line-height: 1.45; color: var(--dark-900); margin: 0 0 12px; font-weight: 600; }
/* Egy sor = egy pontérték: [szám] [sáv] [X fő · Y%] */
.tbl-dist-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.tbl-dist-key {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #eef2e6;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tbl-dist-track {
  height: 18px;
  background: #f0f3ec;
  border-radius: 5px;
  overflow: hidden;
}
.tbl-dist-track > i {
  display: block;
  height: 100%;
  min-width: 2px;
  background: #cfe0a3;
  border-radius: 5px;
  transform-origin: left;
  animation: tblGrowX .7s cubic-bezier(.22, 1, .36, 1) both;
}
.tbl-dist-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  white-space: nowrap;
  min-width: 62px;
  text-align: right;
}
.tbl-dist-val b { color: var(--dark-900); font-weight: 700; }
/* A résztvevő saját válaszának sora kiemelve */
.tbl-dist-row.is-mine .tbl-dist-key { background: var(--dark-900); color: #fff; }
.tbl-dist-row.is-mine .tbl-dist-track > i { background: var(--green-500); }
.tbl-dist-row.is-mine .tbl-dist-val { color: var(--dark-900); }
.tbl-dist-row.is-mine .tbl-dist-val b { color: var(--green-600); }
.tbl-dist-mine-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--green-500);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}
.tbl-next-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--tint-50);
  margin-top: 24px;
}
.tbl-next-note p { font-size: 12px; color: var(--ink-700); margin: 0; }
.tbl-mini-pulse { position: relative; width: 30px; height: 30px; flex-shrink: 0; }
.tbl-mini-pulse > span { position: absolute; inset: 8px; border-radius: 50%; background: var(--green-500); }
.tbl-mini-pulse:before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--green-500);
  border-radius: 50%;
  animation: tblPulse 2s infinite;
}

/* ---- Végeredmény (személyes) ---- */
.tbl-final { padding: 28px 22px 40px; }
.tbl-final h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: var(--dark-900);
  margin: 6px 0 0;
}
.tbl-total { text-align: center; margin-top: 22px; }
.tbl-total .tbl-total-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--dark-900);
  line-height: 1;
}
.tbl-total .tbl-total-num b { font-size: 64px; color: var(--green-500); font-weight: 700; }
.tbl-total .tbl-total-num span { font-size: 24px; }
.tbl-zones-wrap { margin-top: 22px; }
.tbl-zones {
  position: relative;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  gap: 2px;
}
.tbl-zones > div { height: 100%; }
.tbl-zones-marker-row { position: relative; height: 0; }
.tbl-zones-marker {
  position: absolute;
  top: -14px;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dark-900);
  border: 3px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  animation: tblPop .6s .3s cubic-bezier(.22, 1, .36, 1) both;
}
.tbl-zones-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 11px;
  color: var(--ink-500);
  font-weight: 600;
}
.tbl-band {
  background: var(--tint-50);
  border-radius: var(--radius-card);
  padding: 24px 22px;
  margin-top: 24px;
}
.tbl-band h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: var(--dark-900);
  margin: 8px 0 0;
}
.tbl-band p { font-size: 14.5px; line-height: 1.6; color: var(--ink-700); margin: 14px 0 0; text-wrap: pretty; }
.tbl-breakdown { margin-top: 24px; }
.tbl-breakdown-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink-500);
  text-transform: uppercase;
  margin: 0 0 12px;
}
.tbl-breakdown-list { display: flex; flex-direction: column; gap: 8px; }
.tbl-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-200);
  padding-bottom: 8px;
}
.tbl-breakdown-row > span { font-size: 14px; color: var(--dark-900); font-weight: 600; }
.tbl-breakdown-row > strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--dark-900);
  white-space: nowrap;
}
.tbl-breakdown-row > strong b { color: var(--green-500); font-weight: 700; }
.tbl-final-cta { text-align: center; margin-top: 30px; }
.tbl-final-foot { text-align: center; font-size: 12px; color: var(--ink-500); margin: 26px 0 0; }

/* ---- Saját válaszok áttekintése ---- */
.tbl-review-block {
  border: 1px solid var(--line-200);
  border-radius: var(--radius-card);
  padding: 16px 16px 6px;
  margin: 0 0 14px;
}
.tbl-review-block h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--dark-900);
  margin: 0 0 8px;
}
.tbl-review-block h3 b { color: var(--green-500); font-size: 14px; }
.tbl-review-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line-200);
  padding: 10px 0;
  font-size: 13px;
  color: var(--ink-700);
}
.tbl-review-row strong {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green-500);
  color: #fff;
  font-weight: 700;
}

/* ---- Hiba / betöltés ---- */
.tbl-alert {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff1ec;
  color: #8c3217;
  font-size: 13px;
  border-left: 4px solid #dc633e;
}
.tbl-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--ink-500);
}
.tbl-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--line-200);
  border-top-color: var(--green-500);
  border-radius: 50%;
  animation: tblSpin .8s linear infinite;
}

@keyframes tblSpin { to { transform: rotate(360deg); } }
@keyframes tblGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tblPop { from { opacity: 0; transform: translateX(-50%) scale(.4); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes tblPulse { 0% { transform: scale(.45); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }

/* Önálló oldalon (nem beágyazva) kártyás megjelenés; beágyazva a befoglaló doboz adja a keretet */
@media (min-width: 500px) {
  .two-b-live { padding: 24px 0; }
  .tbl-shell { border-radius: 24px; box-shadow: var(--shadow-header); }
}
