#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 de funil: pergunta grande, opções em barras de largura total e
   CTA em cápsula. Vem depois das regras base, então manda no visual.

   Duas diferenças em relação ao 1.6.2, ambas de propósito:

   1. Lá a cor era #1e6b3a escrita à mão, o que fazia o seletor de cor do
      painel virar enfeite — mexer nele não mudava nada na tela. Aqui a
      mesma forma é pintada com --qrw-primary-color, que é o que o admin
      configura, e o verde antigo fica só como reserva.

   2. O 1.6.2 trazia ainda regras em .qrw-overlay e .qrw-modal que nunca
      pegavam: o elemento recebe id, nunca essas classes. Ficaram de fora
      para não prometer um fundo claro que na prática nunca existiu.
   --------------------------------------------------------------------- */

.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: var(--qrw-primary-color, #1e6b3a);
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
    color: var(--qrw-secondary-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: var(--qrw-primary-color, #1e6b3a);
    filter: brightness(.88);
    transform: translateY(-1px);
}

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

.qrw-reward-button {
    background: var(--qrw-primary-color, #1e6b3a);
    border: none;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
    color: var(--qrw-secondary-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: var(--qrw-primary-color, #1e6b3a);
    filter: brightness(.88);
    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;
    }
}
