/* ==========================================================================
   Hallásteszt (/hallasteszt) · Jelölés: src/hallasteszt.template.html · Logika: js/hallasteszt.js
   A teszt kártyájának állapotai (data-allapot): alap · fel · le · kesz
   ========================================================================== */

.ht { padding-top: clamp(8px, 2vw, 24px); }
.ht__oszlop { max-width: 960px; display: flex; flex-direction: column; gap: clamp(16px, 2.2vw, 26px); }
.ht-kartya {
  position: relative; border-radius: var(--r-xl); padding: clamp(24px, 4.4vw, 52px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)); border: 1px solid var(--line);
}
.ht-kartya--teszt { text-align: center; background: linear-gradient(170deg, #0d1b20 0%, #081217 55%, #061014 100%); overflow: hidden; isolation: isolate; }
.ht-kartya--teszt::before { content: ""; position: absolute; z-index: -1; inset: -30% -10% auto; height: 110%; background: radial-gradient(closest-side, rgba(31, 199, 182, .2), transparent 70%); transition: opacity .6s var(--ease); opacity: .55; }
.ht-kartya--teszt[data-allapot="fel"]::before, .ht-kartya--teszt[data-allapot="le"]::before { opacity: 1; }
.ht-fej { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ht-kartya--teszt .ht-fej { justify-content: center; }
.ht-fej h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.ht-szam { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; font-weight: 600; color: var(--accent-bright); background: rgba(31, 199, 182, .12); border: 1px solid rgba(31, 199, 182, .28); }
.ht-utasitas { color: var(--text-muted); font-size: var(--fs-lead); line-height: 1.5; max-width: 640px; }
.ht-utasitas + .ht-utasitas { margin-top: 14px; }
.ht-kartya--teszt .ht-utasitas { margin-inline: auto; min-height: 3em; }
.ht-apro { margin-top: 18px; font-size: var(--fs-small); color: var(--text-faint); }
.ht-apro a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.ht-apro a:hover { color: var(--accent-bright); }

.ht-lista { display: grid; gap: 22px; }
.ht-lista li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.ht-lista .elv__ikon { margin: 0; }
.ht-lista h3 { font-size: 1.1rem; letter-spacing: -.02em; line-height: 1.3; }
.ht-lista p { margin-top: 6px; color: var(--text-muted); }
.ht-sor { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; }
.ht-sor .ht-apro { margin: 0; flex: 1 1 240px; }
[data-proba][aria-pressed="true"] { background: rgba(31, 199, 182, .16); border-color: rgba(126, 239, 224, .5); color: var(--accent-bright); }

.ht-figy {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 26px; padding: 16px 20px; border-radius: 20px;
  background: rgba(255, 200, 87, .07); border: 1px solid rgba(255, 200, 87, .22); color: #f3e3bd; font-size: .97rem; text-align: left;
}
.ht-figy svg { width: 20px; height: 20px; margin-top: 2px; color: #ffc857; }
.ht-figy strong { color: #fff3d6; font-weight: 600; }
.ht-figy[hidden] { display: none; }

/* A kijelző: nagy frekvenciaszám */
.ht-mero { margin-top: clamp(18px, 3vw, 34px); font-size: clamp(3.6rem, 13vw, 7.6rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.ht-mero small, .ht-eredmeny__szam small { font-size: .3em; font-weight: 500; letter-spacing: 0; color: var(--text-faint); margin-left: .35em; }

/* A skála: 8 000 → 20 000 Hz */
.ht-skala { max-width: 720px; margin: clamp(22px, 3vw, 36px) auto 0; }
.ht-skala__sav { position: relative; height: 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line); }
.ht-skala__toltes { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(31, 199, 182, .25), var(--accent-bright)); }
.ht-skala__jel { position: absolute; top: 50%; left: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #eafffb; box-shadow: 0 0 0 6px rgba(31, 199, 182, .22), 0 6px 18px rgba(0, 0, 0, .5); }
.ht-skala__pont { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(5, 9, 13, .8); }
.ht-skala__pont[hidden] { display: none; }
.ht-skala__cimkek { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-faint); }

.ht-gombok { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(26px, 3.4vw, 40px); }
.ht-fogomb { --btn-h: 72px; min-width: min(360px, 100%); padding-inline: 36px; font-size: 1.25rem; }
.ht-kartya--teszt[data-allapot="kesz"] .ht-mero, .ht-kartya--teszt[data-allapot="kesz"] > .ht-gombok, .ht-kartya--teszt[data-allapot="kesz"] > .ht-utasitas, .ht-kartya--teszt[data-allapot="kesz"] [data-billentyu] { display: none; }
[data-megszakit][hidden], [data-kor][hidden] { display: none; }

.ht-eredmeny { margin-top: clamp(18px, 3vw, 30px); }
.ht-eredmeny[hidden] { display: none; }
.ht-eredmeny .eyebrow { margin-bottom: 6px; }
.ht-eredmeny__szam { font-size: clamp(3.6rem, 13vw, 7.6rem); font-weight: 600; letter-spacing: -.05em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ht-eredmeny__korok { margin-top: 10px; font-family: var(--font-mono); font-size: var(--fs-small); color: var(--text-faint); }
.ht-eredmeny__szoveg { max-width: 620px; margin: 22px auto 0; font-size: var(--fs-lead); color: var(--text-muted); line-height: 1.5; }
.ht-eszkoz:empty { display: none; }

/* Hangról hangra */
.hangok { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.hangok button {
  height: 64px; border-radius: 20px; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-strong);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
}
.hangok button:hover { background: rgba(255, 255, 255, .08); }
.hangok button:active { transform: scale(.97); }
.hangok button.szol { background: var(--accent); border-color: var(--accent); color: #03120f; box-shadow: 0 10px 30px rgba(31, 199, 182, .3); }
.hangok button[disabled] { opacity: .35; cursor: not-allowed; }

/* Táblázat: a cellák háttere a százalékkal arányos sáv */
.ht-tabla-keret { margin-top: 26px; border-radius: 22px; border: 1px solid var(--line); overflow-x: auto; background: rgba(255, 255, 255, .02); }
.ht-tabla { width: 100%; min-width: 560px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ht-tabla th, .ht-tabla td { padding: 14px 16px; text-align: right; white-space: nowrap; }
.ht-tabla thead th { font-size: var(--fs-small); font-weight: 500; color: var(--text-faint); border-bottom: 1px solid var(--line); }
.ht-tabla th:first-child { text-align: left; }
.ht-tabla tbody th { font-weight: 600; }
.ht-tabla tbody tr + tr > * { border-top: 1px solid var(--line); }
.ht-tabla td { color: var(--text); background: linear-gradient(90deg, rgba(31, 199, 182, .2) calc(var(--p) * 1%), transparent calc(var(--p) * 1%)); }

.ht-kartya--ket { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 48px); align-items: center; }

@media (max-width: 760px) {
  .ht-kartya { border-radius: 28px; }
  .ht-kartya--ket { grid-template-columns: minmax(0, 1fr); }
  .hangok { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht-skala__cimkek span:nth-child(even) { visibility: hidden; }
  .ht-gombok .btn { flex: 1 1 100%; }
  .ht-fej { flex-wrap: wrap; }
}
