#qrw-overlay {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: qrw-fadeIn 0.5s forwards;
}

@keyframes qrw-fadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes qrw-fadeOut {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

#qrw-overlay.qrw-fade-out {
    animation: qrw-fadeOut 0.3s ease-out forwards;
}

#qrw-modal {
    background-color: var(--qrw-bg-color, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 420px;
    max-height: 70vh;
    overflow: hidden;
    position: relative;
    animation: qrw-slideUp 0.4s ease-out;
}

@keyframes qrw-slideUp {
    0%   { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.qrw-progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #eee;
}

.qrw-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--qrw-primary-color, #6B21A8);
    border-radius: 0 3px 3px 0;
    transition: width 0.4s ease;
}

.qrw-content {
    padding: 30px 24px;
    text-align: center;
}

.qrw-question {
    font-size: 20px;
    font-weight: 600;
    color: var(--qrw-text-color, #333333);
    margin-bottom: 24px;
    line-height: 1.4;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrw-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#qrw-overlay .qrw-option,
.qrw-option {
    background-color: var(--qrw-primary-color, #6B21A8) !important;
    background-image: none !important;
    color: var(--qrw-secondary-color, #FFFFFF) !important;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    border: none;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
}

#qrw-overlay .qrw-option:hover,
#qrw-overlay .qrw-option:focus,
.qrw-option:hover,
.qrw-option:focus {
    background-color: var(--qrw-primary-color, #6B21A8) !important;
    color: var(--qrw-secondary-color, #FFFFFF) !important;
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: none;
    outline: none;
}

.qrw-option:active {
    transform: translateY(1px);
}

.qrw-loading-screen {
    display: none;
    padding: 40px 24px 60px;
    text-align: center;
}

.qrw-loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    margin-top: 30px;
}

.qrw-loading-dots span {
    width: 10px;
    height: 10px;
    background-color: var(--qrw-primary-color, #6B21A8);
    border-radius: 50%;
    animation: qrw-bounce 1.2s infinite ease-in-out;
}

.qrw-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.qrw-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes qrw-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.3;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.qrw-loading-text {
    font-size: 18px;
    color: var(--qrw-primary-color, #6B21A8);
    animation: qrw-pulse 1.5s infinite;
}

@keyframes qrw-pulse {
    0%   { opacity: 0.3; }
    50%  { opacity: 1; }
    100% { opacity: 0.3; }
}

.qrw-result-screen {
    display: none;
    padding: 30px 24px;
    text-align: center;
}

.qrw-result-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--qrw-text-color, #333333);
    margin-bottom: 12px;
    line-height: 1.3;
}

.qrw-result-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

#qrw-overlay .qrw-reward-button,
.qrw-reward-button {
    background-color: var(--qrw-primary-color, #6B21A8) !important;
    background-image: none !important;
    color: var(--qrw-secondary-color, #FFFFFF) !important;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    border: none;
    width: 100%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}

#qrw-overlay .qrw-reward-button:hover,
#qrw-overlay .qrw-reward-button:focus,
.qrw-reward-button:hover,
.qrw-reward-button:focus {
    background-color: var(--qrw-primary-color, #6B21A8) !important;
    color: var(--qrw-secondary-color, #FFFFFF) !important;
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: none;
    outline: none;
}

.qrw-reward-button:active {
    transform: translateY(1px);
}

.qrw-reward-button svg {
    flex-shrink: 0;
}

.qrw-button-subtext {
    font-size: 13px;
    color: #999;
    margin-top: 12px;
}

#qrw-spinner-overlay {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: qrw-fadeIn 0.5s forwards;
}

#qrw-spinner-overlay.qrw-fade-out {
    animation: qrw-fadeOut 0.3s ease-out forwards;
}

.qrw-spinner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qrw-spinner-svg {
    width: 7rem;
    height: 7rem;
    animation: qrw-spin 1s linear infinite;
}

.qrw-spinner-svg .qrw-spinner-track {
    opacity: 0.25;
}

.qrw-spinner-svg .qrw-spinner-fill {
    opacity: 0.75;
}

@keyframes qrw-spin {
    to { transform: rotate(360deg); }
}

.qrw-spinner-text {
    font-family: Verdana, Geneva, sans-serif;
    color: transparent;
    padding: 0.5rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.15rem;
    animation: qrw-spinnerTextIn 1s ease-in-out forwards, qrw-pulse 2s ease-in-out infinite 1s;
}

@keyframes qrw-spinnerTextIn {
    0%   { color: transparent; }
    100% { color: var(--qrw-text-color, #333333); }
}

body.qrw-page-blocked {
    overflow: hidden !important;
}

@media (max-width: 480px) {
    #qrw-modal {
        max-width: 95%;
        max-height: 75vh;
    }

    .qrw-content {
        padding: 20px 16px;
    }

    .qrw-question {
        font-size: 18px;
        min-height: 48px;
    }

    .qrw-option {
        padding: 12px 16px;
        font-size: 14px;
    }

    .qrw-result-title {
        font-size: 20px;
    }
}

/* ---------------------------------------------------------------------
   Tema "verde" — visual de funil: fundo claro, título forte e opções
   em barras verdes de largura total. Vem depois das regras base, então
   sobrescreve as cores vindas das configurações.
   --------------------------------------------------------------------- */

.qrw-overlay {
    background: #f4f6f8;
}

.qrw-modal {
    background: transparent;
    box-shadow: none;
    max-width: 600px;
    padding: 20px 16px;
}

.qrw-question,
.qrw-result-title {
    color: #16202b;
    font-size: clamp(21px, 4.6vw, 27px);
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-wrap: balance;
}

.qrw-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
}

.qrw-option {
    background: #1e6b3a;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
    color: #ffffff;
    cursor: pointer;
    display: block;
    font-size: 16px;
    font-weight: 700;
    padding: 17px 18px;
    text-align: center;
    transition: background .18s ease, transform .18s ease;
    width: 100%;
}

.qrw-option:hover,
.qrw-option:focus-visible {
    background: #175730;
    transform: translateY(-1px);
}

.qrw-option:focus-visible {
    outline: 3px solid #16202b;
    outline-offset: 2px;
}

.qrw-reward-button {
    background: #1e6b3a;
    border: none;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(30, 107, 58, .32);
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .02em;
    margin: 18px auto 10px;
    padding: 16px 34px;
    text-transform: uppercase;
    transition: background .18s ease, transform .18s ease;
}

.qrw-reward-button:hover,
.qrw-reward-button:focus-visible {
    background: #175730;
    transform: translateY(-1px);
}

.qrw-button-subtext {
    color: #6b7280;
    display: block;
    font-size: 14px;
    text-align: center;
}

.qrw-result-screen {
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .qrw-option,
    .qrw-reward-button {
        transition: none;
    }
}

/* ---------------------------------------------------------------------
   Opções com emoji: ícone num slot de largura fixa + texto alinhado.
   Assim todos os ícones ficam numa coluna e todos os textos começam
   no mesmo ponto, mesmo com emojis de larguras diferentes.
   --------------------------------------------------------------------- */

#qrw-overlay .qrw-option.qrw-has-icon,
.qrw-option.qrw-has-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
    padding-left: 22px;
    padding-right: 22px;
}

.qrw-option-icon {
    flex: 0 0 1.6em;
    width: 1.6em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15em;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    font-weight: 400;
    font-variant-emoji: emoji;
    text-rendering: optimizeSpeed;
    transform: translateY(-0.02em);
}

.qrw-option-text {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
}

@media (max-width: 480px) {
    #qrw-overlay .qrw-option.qrw-has-icon,
    .qrw-option.qrw-has-icon {
        gap: 10px;
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* =====================================================================
   Tema interativo (v1.7) — cartão branco, opções em "cartas" com letra
   ou emoji, seleção com pop + check, transição entre perguntas e botão
   final pulsando. Vem por último e com #qrw-overlay na frente para
   vencer as regras antigas (inclusive as com !important).
   ===================================================================== */

#qrw-overlay {
    --qrw-p: var(--qrw-primary-color, #177715);
    --qrw-p-soft: color-mix(in srgb, var(--qrw-p) 12%, #ffffff);
    --qrw-p-line: color-mix(in srgb, var(--qrw-p) 35%, #e5e7eb);
    --qrw-ink: #111827;
    --qrw-ink-2: #4b5563;
    font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--qrw-p) 14%, #f8fafc) 0%, rgba(248, 250, 252, .92) 60%) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px;
    box-sizing: border-box;
}

#qrw-overlay #qrw-modal {
    background: #ffffff !important;
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 24px 60px -12px rgba(17, 24, 39, .28);
    max-width: 460px;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 22px 22px 24px;
    box-sizing: border-box;
    animation: qrw-cardIn .5s cubic-bezier(.2, .9, .3, 1.2) both;
}

@keyframes qrw-cardIn {
    0%   { opacity: 0; transform: translateY(24px) scale(.96); }
    100% { opacity: 1; transform: none; }
}

/* Barra de progresso: trilho arredondado com brilho correndo */
#qrw-overlay .qrw-progress-bar-container {
    height: 10px;
    border-radius: 999px;
    background: #eef1f4;
    overflow: hidden;
}
#qrw-overlay .qrw-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--qrw-p), color-mix(in srgb, var(--qrw-p) 70%, #ffffff), var(--qrw-p)) !important;
    background-size: 200% 100% !important;
    animation: qrw-shine 1.8s linear infinite;
    transition: width .55s cubic-bezier(.2, .9, .3, 1.15);
    min-width: 6%;
}
@keyframes qrw-shine { to { background-position: -200% 0; } }

/* Contador "2 / 4" */
#qrw-overlay .qrw-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 18px auto 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--qrw-p-soft);
    color: var(--qrw-p);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
}
#qrw-overlay .qrw-step:empty { display: none; }

#qrw-overlay .qrw-content { padding: 0; text-align: center; }

#qrw-overlay .qrw-question {
    color: var(--qrw-ink) !important;
    font-size: clamp(21px, 5.4vw, 25px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.01em;
    min-height: 0;
    margin: 12px 0 20px;
    text-wrap: balance;
}

#qrw-overlay .qrw-options { gap: 10px; margin-top: 0; }

/* Opção: carta branca com borda, letra/emoji num círculo e check à direita */
#qrw-overlay .qrw-option,
#qrw-overlay .qrw-option.qrw-has-icon {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 48px 14px 14px !important;
    background: #ffffff !important;
    background-image: none !important;
    color: var(--qrw-ink) !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 16px;
    box-shadow: 0 2px 0 #e5e7eb;
    font-family: inherit;
    font-size: 16.5px;
    font-weight: 700 !important;
    line-height: 1.3;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    filter: none !important;
    transition: transform .18s cubic-bezier(.2, .9, .3, 1.3), border-color .18s, box-shadow .18s, background-color .25s, color .25s, opacity .25s;
    animation: qrw-optIn .42s cubic-bezier(.2, .9, .3, 1.2) both;
    animation-delay: calc(var(--i, 0) * 70ms + 60ms);
}
@keyframes qrw-optIn {
    0%   { opacity: 0; transform: translateY(14px) scale(.97); }
    100% { opacity: 1; transform: none; }
}

#qrw-overlay .qrw-option::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    box-sizing: border-box;
    transition: all .2s ease;
}

#qrw-overlay .qrw-option:hover,
#qrw-overlay .qrw-option:focus-visible {
    background: #ffffff !important;
    color: var(--qrw-ink) !important;
    border-color: var(--qrw-p-line) !important;
    box-shadow: 0 4px 0 var(--qrw-p-line), 0 10px 24px -10px color-mix(in srgb, var(--qrw-p) 45%, transparent);
    transform: translateY(-2px);
    outline: none;
}
#qrw-overlay .qrw-option:hover::after { border-color: var(--qrw-p); }
#qrw-overlay .qrw-option:active { transform: translateY(2px) scale(.99); box-shadow: 0 0 0 #e5e7eb; }

/* Selo da esquerda: letra (A, B, C…) ou o emoji da opção */
#qrw-overlay .qrw-option-badge,
#qrw-overlay .qrw-option-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: var(--qrw-p-soft);
    color: var(--qrw-p);
    font-size: 16px;
    font-weight: 800;
    transform: none;
    transition: background .2s, color .2s, transform .35s cubic-bezier(.2, .9, .3, 1.5);
}
#qrw-overlay .qrw-option-icon { font-size: 20px; }
#qrw-overlay .qrw-option:hover .qrw-option-badge,
#qrw-overlay .qrw-option:hover .qrw-option-icon { transform: rotate(-8deg) scale(1.08); }
#qrw-overlay .qrw-option-text { flex: 1 1 auto; min-width: 0; }

/* Escolhida: enche de cor, pula e mostra o check */
#qrw-overlay .qrw-option.is-picked {
    background: var(--qrw-p) !important;
    border-color: var(--qrw-p) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 0 color-mix(in srgb, var(--qrw-p) 70%, #000000), 0 14px 30px -10px color-mix(in srgb, var(--qrw-p) 70%, transparent);
    animation: qrw-pop .42s cubic-bezier(.2, .9, .3, 1.6) both;
}
#qrw-overlay .qrw-option.is-picked .qrw-option-badge,
#qrw-overlay .qrw-option.is-picked .qrw-option-icon { background: rgba(255, 255, 255, .22); color: #ffffff; }
#qrw-overlay .qrw-option.is-picked::after {
    border-color: #ffffff;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23177715' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/15px no-repeat;
    transform: scale(1.1);
}
@keyframes qrw-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}
#qrw-overlay .qrw-options.is-locked .qrw-option:not(.is-picked) {
    opacity: .4;
    transform: scale(.98);
    pointer-events: none;
}

/* Onda do toque */
#qrw-overlay .qrw-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 255, 255, .45);
    transform: scale(0);
    animation: qrw-ripple .6s ease-out forwards;
}
@keyframes qrw-ripple { to { transform: scale(1); opacity: 0; } }

/* Troca de pergunta */
#qrw-overlay .qrw-content.is-leaving { animation: qrw-leave .22s ease-in forwards; }
@keyframes qrw-leave { to { opacity: 0; transform: translateX(-18px); } }
#qrw-overlay .qrw-content.is-entering .qrw-question { animation: qrw-qIn .35s cubic-bezier(.2, .9, .3, 1.1) both; }
@keyframes qrw-qIn { 0% { opacity: 0; transform: translateX(18px); } 100% { opacity: 1; transform: none; } }

/* Carregando */
#qrw-overlay .qrw-loading-screen { padding: 34px 8px 30px; }
#qrw-overlay .qrw-loading-dots span {
    width: 14px;
    height: 14px;
    background: var(--qrw-p) !important;
}
#qrw-overlay .qrw-loading-text {
    color: var(--qrw-ink) !important;
    font-size: 18px;
    font-weight: 700;
}

/* Resultado */
#qrw-overlay .qrw-result-screen { padding: 20px 4px 4px; }
#qrw-overlay .qrw-result-title {
    color: var(--qrw-ink) !important;
    font-size: clamp(22px, 5.6vw, 27px);
    font-weight: 800;
    animation: qrw-cardIn .5s cubic-bezier(.2, .9, .3, 1.4) both;
}
#qrw-overlay .qrw-result-text {
    color: var(--qrw-ink-2);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 18px;
}
#qrw-overlay .qrw-reward-button {
    position: relative;
    overflow: hidden;
    display: flex !important;
    width: 100%;
    margin: 6px 0 12px;
    padding: 18px 24px !important;
    border-radius: 18px;
    background: var(--qrw-p) !important;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: none;
    filter: none !important;
    box-shadow: 0 5px 0 color-mix(in srgb, var(--qrw-p) 65%, #000000), 0 16px 32px -12px color-mix(in srgb, var(--qrw-p) 80%, transparent);
    animation: qrw-cta 2s ease-in-out infinite .8s;
}
#qrw-overlay .qrw-reward-button::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-18deg);
    animation: qrw-sweep 2.6s ease-in-out infinite 1s;
}
@keyframes qrw-sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes qrw-cta {
    0%, 100% { transform: none; }
    50% { transform: scale(1.025); }
}
#qrw-overlay .qrw-reward-button:hover { transform: translateY(-2px); background: var(--qrw-p) !important; }
#qrw-overlay .qrw-reward-button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 color-mix(in srgb, var(--qrw-p) 65%, #000000);
}
#qrw-overlay .qrw-reward-button svg { width: 28px; height: 28px; }
#qrw-overlay .qrw-button-subtext { color: #6b7280; font-size: 13.5px; font-weight: 500; }

@media (max-width: 480px) {
    #qrw-overlay { padding: 12px; }
    #qrw-overlay #qrw-modal { padding: 18px 16px 20px; border-radius: 22px; }
    #qrw-overlay .qrw-option,
    #qrw-overlay .qrw-option.qrw-has-icon { padding: 12px 44px 12px 12px !important; font-size: 16px; gap: 12px; }
    #qrw-overlay .qrw-option-badge,
    #qrw-overlay .qrw-option-icon { flex-basis: 34px; width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    #qrw-overlay *,
    #qrw-overlay *::before,
    #qrw-overlay *::after { animation: none !important; transition: none !important; }
}
