/*
 * OurCare — quiz "How does your care compare to the OurCare Standard?".
 * Port de las clases Tailwind de quiz/+page.svelte del repo ourcare-svelte.
 * Todo bajo .oc-quiz para no tocar nada del tema de Squarespace.
 *
 * Diferencia deliberada con el original: las pantallas NO van en position:absolute.
 * El original las superponia para hacer crossfade, y por eso el iframe necesitaba una
 * altura fija de 850px. En flujo normal la altura la da el contenido, que es lo que evita
 * los numeros magicos que se rompian con cada cambio de plantilla.
 */

.oc-quiz {
  --ocq-bg: #5df4c3;
  --ocq-accent: #566aff;
  --ocq-option: #b7ffe8;
  --ocq-radius: 40px;

  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
  padding: 3rem 1rem;
  background: var(--ocq-bg);
  font-family: "Poppins", var(--sqs-site-font-family, system-ui), sans-serif;
  color: #000;
  box-sizing: border-box;
}
.oc-quiz *,
.oc-quiz *::before,
.oc-quiz *::after { box-sizing: border-box; }

/* Forma decorativa del original, abajo a la izquierda. */
.oc-quiz::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 260px;
  height: 300px;
  background: url("quiz-bg.svg") left bottom / contain no-repeat;
  pointer-events: none;
}

.oc-quiz__screen {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: ocq-fade 0.6s ease both;
}
@keyframes ocq-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .oc-quiz__screen { animation: none; }
}

/* ------------------------------------------------------------------ portada */

.oc-quiz__cover-img {
  width: 100px;
  height: 100px;
  margin-bottom: 2rem;
}

.oc-quiz__title {
  text-align: center;
  font-size: 1.875rem;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 2rem;
}
.oc-quiz__title em {
  font-style: normal;
  color: var(--ocq-accent);
}

/* ------------------------------------------------------------------ pregunta */

.oc-quiz__question {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 2rem;
  width: 90%;
}

.oc-quiz__card {
  width: 100%;
  border: 4px solid var(--ocq-accent);
  border-radius: var(--ocq-radius);
  margin-bottom: 2rem;
}

.oc-quiz__options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 1rem;
  padding: 2rem 1.5rem;
}
.oc-quiz__options--single { grid-template-columns: 1fr; }

.oc-quiz__option {
  width: 100%;
  padding: 1.25rem 0.5rem;
  text-align: center;
  text-transform: uppercase;
  font-family: inherit;
  font-weight: 700;
  color: var(--ocq-accent);
  background: var(--ocq-option);
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
}
.oc-quiz__option[aria-pressed="true"] { background: #fff; }
.oc-quiz__option:focus-visible,
.oc-quiz__cta:focus-visible,
.oc-quiz__link:focus-visible { outline: 3px solid #0a0a0a; outline-offset: 3px; }

/* Texto de respuesta, separado por la misma linea gruesa del original. */
.oc-quiz__response {
  text-align: center;
  border-top: 4px solid var(--ocq-accent);
  padding: 1.25rem 1rem 1.5rem;
  font-size: 1rem;
  animation: ocq-fade 0.6s ease both;
}

/* ------------------------------------------------------- botones y enlaces */

.oc-quiz__cta {
  width: 12rem;
  padding: 1.25rem 0;
  text-align: center;
  text-transform: uppercase;
  font-family: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--ocq-accent);
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  animation: ocq-fade 0.6s ease both;
}

.oc-quiz__result-text {
  text-align: center;
  font-size: 1rem;
  margin: 0 0 2rem;
  max-width: 46rem;
}

.oc-quiz__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.oc-quiz__link {
  display: block;
  width: 100%;
  max-width: 351px;
  padding: 1.25rem 1rem;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  background: var(--ocq-accent);
  border-radius: 9999px;
  text-decoration: none;
}

.oc-quiz__retake {
  width: 100%;
  max-width: 351px;
  padding: 1.25rem 1rem;
  text-align: center;
  text-transform: uppercase;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--ocq-accent);
  background: #fff;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
}

/* ---------------------------------------------------------------- responsive */

@media (min-width: 1024px) {
  .oc-quiz { min-height: 660px; padding: 4rem 2rem; }
  .oc-quiz::before { width: 420px; height: 500px; }
  .oc-quiz__card { border-radius: 80px; }
  .oc-quiz__options { gap: 0 27px; padding: 39px 57px; }
  .oc-quiz__response { padding: 39px 57px; }
  .oc-quiz__links { flex-direction: row; justify-content: center; }
  .oc-quiz__link, .oc-quiz__retake { max-width: 300px; }
}

@media (min-width: 1280px) {
  .oc-quiz__cover-img { width: 200px; height: 200px; }
  .oc-quiz__title { font-size: 3.75rem; margin-bottom: 1.5rem; }
  .oc-quiz__question { font-size: 3rem; line-height: 60px; margin-bottom: 3rem; }
  .oc-quiz__option, .oc-quiz__cta { font-size: 1.125rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .oc-quiz__cta { width: 250px; }
  .oc-quiz__response, .oc-quiz__result-text { font-size: 1.25rem; }
  .oc-quiz__link, .oc-quiz__retake { font-size: 1.125rem; }
}
