/* ===========================
   SORTEIO GRATUITO - CSS
   Baseado no rapidinha.css
   =========================== */

/* ===========================
   PÁGINA GERAL
   =========================== */
.gratuito-page {
    max-width: 620px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* ===========================
   HERO / TOPO
   =========================== */
.gratuito-hero {
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
}

.gratuito-hero-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    overflow: hidden;
}

.gratuito-hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gratuito-hero-img-wrap.sem-imagem {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gratuito-hero-placeholder {
    color: rgba(255,255,255,0.7);
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
}

.gratuito-hero-placeholder span {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Badge GRATUITO */
.gratuito-hero-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.gratuito-hero-info {
    padding: 1.25rem;
}

.gratuito-hero-info h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #111827;
}

.gratuito-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 0.5rem;
}

.gratuito-desc {
    font-size: 0.9rem;
    color: #4b5563;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.gratuito-preco-bloco {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
}

.gratuito-preco-bloco i {
    font-size: 1.1rem;
}

/* ===========================
   REGRAS DO INSTAGRAM
   =========================== */
.gratuito-instagram-rules {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 4px solid #e1306c;
}

.gratuito-instagram-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gratuito-instagram-header i {
    font-size: 1.5rem;
    color: #e1306c;
}

.gratuito-instagram-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.gratuito-instagram-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gratuito-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fdf2f8;
    border-radius: 0.75rem;
}

.gratuito-step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #e1306c 0%, #c13584 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.gratuito-step-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.gratuito-step-text strong {
    font-size: 0.95rem;
    color: #111827;
}

.gratuito-step-text span {
    font-size: 0.8rem;
    color: #6b7280;
}

.gratuito-instagram-extra {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.gratuito-instagram-extra i {
    color: #9333ea;
    margin-top: 0.15rem;
}

/* ===========================
   BARRA DE STATUS
   =========================== */
.gratuito-status-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.gratuito-status-pill {
    flex: 1;
    min-width: 100px;
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.gratuito-status-pill .status-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gratuito-status-pill .status-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.gratuito-status-livre .status-value {
    color: #16a34a;
}

.gratuito-status-pendente .status-value {
    color: #f59e0b;
}

.gratuito-status-validado .status-value {
    color: #9333ea;
}

/* ===========================
   CARD DE NÚMEROS (BINGO)
   =========================== */
.gratuito-bingo-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.gratuito-bingo-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gratuito-bingo-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.gratuito-bingo-header p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
}

.gratuito-bingo-contador {
    background: #f3f4f6;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #4b5563;
}

.gratuito-bingo-contador span {
    font-weight: 700;
    color: #9333ea;
}

/* Aviso */
.gratuito-aviso {
    display: none;
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.gratuito-aviso.show {
    display: block;
}

.gratuito-aviso.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.gratuito-aviso.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Grid de números */
.gratuito-bingo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 0.4rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

/* Cada número */
.gratuito-numero {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    background: #ffffff;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.gratuito-numero:hover:not(.ocupado):not(.selecionado) {
    background: #f3e8ff;
    border-color: #9333ea;
    transform: scale(1.05);
}

.gratuito-numero.selecionado {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: #ffffff;
    border-color: #7c3aed;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.gratuito-numero.ocupado {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.gratuito-numero.ocupado.validado {
    background: #ddd6fe;
    color: #7c3aed;
}

/* Ações */
.gratuito-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.gratuito-btn-outline {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 2px solid #d1d5db;
    background: transparent;
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gratuito-btn-outline:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.gratuito-btn-primary {
    flex: 2;
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.gratuito-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(147, 51, 234, 0.4);
}

.gratuito-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===========================
   MODAL DE CHECKOUT
   =========================== */
.checkout-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.checkout-modal {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.25rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.checkout-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: none;
    background: #f3f4f6;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-close:hover {
    background: #e5e7eb;
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkout-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #4b5563;
}

.checkout-icon-instagram {
    background: linear-gradient(135deg, #e1306c 0%, #c13584 100%);
    color: #ffffff;
}

.checkout-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.checkout-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
}

.checkout-resumo {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #374151;
}

.checkout-resumo strong {
    color: #9333ea;
}

.checkout-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

/* Botões Instagram */
.checkout-instagram-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkout-instagram-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.checkout-instagram-seguir {
    background: linear-gradient(135deg, #e1306c 0%, #c13584 100%);
    color: #ffffff;
}

.checkout-instagram-seguir:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
}

.checkout-instagram-comentar {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.checkout-instagram-comentar:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Formulário */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkout-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: -0.5rem;
}

.checkout-input {
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.15s ease;
}

.checkout-input:focus {
    outline: none;
    border-color: #9333ea;
    background: #ffffff;
}

.checkout-erro {
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.checkout-termos-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.checkout-termos-text i {
    color: #f59e0b;
    margin-top: 0.1rem;
}

.btn-checkout-confirmar {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.btn-checkout-confirmar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(147, 51, 234, 0.4);
}

.btn-checkout-confirmar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===========================
   MODAL DE SUCESSO
   =========================== */
.success-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.success-modal {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.success-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon i {
    font-size: 2rem;
    color: #ffffff;
}

.success-modal h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}

.success-modal p {
    font-size: 0.95rem;
    color: #4b5563;
    margin: 0 0 0.75rem;
}

.success-modal p strong {
    color: #9333ea;
    font-size: 1.1rem;
}

.success-info {
    font-size: 0.8rem !important;
    background: #fef3c7;
    color: #92400e !important;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
}

.success-info i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.success-btn {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

/* ===========================
   RESPONSIVO
   =========================== */
@media (max-width: 480px) {
    .gratuito-bingo-grid {
        grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    }
    
    .gratuito-numero {
        font-size: 0.65rem;
    }
    
    .gratuito-actions {
        flex-direction: column;
    }
    
    .gratuito-btn-outline,
    .gratuito-btn-primary {
        width: 100%;
    }
}
/* ===========================
   ESTILOS ADICIONAIS PARA SORTEIO GRATUITO
   Adicione isso ao seu sorteios.css
   =========================== */

/* Badge GRÁTIS na imagem do card */
.s-badge-gratuito {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.4);
    z-index: 2;
}

/* Garante que a imagem do card seja position relative para o badge funcionar */
.s-card-img {
    position: relative;
}

/* Texto "Participe GRÁTIS pelo Instagram" */
.s-price-free {
    color: #9333ea;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.s-price-free i {
    color: #e1306c;
}

/* Botão estilo Instagram */
.s-btn-instagram {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%) !important;
    color: #ffffff !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
}

.s-btn-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(131, 58, 180, 0.4);
}

/* Animação pulse para o botão Instagram também */
.s-btn-instagram.s-btn-pulse {
    animation: pulse-instagram 2s infinite;
}

@keyframes pulse-instagram {
    0% {
        box-shadow: 0 0 0 0 rgba(131, 58, 180, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(131, 58, 180, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(131, 58, 180, 0);
    }
}
