/* Testy z arkuszy CKE: lista i runner. Kolory i typografia z /style.css. */

.testy-wrap {
  flex: 1 0 auto;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.testy-naglowek {
  font-size: 20px;
  margin: 32px 0 14px;
}

.testy-grupa {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--acc);
  text-align: left;
  margin: 28px 0 12px;
}

/* ---------- ekran startowy ---------- */

.testy-przedmiot {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--acc);
  border: 1px solid rgba(79, 195, 247, .4);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 12px;
}

.testy-wrap h1 {
  font-size: clamp(24px, 5.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -.01em;
}

.testy-meta {
  margin-top: 12px;
  color: var(--dim);
  font-size: 14px;
}

.testy-tryby {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.testy-tryb {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), #101d30);
}

.testy-tryb h3 { font-size: 20px; }
.testy-tryb p { font-size: 15px; flex: 1; }
.testy-tryb button { width: 100%; min-height: 48px; }

.testy-historia {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.testy-historia li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--dim);
  font-size: 14px;
}

/* ---------- ekran pytania ---------- */

.testy-stan {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.testy-licznik { font-size: 15px; font-weight: 600; }

.testy-zegar {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
  color: var(--acc);
  border: 1px solid rgba(79, 195, 247, .4);
  border-radius: 999px;
  padding: 4px 12px;
}

.testy-zegar.is-malo { color: var(--bad); border-color: rgba(255, 138, 128, .5); }

.testy-postep {
  height: 6px;
  border-radius: 999px;
  background: #0d1929;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 18px;
}

.testy-postep-wypelnienie {
  height: 100%;
  width: 0;
  background: var(--acc);
  transition: width .25s ease;
}

.testy-karta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  text-align: left;
}

.testy-tresc { font-size: 19px; line-height: 1.45; margin-bottom: 16px; }

.testy-rysunek {
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.testy-rysunek img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

.testy-odpowiedzi { display: flex; flex-direction: column; gap: 10px; }

.testy-odp {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 14px 16px;
  text-align: left;
  font-weight: 400;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1929;
  color: var(--fg);
}

.testy-odp:hover:not(:disabled) { background: #17293f; border-color: rgba(79, 195, 247, .5); filter: none; }
.testy-odp:disabled { opacity: 1; }

.testy-odp-litera {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(79, 195, 247, .12);
  color: var(--acc);
  font-weight: 700;
}

.testy-odp.is-wybrana { border-color: var(--acc); background: rgba(79, 195, 247, .12); }
.testy-odp.is-wybrana .testy-odp-litera { background: var(--acc); color: #071320; }

.testy-odp.is-dobra { border-color: #6fd39a; background: rgba(111, 211, 154, .12); }
.testy-odp.is-dobra .testy-odp-litera { background: #6fd39a; color: #071320; }

.testy-odp.is-zla { border-color: var(--bad); background: rgba(255, 138, 128, .1); }
.testy-odp.is-zla .testy-odp-litera { background: var(--bad); color: #071320; }

.testy-odzew {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
}

.testy-odzew.is-dobra { border-color: rgba(111, 211, 154, .5); background: rgba(111, 211, 154, .1); }
.testy-odzew.is-zla { border-color: rgba(255, 138, 128, .45); background: rgba(255, 138, 128, .08); }

.testy-zrodlo { display: block; margin-top: 8px; color: var(--dim); font-size: 13px; }

.testy-nawigacja {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.testy-nawigacja #p-dalej { margin-left: auto; min-height: 48px; }
.testy-nawigacja .ghost { min-height: 48px; }

/* ---------- ekran wyniku ---------- */

.testy-werdykt {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.testy-werdykt.is-dobra { color: #6fd39a; border: 1px solid rgba(111, 211, 154, .5); background: rgba(111, 211, 154, .12); }
.testy-werdykt.is-zla { color: var(--bad); border: 1px solid rgba(255, 138, 128, .5); background: rgba(255, 138, 128, .1); }

.testy-akcje { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.testy-akcje button { min-height: 48px; }

.testy-ok {
  margin-top: 18px;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid rgba(111, 211, 154, .5);
  background: rgba(111, 211, 154, .1);
  color: #6fd39a;
  font-size: 15px;
}

#w-form { margin-top: 20px; }

.testy-blad {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--bad);
  border-radius: 0 12px 12px 0;
  background: var(--panel);
  margin-bottom: 10px;
}

.testy-blad-tresc { font-size: 16px; margin-bottom: 10px; }
.testy-blad-twoja { color: var(--bad); font-size: 15px; }
.testy-blad-dobra { color: #6fd39a; font-size: 15px; }

/* Widoczny focus wszędzie, bo test da się przejść samą klawiaturą. */
.testy-wrap button:focus-visible,
.testy-wrap input:focus-visible {
  outline: 3px solid var(--acc-2);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .testy-wrap { padding: 14px 14px 36px; }
  .testy-karta { padding: 16px 14px; }
  .testy-tresc { font-size: 17px; }
  .testy-odp { min-height: 64px; font-size: 16px; padding: 12px 14px; }

  /* Globalne button{width:100%} rozjechałoby pasek nawigacji na dwa rzędy. */
  .testy-nawigacja { flex-wrap: wrap; }
  .testy-nawigacja button { flex: 1 1 45%; width: auto; }
  .testy-akcje button { flex: 1 1 100%; width: auto; }
  .testy-grupa { margin-top: 22px; }
}
