/* LoterIA Design System - CSS Custom Properties */
:root {
    /* Cores base - Modo claro (shadcn/ui style) */
    --background: #ffffff;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --primary: #16a34a;
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #16a34a;
    --radius: 0.5rem;

    /* Cores por loteria */
    --mega-sena: #209869;
    --lotofacil: #930089;
    --quina: #260085;
    --lotomania: #F78100;
    --dupla-sena: #A61324;
    --timemania: #00FF48;
    --dia-de-sorte: #CB7917;
    --super-sete: #A8CF45;
    --mais-milionaria: #2E3192;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--foreground);
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

.animate-pulse-soft {
    animation: pulse-soft 2s infinite;
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--secondary) 25%, #e8edf2 50%, var(--secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Lottery ball component */
.lottery-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
    user-select: none;
}

.lottery-ball:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lottery-ball.hot {
    border-color: #f59e0b;
    background-color: #fffbeb;
    color: #92400e;
}

.lottery-ball.cold {
    border-color: #60a5fa;
    background-color: #eff6ff;
    color: #1e40af;
}

.lottery-ball.selected {
    color: white;
}

/* Score meter */
.score-meter {
    position: relative;
    width: 60px;
    height: 60px;
}

.score-meter-circle {
    transform: rotate(-90deg);
}

.score-meter-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Toast notification */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Ad container */
.ad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
}

/* Ocultar container quando AdSense não preencheu o slot (método CSS — suporte nativo) */
.ad-container:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
    display: none !important;
}

/* JS fallback: classe adicionada pelo MutationObserver quando slot vazio */
.ad-container.ad-unfilled {
    display: none !important;
}

/* ─── Links de texto no conteúdo do blog (article-prose) ────────────────────
   Aplicamos cor verde-600 apenas em links simples (sem bg-*) para não
   afetar botões CTA gerados pelo AI writer que têm bg-green-600 text-white.
   Botões com qualquer classe bg-* ficam com a cor do próprio text-* deles.
   ─────────────────────────────────────────────────────────────────────────── */

/* Links de texto simples dentro do artigo → verde-600 */
.article-prose a:not([class*="bg-"]):not([style*="background"]) {
    color: #16a34a;
    text-decoration: none;
}
.article-prose a:not([class*="bg-"]):not([style*="background"]):hover {
    text-decoration: underline;
}

/* Botões CTA com background (gerados pelo AI writer) → preservar cor do texto */
.article-prose a[class*="bg-"] {
    text-decoration: none !important;
}

/* Garantia final: qualquer <a> com text-white deve ser branco — prose ou não */
a[class*="text-white"],
a[style*="background-color"],
a[style*="background:"] {
    text-decoration: none;
}
a[class*="text-white"] {
    color: #ffffff !important;
}
a[style*="background-color"][class*="text-"],
a[style*="background:"][class*="text-"] {
    color: inherit;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .ad-container {
        display: none !important;
    }
}
