:root {
    --rm-primary: #3a5775;
    --rm-success: #2ecc71;
    --rm-warning: #e67e22;
    --rm-bg-page: #f7fafc;
    --rm-card-bg: #ffffff;
    --rm-text-dark: #1a202c;
    --rm-border-light: #f1f5f9;
    --rm-radius: 8px;
    --rm-radius-lg: 12px;
}

.rm-raffle-container {
    font-family: 'Poppins', sans-serif;
    background: var(--rm-bg-page);
    max-width: 600px;
    margin: 0 auto;
    color: var(--rm-text-dark);
}

.rm-raffle-price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rm-raffle-price {
    color: #2e5a88;
    font-size: 1.5rem;
    font-weight: 700;
}

.rm-regulamento-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.813rem;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
    margin-top: 15px;
}
.rm-regulamento-link:hover {
    background: #cbd5e1;
    color: #1e293b;
}

.rm-raffle-status-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.rm-status-card {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: var(--rm-radius);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fff;
}

.rm-status-card.disponivel { background: #f8fafc; }
.rm-status-card.comprados { background: #10b981; color: #fff; border-color: #10b981; }
.rm-status-card.reservados { background: #e67e22; color: #fff; border-color: #e67e22; }

.rm-numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 8px;
    padding: 20px;
}

.rm-number-btn {
    aspect-ratio: 1/1;
    border: 1px solid #e2e8f0;
    border-radius: var(--rm-radius);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.875rem;
    color: #475569;
}

.rm-number-btn.selected {
    background: #2e5a88;
    color: #fff;
    border-color: #2e5a88;
}

/* Barra Flutuante */
.rm-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.rm-bottom-sheet.active {
    transform: translateY(0);
}

.rm-sheet-info {
    line-height: 1.4;
}

.rm-sheet-qty { font-size: 0.875rem; font-weight: 500; }
.rm-sheet-total { font-size: 0.875rem; font-weight: 700; }

.rm-btn-continue {
    background: #2e5a88;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.938rem;
}

/* Logotipo da Campanha — altura controlável via Elementor */
.rm-logo-img {
    height: var(--rm-logo-height, 30px);
    width: auto;
    object-fit: contain;
}

/* Modais */
.rm-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 16px;
}

.rm-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.rm-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin: 0 auto;
}

.rm-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.rm-modal-header h3 { font-size: 1.125rem; font-weight: 700; margin: 0; }

.rm-modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.rm-modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* Modal de Regulamento Específico (Proporção 3x4 e Margens) */
.rm-modal-regulamento {
    width: 90vw;
    max-width: 480px;
    height: 70vh; /* Permite margens superior e inferior */
    max-height: 800px;
    margin: auto; /* Centraliza fortemente na tela */
    display: flex;
    flex-direction: column;
}

.rm-modal-regulamento .rm-modal-body {
    flex-grow: 1; /* Ocupa todo o espaço para scroll */
    overflow-y: auto; /* Scroll do regulamento */
    padding: 24px;
}

/* Checkout Modal Specifics */
.rm-checkout-summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.rm-input-phone-wrap,
.rm-input-icon-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
}

.rm-input-icon-wrap i {
    color: #94a3b8;
    margin-right: 10px;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

.rm-flag-br { 
    font-size: 0.875rem; 
    margin-right: 10px; 
    color: #64748b; 
    border-right: 1px solid #e2e8f0; 
    padding-right: 10px; 
    height: 30px; 
    display: flex; 
    align-items: center; 
}

.rm-input {
    width: 100%;
    border: none;
    padding: 12px 0;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    color: #1e293b;
}

.rm-form-group {
    margin-bottom: 16px;
}

.rm-form-group label {
    display: block;
    font-size: 0.813rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.rm-btn-action {
    width: 100%;
    background: #3b82f6; /* Azul moderno */
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: filter 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rm-btn-action:hover { filter: brightness(1.1); }

.rm-user-id-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
    background: #f1f5f9;
    padding: 12px 18px;
    border-radius: 50px;
}

.rm-user-avatar { font-size: 1.5rem; background: #cbd5e1; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.rm-user-details { font-size: 0.875rem; line-height: 1.2; }

.rm-form-terms {
    display: flex;
    gap: 12px;
    font-size: 0.813rem;
    color: #64748b;
    line-height: 1.5;
}

.rm-form-terms input { margin-top: 3px; }
.rm-checkout-back { cursor: pointer; font-size: 1.25rem; font-weight: 700; margin-right: 10px; }

/* Página de Pagamento Customizada (Checkout Rifa321) */
.rm-checkout-payment-container {
    background: #f3f4f6;
    min-height: 100vh;
    padding: 20px 15px;
    font-family: 'Poppins', sans-serif;
    color: #1e293b;
}

.rm-logo-center {
    display: block;
    margin: 0 auto 30px;
    height: 40px;
}

.rm-checkout-header .rm-checkout-title {
    text-align: left;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rm-payment-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.rm-payment-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
}

.rm-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rm-info-item:last-child {
    border-left: 1px solid #e2e8f0;
    padding-left: 20px;
}

.rm-info-item span { font-size: 0.75rem; color: #64748b; font-weight: 500; }
.rm-info-item strong { font-size: 1rem; font-weight: 700; color: #2e5a88; }

.rm-pix-instructions {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
    font-size: 0.813rem;
    color: #64748b;
    line-height: 1.4;
}

.rm-pix-icon { font-size: 1.5rem; color: #10b981; }

.rm-pix-copy-box {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rm-pix-copy-box span {
    font-size: 0.813rem;
    font-weight: 500;
    color: #475569;
    word-break: break-all;
}

.rm-btn-copy {
    background: #2e5a88;
    color: #fff;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.rm-upload-section {
    margin-top: 30px;
    text-align: left;
}

.rm-upload-section p { font-size: 0.813rem; color: #64748b; margin-bottom: 12px; }

.rm-upload-dropzone {
    border: 2px dashed #9381ff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    color: #9381ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 500;
}

.rm-btn-submit-comprovante {
    width: 100%;
    background: #96e6b3;
    color: #1e293b;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 15px;
}

/* Acordeões */
.rm-accordion-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.rm-accordion-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.rm-accordion-body {
    padding: 0 20px 20px;
    border-top: 1px solid #f8fafc;
}

.rm-order-product-info {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

.rm-order-product-info img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.rm-order-meta-list {
    padding: 15px 0;
}

.rm-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.813rem;
    margin-bottom: 8px;
}

.rm-numbers-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.rm-number-tag {
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Wrapper da Grade com Padding e Sombra */
.rm-raffle-wrapper {
    background: #fff;
    border-radius: var(--rm-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin: 20px auto;
    max-width: 650px;
}

/* Rodapé da Grade */
.rm-raffle-footer {
    background: #344054;
    padding: 20px;
    margin-top: 30px;
    border-radius: var(--rm-radius);
    text-align: center;
    color: #ffffff;
}

.rm-raffle-footer__brand {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.rm-raffle-footer__brand strong {
    color: #fff;
}

.rm-raffle-footer__termos {
    display: inline-block;
    margin-top: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.813rem;
    transition: color 0.2s;
}

.rm-raffle-footer__termos:hover {
    color: #fff;
}

/* Ajustes finos na grade dentro do wrapper */
.rm-raffle-container {
    background: transparent;
    padding: 0;
    max-width: 100%;
}

/* Cabeçalho da Grade */
.rm-raffle-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.rm-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rm-btn-icon {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.rm-btn-icon:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.rm-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rm-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.rm-btn-logout {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rm-btn-logout:hover {
    background: #fee2e2;
}

/* Perfil na Busca */
.rm-search-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #f1f5f9;
}

.rm-user-avatar {
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
}

.rm-search-profile__details h4 {
    color: #1e293b;
}

/* Listagem de Números no Histórico */
.rm-search-numbers-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.rm-number-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.rm-number-history-item:hover {
    background: #f8fafc;
}

.rm-history-num {
    background: #10b981;
    color: #fff;
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.rm-history-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rm-history-campaign {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.rm-history-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Scroller customizado para o histórico */
.rm-search-numbers-list::-webkit-scrollbar {
    width: 6px;
}
.rm-search-numbers-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.rm-search-numbers-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Pacotes de Números (Compra Rápida) */
.rm-packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.rm-package-card {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.rm-package-card:hover {
    border-color: #475569;
    transform: translateY(-2px);
}

.rm-package-card.active,
.rm-package-card:active {
    border-color: #10b981;
    background: #0f172a;
}

.rm-package-popular {
    border-color: #10b981;
}

.rm-package-amount {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.rm-package-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.rm-package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    z-index: 10;
}

/* Stepper Customizado */
.rm-package-stepper {
    display: flex;
    align-items: center;
    background: #1e293b;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 20px;
    max-width: 250px;
}

.rm-package-stepper button {
    background: #334155;
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.rm-package-stepper button:hover {
    background: #475569;
}

.rm-package-stepper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    outline: none;
}

/* Remover spinners do input number */
.rm-package-stepper input::-webkit-outer-spin-button,
.rm-package-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.rm-package-stepper input[type=number] {
    -moz-appearance: textfield;
}

/* Botão de Reserva Verde do Pacote */
#rm-btn-reserve-random {
    background: #10b981;
    color: #fff;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#rm-btn-reserve-random:hover {
    background: #059669;
}

/* Redes Sociais e Suporte no Rodapé */
.rm-social-section {
    text-align: center;
    margin-top: 30px; /* Reduzido de 40px para aproximar do label se necessário, mas o pedido foca no topo do rodapé */
    margin-bottom: 25px;
}

.rm-social-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

.rm-social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.rm-social-link {
    display: flex;
    width: 32px;
    height: 32px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rm-social-link:hover {
    transform: scale(1.1);
}

.rm-social-link svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.rm-support-section {
    text-align: center;
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.rm-support-link {
    color: #10b981;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s;
    margin-left: 4px;
}

.rm-support-link:hover {
    color: #059669;
    text-decoration: underline;
}

/* Ajustes no Rodapé Padrão */
.rm-raffle-footer {
    border-top: 1px solid #334155;
    padding-top: 15px; /* Diminuído de 30px */
    margin-top: 30px; /* Aumentado de 0 para dar distância da grade superior */
}

/* Data do Sorteio — Separador e Destaque */
.rm-meta-separator {
    margin: 0 8px;
    color: #cbd5e1;
    font-weight: 300;
}

.rm-draw-date {
    color: #2e5a88;
    font-weight: 600;
}

.rm-draw-date i {
    margin-right: 4px;
    font-size: 0.85em;
}
