.ram-app,
.ram-app * {
    box-sizing: border-box;
}

.ram-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.ram-screen__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(4px);
}

.ram-screen__dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
}

html.ram-lock,
body.ram-lock {
    overflow: hidden !important;
    height: 100% !important;
}

/* Inline */

.ram-inline {
    width: 100%;
    max-width: 520px;
    margin: 24px auto;
}

/* Quiz */

.ram-quiz {
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.ram-quiz__top {
    position: relative;
    padding: 18px 20px 0;
}

.ram-quiz__progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.ram-quiz__progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: var(--ram-accent, #0021ff);
    border-radius: inherit;
    transition: width 0.25s ease;
}

.ram-quiz__close,
.ram-reward__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
    color: #111827;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}

.ram-quiz__body {
    padding: 28px 24px 24px;
    text-align: center;
}

.ram-quiz__step-label {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.ram-quiz__question,
.ram-quiz__form-title {
    margin: 0 0 30px;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
}

.ram-quiz__form-subtitle {
    margin: -8px 0 18px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.5;
}

.ram-quiz__options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ram-quiz__option {
    width: 100%;
    border: 1.5px solid var(--ram-accent, #0021ff);
    background: var(--ram-accent, #0021ff);
    color: #ffffff;
    border-radius: 14px;
    padding: 15px 16px;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}

.ram-quiz__option:hover {
    border-color: var(--ram-accent, #0021ff);
    background: var(--ram-accent, #0021ff);
    filter: brightness(0.92);
}

.ram-quiz__option:active {
    transform: scale(0.99);
}

.ram-quiz__fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.ram-quiz__field {
    text-align: left;
}

.ram-quiz__field label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.ram-quiz__field input,
.ram-quiz__field select,
.ram-quiz__field textarea {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 13px 14px;
    color: #0f172a;
    background: #ffffff;
    font-size: 15px;
    outline: none;
}

.ram-quiz__field textarea {
    min-height: 92px;
    resize: vertical;
}

.ram-quiz__field input:focus,
.ram-quiz__field select:focus,
.ram-quiz__field textarea:focus {
    border-color: var(--ram-accent, #0021ff);
    box-shadow: 0 0 0 3px rgba(0, 33, 255, 0.08);
}

.ram-quiz__submit {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 15px 18px;
    background: var(--ram-accent, #0021ff);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.ram-quiz__submit small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
}

.ram-quiz__error,
.ram-reward__error {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 700;
}

/* Loading */

.ram-quiz__loading,
.ram-reward__loading {
    margin-top: 18px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.ram-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 10px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--ram-accent, #0021ff);
    border-radius: 50%;
    animation: ram-spin 0.8s linear infinite;
}

@keyframes ram-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Reward */

.ram-reward {
    position: relative;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.ram-reward__header {
    min-height: var(--ram-header-height, 120px);
    background: var(--ram-header, #5b1230);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.ram-reward__header img {
    max-width: 82%;
    max-height: var(--ram-image-height, 90px);
    display: block;
}

.ram-reward__body {
    padding: 24px;
    text-align: center;
}

.ram-reward__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--ram-accent, #5b1230);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ram-reward__title {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;
}

.ram-reward__description {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.ram-reward__buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 30px 0 40px;
}

.ram-reward__button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 20px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, transform 0.05s ease, background 0.15s ease;
}

.ram-reward__button:hover {
    border-color: var(--ram-accent, #5b1230);
    background: #f8fafc;
}

.ram-reward__button:active {
    transform: scale(0.99);
}

.ram-reward__button-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.ram-reward__button-text {
    flex: 1;
    color: #1e293b;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.ram-reward__button-arrow {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ram-accent, #5b1230);
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
}

.ram-reward__footer {
    margin: 14px 0 30px;
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
}

/* Helpers */

[hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .ram-screen {
        padding: 14px;
        align-items: center;
    }

    .ram-screen__dialog {
        max-width: 100%;
    }

    .ram-quiz__body,
    .ram-reward__body {
        padding: 24px 18px 20px;
    }

    .ram-quiz__question,
    .ram-quiz__form-title,
    .ram-reward__title {
        font-size: 26px;
    }
    
    .ram-quiz__option {
        font-size: 20px;
    }
    
    .ram-reward--inside-quiz .ram-reward__header {
    margin: -24px -18px 0;
}

.ram-reward--inside-quiz .ram-reward__body {
    padding: 24px 0 0;
}

}

/* Reward final dentro do quiz: remove card duplicado */
.ram-reward--inside-quiz {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
    width: 100%;
}

.ram-reward--inside-quiz .ram-reward__header {
    margin: -24px -24px 0;
    border-radius: 0;
}

.ram-reward--inside-quiz .ram-reward__body {
    padding: 24px 0 0;
}

.ram-reward--inside-quiz .ram-reward__button {
    background: #16A34A;
    border-color: #16A34A;
}

.ram-reward--inside-quiz .ram-reward__button-text,
.ram-reward--inside-quiz .ram-reward__button-icon {
    color: #ffffff;
}

.ram-reward--inside-quiz .ram-reward__button-arrow {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.ram-reward--inside-quiz .ram-reward__button:hover {
    background: #15803D;
    border-color: #15803D;
}

.ram-personal-loader {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
}

.ram-personal-loader__spinner {
    width: 46px;
    height: 46px;
    border: 5px solid #e5e7eb;
    border-top-color: var(--ram-accent, #16A34A);
    border-radius: 50%;
    animation: ram-spin 0.8s linear infinite;
}

.ram-personal-loader__title {
    margin: 0;
    color: #0f172a;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 900;
}

.ram-personal-loader__text {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}

.ram-quiz__question-cta {
    margin: 60px 0 20px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.ram-reward--inside-quiz.ram-reward--no-header .ram-reward__body {
    padding-top: 0;
}

.ram-reward--inside-quiz .ram-reward__body {
    padding-bottom: 0;
}

/* =========================================================
   RAM Plugin - Premium UI Override
   Cole no final de ram-frontend.css
========================================================= */

.ram-app,
.ram-app * {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Overlay premium */
.ram-screen {
    padding: 18px;
}

.ram-screen__backdrop {
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.10), transparent 34%),
        rgba(248, 250, 252, 0.78);
    backdrop-filter: blur(10px) saturate(135%);
    -webkit-backdrop-filter: blur(10px) saturate(135%);
}

/* Card principal */
.ram-quiz,
.ram-reward {
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.18),
        0 1px 0 rgba(255, 255, 255, 0.75) inset;
    font-family: Poppins, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Topo do quiz */
.ram-quiz__top {
    padding: 20px 22px 0;
}

.ram-quiz__progress {
    height: 7px;
    background: #e8eef7;
}

.ram-quiz__progress-bar {
    background: linear-gradient(90deg, var(--ram-accent, #2563eb), #60a5fa);
}

/* Corpo */
.ram-quiz__body,
.ram-reward__body {
    padding: 28px 24px 24px;
}

.ram-quiz__step-label {
    margin-bottom: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ram-quiz__question,
.ram-quiz__form-title {
    color: #0f172a;
    font-size: 27px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.035em;
}

/* Botões de resposta */
.ram-quiz__options {
    gap: 13px;
}

.ram-quiz__option {
    border: 1px solid rgba(37, 99, 235, 0.18);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0)),
        var(--ram-accent, #2563eb);
    color: #ffffff;
    border-radius: 18px;
    padding: 16px 18px;
    text-align: left;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    box-shadow:
        0 12px 24px rgba(37, 99, 235, 0.20),
        0 1px 0 rgba(255, 255, 255, 0.20) inset;
}

.ram-quiz__option:hover {
    filter: brightness(0.98);
    transform: translateY(-1px);
    box-shadow:
        0 16px 30px rgba(37, 99, 235, 0.24),
        0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

.ram-quiz__option:active {
    transform: scale(0.99);
}

/* Campos */
.ram-quiz__field input,
.ram-quiz__field select,
.ram-quiz__field textarea {
    border-radius: 16px;
    border-color: #dbe3ef;
    background: #f8fafc;
    padding: 14px 15px;
}

.ram-quiz__field input:focus,
.ram-quiz__field select:focus,
.ram-quiz__field textarea:focus {
    background: #ffffff;
    border-color: var(--ram-accent, #2563eb);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

/* Botão submit */
.ram-quiz__submit {
    border-radius: 18px;
    padding: 16px 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0)),
        var(--ram-accent, #2563eb);
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

/* Header reward */
.ram-reward__header {
    min-height: var(--ram-header-height, 128px);
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.22), transparent 36%),
        linear-gradient(135deg, var(--ram-header, #5b1230), #111827);
    padding: 24px;
}

.ram-reward__header img {
    max-width: 84%;
    max-height: var(--ram-image-height, 92px);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.20));
}

/* Badge */
.ram-reward__badge {
    margin-bottom: 14px;
    padding: 7px 15px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--ram-accent, #2563eb);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Título e descrição */
.ram-reward__title {
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 23px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.ram-reward__description {
    max-width: 390px;
    margin: 0 auto 20px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

/* Botões reward */
.ram-reward__buttons {
    gap: 13px;
}

.ram-reward__button {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(22, 163, 74, 0.18);
    border-radius: 18px;
    padding: 15px 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0)),
        #16a34a;
    box-shadow:
        0 14px 28px rgba(22, 163, 74, 0.20),
        0 1px 0 rgba(255, 255, 255, 0.20) inset;
}

.ram-reward__button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.ram-reward__button:hover {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0)),
        #15803d;
    border-color: rgba(22, 163, 74, 0.28);
    transform: translateY(-1px);
    box-shadow:
        0 18px 34px rgba(22, 163, 74, 0.24),
        0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.ram-reward__button:hover::after {
    transform: translateX(120%);
}

.ram-reward__button-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 23px;
}

.ram-reward__button-text {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.015em;
}

.ram-reward__button-arrow {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 28px;
}

/* Footer */
.ram-reward__footer {
    margin: 16px 0 4px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.45;
}

/* Botão fechar mais discreto */
.ram-quiz__close,
.ram-reward__close {
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: rgba(15, 23, 42, 0.10);
    color: #0f172a;
    font-size: 22px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.ram-quiz__close:hover,
.ram-reward__close:hover {
    background: rgba(15, 23, 42, 0.16);
    transform: scale(1.04);
}

/* Loader personalizado */
.ram-personal-loader {
    min-height: 245px;
    gap: 15px;
}

.ram-personal-loader__spinner {
    width: 48px;
    height: 48px;
    border-width: 5px;
    border-color: #e8eef7;
    border-top-color: var(--ram-accent, #16a34a);
}

.ram-personal-loader__title {
    color: #0f172a;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.ram-personal-loader__text {
    color: #64748b;
    font-size: 14px;
}

/* Reward dentro do quiz */
.ram-reward--inside-quiz {
    border-radius: 0;
    box-shadow: none;
    border: 0;
}

.ram-reward--inside-quiz .ram-reward__header {
    margin: -28px -24px 0;
}

.ram-reward--inside-quiz .ram-reward__body {
    padding: 24px 0 0;
}

/* Mobile */
@media (max-width: 480px) {
    .ram-screen {
        padding: 12px;
    }

    .ram-quiz,
    .ram-reward {
        border-radius: 24px;
    }

    .ram-quiz__body,
    .ram-reward__body {
        padding: 24px 18px 20px;
    }

    .ram-quiz__question,
    .ram-quiz__form-title {
        font-size: 25px;
        line-height: 1.18;
    }

    .ram-reward__title {
        font-size: 22px;
    }

    .ram-quiz__option {
        font-size: 18px;
        padding: 15px 16px;
        border-radius: 17px;
    }

    .ram-reward__button {
        padding: 14px 15px;
        border-radius: 17px;
    }

    .ram-reward__button-text {
        font-size: 17px;
    }

    .ram-reward--inside-quiz .ram-reward__header {
        margin: -24px -18px 0;
    }

    .ram-reward--inside-quiz .ram-reward__body {
        padding: 22px 0 0;
    }
}

/* =========================================================
   Reward Header - Sem degradê + imagem premium
========================================================= */

.ram-reward__header {
    min-height: var(--ram-header-height, 128px);
    background: var(--ram-header, #5b1230) !important;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container visual da imagem */
.ram-reward__header img {
    display: block;
    width: auto;
    max-width: 86%;
    max-height: var(--ram-image-height, 92px);
    object-fit: contain;

    padding: 10px 14px;
    border-radius: 20px;

    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);

    box-shadow:
        0 14px 28px rgba(15, 23, 42, 0.18),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;

    filter: none !important;
}

/* Quando o reward está dentro do quiz */
.ram-reward--inside-quiz .ram-reward__header {
    background: var(--ram-header, #5b1230) !important;
}

/* Mobile */
@media (max-width: 480px) {
    .ram-reward__header {
        min-height: var(--ram-header-height, 118px);
        padding: 18px;
    }

    .ram-reward__header img {
        max-width: 90%;
        max-height: var(--ram-image-height, 86px);
        border-radius: 16px;
        padding: 7px;
    }
}