/* ===== Defaults (fallback) ===== */
:root {
  --qo-bg: #ffffff;
  --qo-text: #0f172a;
  --qo-subtle: #6b7280;
  --qo-muted: #94a3b8;

  --qo-accent-1: #ff7a1a;
  --qo-accent-2: #ff5a00;
  --qo-accent-press: #e04e00;

  --qo-ghost-bg: #fff8f3;
  --qo-ghost-ring: #ffd7c0;

  --qo-backdrop: rgba(17,24,39,.50);
  --qo-ring: rgba(37,99,235,.55);
}

/* ===== Paletas ===== */
/* SUNSET (laranjas quentes) */
.qo--sunset{
  --qo-bg: #ffffff;
  --qo-text: #0f172a;
  --qo-subtle: #6b7280;
  --qo-muted: #94a3b8;

  --qo-accent-1: #ff7a1a;
  --qo-accent-2: #ff5a00;
  --qo-accent-press: #e04e00;

  --qo-ghost-bg: #fff8f3;
  --qo-ghost-ring: #ffd7c0;

  --qo-backdrop: rgba(17,24,39,.50);
  --qo-ring: rgba(37,99,235,.55);
}

/* MINT (verdes frescos) */
.qo--mint{
  --qo-bg: #f7fffb;
  --qo-text: #0f2d23;
  --qo-subtle: #3c6e59;
  --qo-muted: #7aa89a;

  --qo-accent-1: #2fd19a;
  --qo-accent-2: #19b883;
  --qo-accent-press: #14956b;

  --qo-ghost-bg: #e9fff5;
  --qo-ghost-ring: #c8f7e3;

  --qo-backdrop: rgba(6, 31, 24, .50);
  --qo-ring: rgba(16,185,129,.45);
}

/* ROYAL (azul/violeta premium) */
.qo--royal{
  --qo-bg: #f8f9ff;
  --qo-text: #1f2547;
  --qo-subtle: #4b5581;
  --qo-muted: #7b84b3;

  --qo-accent-1: #6370ff;
  --qo-accent-2: #4a57d6;
  --qo-accent-press: #3b46b2;

  --qo-ghost-bg: #eef0ff;
  --qo-ghost-ring: #d5dafd;

  --qo-backdrop: rgba(15, 18, 46, .50);
  --qo-ring: rgba(99,102,241,.45);
}

/* SLATE (neutro minimalista) */
.qo--slate{
  --qo-bg: #ffffff;
  --qo-text: #111827;
  --qo-subtle: #6b7280;
  --qo-muted: #9ca3af;

  --qo-accent-1: #6b7280;
  --qo-accent-2: #4b5563;
  --qo-accent-press: #3f4550;

  --qo-ghost-bg: #f3f4f6;
  --qo-ghost-ring: #e5e7eb;

  --qo-backdrop: rgba(17,24,39,.50);
  --qo-ring: rgba(59,130,246,.45);
}

/* ===== Base: trava a página ===== */
.qo-lock { overflow: hidden; }

/* ===== Overlay ===== */
.qo{
  position: fixed; inset: 0; z-index: 2147483647;
  display: grid; place-items: center;
}
.qo__backdrop{
  position: absolute; inset: 0;
  background: var(--qo-backdrop);
  backdrop-filter: blur(6px) saturate(1.1);
}

/* ===== Card ===== */
.qo__card {
  position: relative;
  width: min(92vw, 560px);
  background: var(--qo-bg);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,.12), 0 2px 10px rgba(0,0,0,.06);
  padding: 26px 24px 20px;
  text-align: center;
  transform: translateZ(0);
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* ===== Barra de progresso ===== */
.qo__bar {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  overflow: hidden;
}
.qo__bar__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg,var(--qo-accent-1),var(--qo-accent-2));
  transition: width .35s ease;
}

/* ===== Header ===== */
.qo__progress {
  font-size: 12px;
  color: var(--qo-subtle);
  margin-top: 8px;
  margin-bottom: 4px;
}
.qo__title {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--qo-text);
  margin: 4px 0 16px;
  letter-spacing: .2px;
}

/* ===== Opções ===== */
.qo__options {
  display: grid;
  gap: 12px;
  text-align: left;
  word-wrap: break-word;
}

.qo__btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  text-decoration: none;
  text-align: center;
  font-weight: 800;
  letter-spacing: .2px;
  color: #fff;
  background: linear-gradient(180deg, var(--qo-accent-1), var(--qo-accent-2));
  box-shadow: 0 6px 0 var(--qo-accent-press), 0 8px 18px rgba(0,0,0,.12);
  transition: transform .04s ease, filter .2s ease, box-shadow .2s ease;
  box-sizing: border-box;
  white-space: normal; /* Permite a quebra das palavras longas */
}

.qo__btn:hover {
  filter: brightness(.98);
}

.qo__btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 0 var(--qo-accent-press), 0 6px 12px rgba(0,0,0,.12);
}

.qo__btn--ghost {
  background: var(--qo-ghost-bg);
  color: var(--qo-accent-2);
  box-shadow: inset 0 0 0 2px var(--qo-ghost-ring);
}

.qo__btn--ghost:hover {
  filter: none;
  background: color-mix(in srgb, var(--qo-ghost-bg) 92%, #000 8%);
}

.qo__btn--ghost:active {
  transform: translateY(1px);
}

/* ===== Rodapé ===== */
.qo__footer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--qo-muted);
}

/* ===== Loading ===== */
.qo__loading {
  padding: 22px 0 10px;
  text-align: center;
}
.qo__dots {
  display: inline-flex;
  gap: 10px;
  margin: 4px 0 10px;
}
.qo__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--qo-accent-2);
  opacity: .85;
  animation: qo-blink 1s infinite;
}
.qo__dots i:nth-child(2) {
  animation-delay: .15s;
}
.qo__dots i:nth-child(3) {
  animation-delay: .3s;
}
@keyframes qo-blink {
  0%,80%,100%{opacity:.25}
  40%{opacity:1}
}
.qo__loadingText {
  color: var(--qo-accent-2);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.35;
}

/* ===== Foco acessível para <a> e <button> ===== */
.qo .qo__btn:focus {
  outline: none;
}
.qo .qo__btn:focus-visible {
  box-shadow:
    0 0 0 3px var(--qo-ring),
    inset 0 0 0 2px rgba(255,255,255,.85),
    0 6px 0 var(--qo-accent-press),
    0 8px 18px rgba(37,99,235,.12);
  border-radius: 14px;
}

/* ===== Pequenas telas ===== */
@media (max-width: 380px) {
  .qo__card {
    padding: 22px 16px 18px;
    width: min(94vw, 560px);
  }
  .qo__title {
    font-size: 20px;
  }
  .qo__btn {
    padding: 12px 14px;
  }
}

/* === ROSA (pink) === */
.qo--pink .qo__bar__fill {
  background: linear-gradient(90deg, #ff2d7a, #ff8bb0);
}
.qo--pink .qo__btn {
  background: #ff2d7a;
  border-color: #ff2d7a;
  color: #fff;
}
.qo--pink .qo__btn:hover {
  filter: brightness(0.94);
}
.qo--pink .qo__btn--ghost {
  background: #ffe7f0;
  border-color: transparent;
  color: #b21652;
}
.qo--pink .qo__title, .qo--pink .qo__progress {
  color: #3a0a21;
}
.qo--pink .qo__backdrop {
  background: rgba(255, 45, 122, .25);
}
.qo--pink .qo__dots i {
  background: #ff2d7a;
}

/* === ROXO (purple) === */
.qo--purple .qo__bar__fill {
  background: linear-gradient(90deg, #7e3ff2, #b78cff);
}
.qo--purple .qo__btn {
  background: #7e3ff2;
  border-color: #7e3ff2;
  color: #fff;
}
.qo--purple .qo__btn:hover {
  filter: brightness(0.94);
}
.qo--purple .qo__btn--ghost {
  background: #efe7ff;
  border-color: transparent;
  color: #4a21a8;
}
.qo--purple .qo__title, .qo--purple .qo__progress {
  color: #2a1263;
}
.qo--purple .qo__backdrop {
  background: rgba(126, 63, 242, .25);
}
.qo--purple .qo__dots i {
  background: #7e3ff2;
}

/* === BORDÔ (bordo) === */
.qo--bordo .qo__bar__fill {
  background: linear-gradient(90deg, #6b0f1a, #b91337);
}
.qo--bordo .qo__btn {
  background: #b91337;
  border-color: #b91337;
  color: #fff;
}
.qo--bordo .qo__btn:hover {
  filter: brightness(0.94);
}
.qo--bordo .qo__btn--ghost {
  background: #fde4e8;
  border-color: transparent;
  color: #6b0f1a;
}
.qo--bordo .qo__title, .qo--bordo .qo__progress {
  color: #3f0a12;
}
.qo--bordo .qo__backdrop {
  background: rgba(185, 19, 55, .22);
}
.qo--bordo .qo__dots i {
  background: #b91337;
}

/* === VERMELHO PAIXÃO (passion) === */
.qo--passion .qo__bar__fill {
  background: linear-gradient(90deg, #ff003d, #ff6b81);
}
.qo--passion .qo__btn {
  background: #ff003d;
  border-color: #ff003d;
  color: #fff;
}
.qo--passion .qo__btn:hover {
  filter: brightness(0.94);
}
.qo--passion .qo__btn--ghost {
  background: #ffe3e8;
  border-color: transparent;
  color: #9c0a24;
}
.qo--passion .qo__title, .qo--passion .qo__progress {
  color: #680614;
}
.qo--passion .qo__backdrop {
  background: rgba(255, 0, 61, .22);
}
.qo--passion .qo__dots i {
  background: #ff003d;
}
/* ---------------- ROLETINHA ---------------- */
.qo__wheelWrap {
  margin: 18px auto 12px;
  width: 260px;
  height: 260px;
  position: relative;
}

.qo__wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  background: #ccc; /* sobrescrito via JS com conic-gradient */
}

.qo__wheel::before {
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.9);
}

/* ponteiro preto apontando pra baixo */
.qo__wheelPointer {
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid #111;
}

/* textos nas fatias, na borda */
.qo__wheelLabel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 50% 50%;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
  white-space: nowrap;
  pointer-events: none;
}
/* Adicione isso no final do seu arquivo overlay.css */

/* ---------------- ROLETA MAIOR ---------------- */
.qo__wheelWrap {
  margin: 18px auto 12px;
  width: 340px;
  height: 340px;
  position: relative;
}

.qo__wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: visible; /* IMPORTANTE: visible para os textos aparecerem */
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  background: #ccc;
}

.qo__wheel::before {
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.9);
}

/* Ponteiro maior */
.qo__wheelPointer {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 22px solid #111;
}

/* Textos nas fatias - BASE */
.qo__wheelLabel {
  position: absolute;
  left: 50%;
  top: 50%;
  white-space: normal;
  word-break: break-word;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  pointer-events: none;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7), 0 0 8px rgba(0,0,0,0.3);
  max-width: 85px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Posições individuais para cada fatia (6 fatias) - CORRIGIDO */
/* Fatia 0: topo (0°) - centro em 30° */
.qo__wheelLabel[data-wheel-index="0"] {
  transform: translate(-50%, -50%) translate(52.5px, -90.93px) rotate(-60deg);
}
/* Fatia 1: direita-superior (60°) - centro em 90° */
.qo__wheelLabel[data-wheel-index="1"] {
  transform: translate(-50%, -50%) translate(105px, 0px) rotate(0deg);
}
/* Fatia 2: direita-inferior (120°) - centro em 150° */
.qo__wheelLabel[data-wheel-index="2"] {
  transform: translate(-50%, -50%) translate(52.5px, 90.93px) rotate(60deg);
}
/* Fatia 3: baixo (180°) - centro em 210° */
.qo__wheelLabel[data-wheel-index="3"] {
  transform: translate(-50%, -50%) translate(-52.5px, 90.93px) rotate(120deg);
}
/* Fatia 4: esquerda-inferior (240°) - centro em 270° */
.qo__wheelLabel[data-wheel-index="4"] {
  transform: translate(-50%, -50%) translate(-105px, 0px) rotate(180deg);
}
/* Fatia 5: esquerda-superior (300°) - centro em 330° */
.qo__wheelLabel[data-wheel-index="5"] {
  transform: translate(-50%, -50%) translate(-52.5px, -90.93px) rotate(240deg);
}

/* Ajustar em telas pequenas */
@media (max-width: 480px) {
  .qo__wheelWrap {
    width: 300px;
    height: 300px;
  }
  
  .qo__wheelLabel {
    font-size: 14px;
    max-width: 80px;
  }
  
  /* Posições ajustadas para roleta menor */
  .qo__wheelLabel[data-wheel-index="0"] {
    transform: translate(-50%, -50%) translate(46px, -79.67px) rotate(-60deg);
  }
  .qo__wheelLabel[data-wheel-index="1"] {
    transform: translate(-50%, -50%) translate(92px, 0px) rotate(0deg);
  }
  .qo__wheelLabel[data-wheel-index="2"] {
    transform: translate(-50%, -50%) translate(46px, 79.67px) rotate(60deg);
  }
  .qo__wheelLabel[data-wheel-index="3"] {
    transform: translate(-50%, -50%) translate(-46px, 79.67px) rotate(120deg);
  }
  .qo__wheelLabel[data-wheel-index="4"] {
    transform: translate(-50%, -50%) translate(-92px, 0px) rotate(180deg);
  }
  .qo__wheelLabel[data-wheel-index="5"] {
    transform: translate(-50%, -50%) translate(-46px, -79.67px) rotate(240deg);
  }
  
  .qo__wheelPointer {
    top: -16px;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 20px solid #111;
  }
}
/* ============================================
   QUIZ VISUAL - FONTE MAIOR NOS LABELS
   ============================================ */

.qo__step--visual {
  overflow: visible !important;
}

.qo__step--visual .qo__options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
}

.qo__visualOption {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.qo__visualOption:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: var(--qo-accent-1);
}

.qo__visualOption:active {
  transform: scale(0.98);
}

.qo__visualImageWrap {
  position: relative;
  width: 100%;
  padding-bottom: 120%;
  overflow: hidden;
  background: #f8f9fa;
}

.qo__visualImage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.qo__visualLabel {
  padding: 12px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #fff;
  background: #2d3748;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.qo__visualOption:focus {
  outline: none;
  border-color: var(--qo-accent-1);
  box-shadow: 0 0 0 3px var(--qo-ring), 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Mobile: FONTE MAIOR */
@media (max-width: 640px) {
  .qo__step--visual .qo__options {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-left: -4px;
    margin-right: -4px;
    margin-top: 12px;
  }
  
  .qo__visualOption {
    border-radius: 6px;
  }
  
  .qo__visualImageWrap {
    padding-bottom: 110%;
  }
  
  .qo__visualLabel {
    padding: 9px 6px;
    font-size: 10.5px;
    min-height: 36px;
    font-weight: 800;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .qo__step--visual .qo__options {
    max-width: 100%;
  }
}

/* Temas */
.qo--sunset .qo__visualLabel {
  background: linear-gradient(180deg, var(--qo-accent-1), var(--qo-accent-2));
}

.qo--mint .qo__visualLabel {
  background: linear-gradient(180deg, var(--qo-accent-1), var(--qo-accent-2));
}

.qo--royal .qo__visualLabel {
  background: linear-gradient(180deg, var(--qo-accent-1), var(--qo-accent-2));
}

.qo--pink .qo__visualLabel {
  background: linear-gradient(180deg, #ff2d7a, #ff1565);
}

.qo--purple .qo__visualLabel {
  background: linear-gradient(180deg, #7e3ff2, #6930d6);
}

.qo--bordo .qo__visualLabel {
  background: linear-gradient(180deg, #b91337, #9a0f2e);
}

.qo--passion .qo__visualLabel {
  background: linear-gradient(180deg, #ff003d, #e0002e);
}

.qo--slate .qo__visualLabel {
  background: linear-gradient(180deg, #64748b, #475569);
}