/* =====================================================
   RifaCS2 — Estilos globais customizados
   Tema: cinza espacial + roxo
   ===================================================== */

/* Alpine.js: oculta elementos com x-cloak antes da inicialização */
[x-cloak] { display: none !important; }

/* Elimina double-tap zoom em todos os elementos interativos */
a, button, input, select, textarea, label, [role="button"] {
    touch-action: manipulation;
}

/* Impede zoom automático no iOS ao focar inputs (threshold do Safari é 16px) */
input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    font-size: 16px !important;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #17171a;
}
::-webkit-scrollbar-thumb {
    background: #38383f;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* Seleção de texto */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
}

/* Animação de pulso para barra de progresso — verde */
@keyframes glow-green {
    0%, 100% { box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
    50%       { box-shadow: 0 0 14px rgba(34, 197, 94, 0.75); }
}

.progress-glow {
    animation: glow-green 2.5s ease-in-out infinite;
}

/* Animação de pulso para barra de progresso — âmbar (quase esgotada) */
@keyframes glow-amber {
    0%, 100% { box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
    50%       { box-shadow: 0 0 14px rgba(245, 158, 11, 0.75); }
}

.progress-glow-amber {
    animation: glow-amber 1.5s ease-in-out infinite;
}

.progress-bar-active {
    animation: glow-green 2s ease-in-out infinite;
}

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Card hover */
.card-rifa {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-rifa:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Badge de status */
.badge-ativa     { background: rgba(34,197,94,.12);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.badge-pausada   { background: rgba(234,179,8,.12);  color: #facc15; border: 1px solid rgba(234,179,8,.3); }
.badge-esgotada  { background: rgba(239,68,68,.12);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.badge-encerrada { background: rgba(113,113,122,.12); color: #a1a1aa; border: 1px solid rgba(113,113,122,.3); }

/* Gradiente hero — roxo sutil */
.bg-hero {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(168, 85, 247, 0.10), transparent),
        #17171a;
}

/* Número de rifa */
.numero-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: #2c2c31;
    border: 1px solid #38383f;
    font-size: 0.875rem;
    font-family: monospace;
    font-weight: 500;
    color: #d4d4d8;
}
.numero-chip.vendido {
    background: rgba(168,85,247,.12);
    border-color: rgba(168,85,247,.35);
    color: #c084fc;
}

/* Timer PIX */
.timer-critico {
    color: #f87171;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
