/* ==========================================================
   PIX DO MILHÃO - AÇÃO OFICIAL "RASPOU, ACHOU, É PIX"
   Estilo 100% integrado ao design system da plataforma
   ========================================================== */

:root {
    --pdm-brand-yellow: #ebab2b;
    --pdm-brand-yellow-hover: #d99920;
    --pdm-brand-dark: #111827;
    --pdm-brand-gray: #4b5563;
    --pdm-brand-light-gray: #f3f4f6;
    --pdm-brand-border: #e5e7eb;
    --pdm-brand-green: #00a84f;
    --pdm-brand-green-hover: #008f43;
}

/* Floating Banner Promocional */
.raspadinha-floating-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99990;
    background: #ffffff;
    color: var(--pdm-brand-dark);
    border: 2px solid var(--pdm-brand-yellow);
    padding: 10px 18px;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.raspadinha-floating-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.22);
    border-color: var(--pdm-brand-yellow-hover);
}

.raspadinha-floating-trigger .badge-icon {
    font-size: 20px;
    line-height: 1;
}

.raspadinha-floating-trigger .badge-count {
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
}

/* Modal Overlay com transição natural */
.raspadinha-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    overflow-y: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.raspadinha-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Container do Modal */
.raspadinha-modal {
    background: #ffffff;
    color: var(--pdm-brand-dark);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.raspadinha-overlay.active .raspadinha-modal {
    transform: scale(1);
}

/* Botão Fechar */
.raspadinha-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    color: #6b7280;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    z-index: 10;
    transition: all 0.15s ease;
}

.raspadinha-close-btn:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #111827;
}

/* Top Header */
.raspadinha-header {
    background: #fdfaf3;
    border-bottom: 1px solid #f3e8d2;
    padding: 22px 20px 16px;
    text-align: center;
}

.raspadinha-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pdm-brand-yellow);
    color: #000000;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

.raspadinha-title {
    font-size: 21px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.raspadinha-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Barra de Progresso */
.raspadinha-progress-bar-wrap {
    margin: 12px auto 0;
    background: #e5e7eb;
    border-radius: 9999px;
    height: 7px;
    overflow: hidden;
    position: relative;
    max-width: 260px;
}

.raspadinha-progress-fill {
    height: 100%;
    background: var(--pdm-brand-yellow);
    border-radius: 9999px;
    width: 0%;
    transition: width 0.35s ease;
}

.raspadinha-progress-text {
    font-size: 11.5px;
    color: #6b7280;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

/* Corpo do Modal */
.raspadinha-body {
    padding: 18px 20px 22px;
}

/* Grid 3x3 das Raspadinhas */
.raspadinha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.scratch-card-item {
    aspect-ratio: 1;
    border-radius: 12px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    overflow: hidden;
    border: 1.5px solid #e5e7eb;
    cursor: pointer;
    background: #f9fafb;
    transition: transform 0.15s ease, border-color 0.2s ease;
}

.scratch-card-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.scratch-card-item.scratched {
    border-color: #e5e7eb;
    background: #ffffff;
}

.scratch-card-item.winner-card {
    border-color: var(--pdm-brand-green);
    box-shadow: 0 0 16px rgba(0, 168, 79, 0.4);
}

/* Conteúdo Interno Oculto */
.scratch-content-underneath {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    text-align: center;
    background: #f8fafc;
}

.scratch-content-underneath .prize-emoji {
    font-size: 22px;
    margin-bottom: 2px;
}

.scratch-content-underneath .prize-val {
    font-size: 12px;
    font-weight: 800;
    color: #4b5563;
    line-height: 1.2;
}

.scratch-content-underneath .prize-msg {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 2px;
}

.scratch-content-underneath.is-winner {
    background: #f0fdf4;
}

.scratch-content-underneath.is-winner .prize-val {
    font-size: 13px;
    font-weight: 900;
    color: #15803d;
}

.scratch-content-underneath.is-winner .prize-msg {
    font-size: 10px;
    color: #166534;
    font-weight: 700;
}

/* Canvas da Raspagem */
.scratch-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
}

/* Botões */
.btn-raspar-auto {
    background: var(--pdm-brand-yellow);
    color: #000000;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    width: 100%;
}

.btn-raspar-auto:hover {
    background: var(--pdm-brand-yellow-hover);
}

.pdm-legal-footer {
    font-size: 10.5px;
    color: #9ca3af;
    text-align: center;
    margin-top: 14px;
    line-height: 1.35;
}

/* VIEW: TELA DE VITÓRIA */
.raspadinha-win-view {
    text-align: center;
    padding: 24px 20px;
}

.win-badge-pill {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

.win-main-title {
    font-size: 24px;
    font-weight: 900;
    color: #111827;
    margin: 0 0 6px;
}

.win-prize-amount-box {
    background: #fefce8;
    border: 2px solid var(--pdm-brand-yellow);
    border-radius: 14px;
    padding: 16px;
    margin: 16px 0;
}

.win-prize-label {
    font-size: 12px;
    color: #713f12;
    text-transform: uppercase;
    font-weight: 700;
}

.win-prize-value {
    font-size: 32px;
    font-weight: 900;
    color: #111827;
    margin: 4px 0;
}

.win-prize-method {
    font-size: 12.5px;
    color: #15803d;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-win-resgatar {
    background: var(--pdm-brand-green);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    width: 100%;
    margin-top: 14px;
}

.btn-win-resgatar:hover {
    background: var(--pdm-brand-green-hover);
}

/* VIEW: FORMULÁRIO DE LOGIN / CADASTRO */
.raspadinha-auth-view {
    padding: 24px 20px;
}

.auth-step-header {
    text-align: center;
    margin-bottom: 18px;
}

.auth-step-title {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
}

.auth-step-sub {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.auth-prize-reminder {
    background: #fdfaf3;
    border: 1px solid #f3e8d2;
    border-radius: 10px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12.5px;
    color: #854d0e;
    font-weight: 600;
}

.auth-form-group {
    margin-bottom: 12px;
}

.auth-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 13.5px;
    color: #111827;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.auth-input:focus {
    border-color: var(--pdm-brand-yellow);
    box-shadow: 0 0 0 3px rgba(235, 171, 43, 0.2);
}

.auth-input-icon {
    position: absolute;
    right: 12px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
}

.auth-error-text {
    font-size: 11px;
    color: #dc2626;
    margin-top: 4px;
    display: none;
}

.btn-auth-submit {
    background: var(--pdm-brand-yellow);
    color: #000000;
    border: none;
    padding: 13px 20px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.15s ease;
    margin-top: 16px;
}

.btn-auth-submit:hover {
    background: var(--pdm-brand-yellow-hover);
}

.btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* VIEW: TELA DE SUCESSO WHATSAPP */
.raspadinha-success-view {
    text-align: center;
    padding: 24px 20px;
}

.success-check-halo {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    background: #dcfce7;
    border: 2px solid #86efac;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #15803d;
    font-size: 28px;
}

.success-title {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 6px;
}

.whatsapp-notification-card {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 14px;
    padding: 14px;
    margin: 14px 0;
    text-align: left;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.whatsapp-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.whatsapp-msg-body h4 {
    margin: 0 0 3px;
    font-size: 13.5px;
    font-weight: 800;
    color: #166534;
}

.whatsapp-msg-body p {
    margin: 0;
    font-size: 12px;
    color: #374151;
    line-height: 1.4;
}

.success-lead-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 14px 0;
    text-align: left;
}

.success-lead-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}

.success-lead-row:last-child {
    border-bottom: none;
}

.success-lead-label {
    color: #6b7280;
}

.success-lead-val {
    color: #111827;
    font-weight: 700;
}

.btn-success-close {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.15s ease;
}

.btn-success-close:hover {
    background: #1f2937;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .raspadinha-grid {
        gap: 8px;
    }
    .raspadinha-title {
        font-size: 18px;
    }
    .win-prize-value {
        font-size: 26px;
    }
}
