/* ============================================
   Test spremnosti
   templates/part/test-spremnosti.twig
   ============================================ */

.test-spremnosti .ts-box {
  position: relative;
  overflow: hidden;
  padding: 28px 22px;
  border-radius: 28px;
  background-color: var(--grey-faint);
  color: #2b2d36;
}

.test-spremnosti .ts-eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--orange-dark);
  font-family: var(--h-font), system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.test-spremnosti .ts-title {
  margin-bottom: 0.75rem;
  color: var(--blvck);
  font-weight: 800;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
  line-height: 1.15;
}

.test-spremnosti .ts-lead {
  max-width: 720px;
  margin-bottom: 0;
  color: #555c6e;
  font-size: 1.08rem;
}

.test-spremnosti .ts-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: #555c6e;
  font-size: 0.92rem;
}

.test-spremnosti .ts-meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.test-spremnosti .ts-meta i {
  color: var(--orange-dark);
}

/* ============================================
   Pitanja
   ============================================ */

.test-spremnosti .ts-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: #555c6e;
  font-family: var(--h-font), system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}

.test-spremnosti .ts-bar {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background-color: #c9ced8;
}

.test-spremnosti .ts-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--orange-dark), var(--orange-light));
  transition: width 0.3s ease;
}

.test-spremnosti .ts-q {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.test-spremnosti .ts-q legend {
  float: none;
  margin-bottom: 16px;
  padding: 0;
  color: var(--blvck);
  font-family: var(--h-font), system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.55rem);
  line-height: 1.25;
}

.test-spremnosti .ts-opts {
  display: grid;
  gap: 10px;
}

.test-spremnosti .ts-opt {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.test-spremnosti .ts-opt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.test-spremnosti .ts-opt span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  border: 1.5px solid #c9ced8;
  border-radius: 14px;
  background-color: var(--white);
  color: #2b2d36;
  font-size: 1rem;
  line-height: 1.35;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.test-spremnosti .ts-opt span::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid #8a90a0;
  border-radius: 50%;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.test-spremnosti .ts-opt:hover span {
  border-color: var(--grey-clay);
}

.test-spremnosti .ts-opt input:focus-visible + span {
  outline: 3px solid var(--orange-dark);
  outline-offset: 2px;
}

.test-spremnosti .ts-opt input:checked + span {
  border-color: var(--orange-dark);
  background-color: rgba(255, 115, 25, 0.1);
}

.test-spremnosti .ts-opt input:checked + span::before {
  border-color: var(--orange-dark);
  box-shadow:
    inset 0 0 0 4px var(--white),
    inset 0 0 0 10px var(--orange-dark);
}

.test-spremnosti .ts-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.test-spremnosti .ts-link-btn {
  padding: 8px 0;
  border: 0;
  background: none;
  color: #555c6e;
  font: inherit;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.test-spremnosti .ts-link-btn:hover {
  color: var(--blvck);
}

.test-spremnosti [hidden] {
  display: none !important;
}

/* Bez JS-a sva pitanja stoje jedno ispod drugog, bez trake i dugmadi. */
.test-spremnosti .ts-box.is-js .ts-q {
  display: none;
}

.test-spremnosti .ts-box.is-js .ts-q.is-active {
  display: block;
}

.test-spremnosti .ts-box:not(.is-js) .ts-progress,
.test-spremnosti .ts-box:not(.is-js) .ts-nav {
  display: none;
}

.test-spremnosti .ts-box:not(.is-js) .ts-q {
  margin-top: 26px;
}

/* ============================================
   Rezultat
   ============================================ */

.test-spremnosti .ts-res {
  display: grid;
  gap: 22px;
  margin-top: 28px;
  outline: none;
}

.test-spremnosti .ts-res-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

.test-spremnosti .ts-res-score > div:last-child {
  flex: 1 1 220px;
}

.test-spremnosti .ts-ring {
  --p: 0;
  display: grid;
  flex: none;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--orange-dark) calc(var(--p) * 1%), #c9ced8 0);
}

.test-spremnosti .ts-ring b {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background-color: var(--grey-faint);
  color: var(--blvck);
  font-family: var(--h-font), system-ui, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
}

.test-spremnosti .ts-res-title {
  margin-bottom: 0;
  color: var(--blvck);
  font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.8rem);
  font-weight: 800;
}

.test-spremnosti .ts-res-text {
  margin: 6px 0 0;
  color: #555c6e;
}

.test-spremnosti .ts-res-prog {
  padding: 18px 20px;
  border: 1.5px solid var(--orange-dark);
  border-radius: 18px;
  background-color: var(--white);
}

.test-spremnosti .ts-res-prog small {
  display: block;
  margin-bottom: 4px;
  color: #b84a00;
  font-family: var(--h-font), system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.test-spremnosti .ts-res-prog strong {
  color: var(--blvck);
  font-family: var(--h-font), system-ui, sans-serif;
  font-size: 1.3rem;
}

.test-spremnosti .ts-res-prog p {
  margin: 4px 0 0;
  color: #555c6e;
  font-size: 0.95rem;
}

.test-spremnosti .ts-res-tips {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.test-spremnosti .ts-res-tips li {
  position: relative;
  padding-left: 30px;
  font-size: 0.98rem;
}

/* Kvačica kao CSS — stavke pravi JS, pa ne zavise od subseta ikonica. */
.test-spremnosti .ts-res-tips li::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 4px;
  width: 8px;
  height: 14px;
  border: solid var(--orange-dark);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.test-spremnosti .ts-res-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.test-spremnosti .ts-res-link {
  color: #b84a00;
  font-family: var(--h-font), system-ui, sans-serif;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.test-spremnosti .ts-res-link:hover {
  color: var(--blvck);
}

@media (min-width: 640px) {
  .test-spremnosti .ts-opts {
    grid-template-columns: 1fr 1fr;
  }

  .test-spremnosti .ts-box {
    padding: 40px;
  }
}

@media (min-width: 960px) {
  .test-spremnosti .ts-box {
    padding: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .test-spremnosti .ts-bar i,
  .test-spremnosti .ts-opt span {
    transition: none;
  }
}
