/* =====================================================
   src/styles/top-picks.css
   Seção Top Picks — grid responsivo de cards de análise
   ===================================================== */

:root {
  --tp-high:   #00e5a0;
  --tp-medium: #f59e0b;
  --tp-low:    #ef4444;
  --tp-bg-card: #12121f;
  --tp-border:  rgba(255,255,255,0.08);
  --tp-border-high:   rgba(0, 229, 160, 0.35);
  --tp-border-medium: rgba(245, 158, 11, 0.35);
  --tp-border-low:    rgba(239, 68, 68, 0.35);
}

/* ————— Seção ————— */
.tp-section {
  padding: 8px 0 32px;
}

.tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
}

.tp-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp-title-icon {
  font-size: 1.4rem;
}

.tp-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp-today-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 229, 160, 0.15);
  color: var(--tp-high);
  border: 1px solid rgba(0, 229, 160, 0.3);
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.tp-counter {
  font-size: 0.8rem;
  color: var(--text-secondary, #888);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--tp-border);
  padding: 4px 12px;
  border-radius: 20px;
}

.tp-schedule-note {
  font-size: 12px;
  color: var(--text-secondary, #888);
  opacity: 0.65;
  margin: 4px 0 0 0;
  letter-spacing: 0.2px;
  line-height: 1.4;
}

/* ————— Grid ————— */
.tp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1199px) {
  .tp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .tp-grid { grid-template-columns: 1fr; }
}

/* ————— Card ————— */
.tp-card {
  background: var(--tp-bg-card);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--tp-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Borda lateral de cor por nível */
.tp-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
}

.tp-card--high {
  border-color: var(--tp-border-high);
}
.tp-card--high::before { background: var(--tp-high); }

.tp-card--medium {
  border-color: var(--tp-border-medium);
}
.tp-card--medium::before { background: var(--tp-medium); }

.tp-card--low {
  border-color: var(--tp-border-low);
}
.tp-card--low::before { background: var(--tp-low); }

/* ————— Destaque: Forte oportunidade ————— */
.tp-card--strong {
  border-color: rgba(0, 229, 160, 0.55);
  box-shadow: 0 0 18px rgba(0, 229, 160, 0.13), 0 4px 24px rgba(0, 0, 0, 0.45);
}
.tp-card--strong:hover {
  box-shadow: 0 0 28px rgba(0, 229, 160, 0.20), 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ————— Badge de rating ————— */
.tp-card-badge {
  min-height: 22px;
}

.tp-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.tp-rating-badge--strong {
  background: rgba(0, 229, 160, 0.13);
  color: #00e5a0;
  border: 1px solid rgba(0, 229, 160, 0.4);
}

.tp-rating-badge--moderate {
  background: rgba(59, 130, 246, 0.13);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.tp-rating-badge--watch {
  background: rgba(148, 163, 184, 0.10);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

/* ————— Header do card ————— */
.tp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tp-league {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary, #888);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.tp-time {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  font-variant-numeric: tabular-nums;
}

/* ————— Times ————— */
.tp-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tp-team {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.tp-vs {
  font-size: 0.75rem;
  color: var(--text-secondary, #666);
  font-weight: 500;
}

/* ————— Confiança ————— */
.tp-confidence {
  text-align: center;
}

.tp-pct {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.tp-level {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary, #888);
  margin-top: 4px;
}

/* ————— Chip do pick ————— */
.tp-pick-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  padding: 10px 14px;
}

.tp-market {
  font-size: 0.75rem;
  color: var(--text-secondary, #888);
  font-weight: 600;
}

.tp-pick-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
}

/* ————— Botões ————— */
.tp-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tp-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tp-btn--free {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}
.tp-btn--free:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
}

.tp-btn--ai {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.3);
}
.tp-btn--ai:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
}

.tp-btn--unlock {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.4);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  letter-spacing: 0.4px;
}
.tp-btn--unlock:hover {
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.6);
}

/* ————— Accordion ————— */
.tp-accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.tp-accordion--open {
  max-height: 400px;
}

.tp-accordion-inner {
  padding-top: 4px;
  border-top: 1px solid var(--tp-border);
}

.tp-explanation {
  font-size: 0.85rem;
  color: var(--text-secondary, #aaa);
  line-height: 1.6;
  margin: 12px 0 10px;
}

.tp-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tp-stats li {
  font-size: 0.8rem;
  color: var(--text-secondary, #aaa);
  padding: 6px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  position: relative;
  padding-left: 22px;
}

.tp-stats li::before {
  content: '▸';
  position: absolute;
  left: 8px;
  color: var(--tp-high);
  font-size: 0.7rem;
}

/* ————— Card com preview Premium ————— */
.tp-card--preview {
  /* position:relative já está no .tp-card pai */
  overflow: hidden;
}

/* Linhas visíveis (1 frase + 1 bullet mascarado) */
.tp-preview-visible {
  display: block;
}

.tp-stats--preview {
  /* bullet preview sem detalhe numérico */
  opacity: 0.75;
}

/* Conteúdo borrado */
.tp-premium-blur {
  filter: blur(5px);
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Overlay de upgrade */
.tp-premium-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 20px 20px;
  background: linear-gradient(transparent, rgba(10, 10, 22, 0.96) 40%);
  border-radius: 0 0 16px 16px;
  cursor: pointer;
  z-index: 5;
}

.tp-premium-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.tp-lock-icon {
  font-size: 1.6rem;
}

.tp-lock-msg {
  font-size: 0.82rem;
  color: var(--text-secondary, #aaa);
  line-height: 1.5;
  max-width: 200px;
  margin: 0;
}

/* Card Bloqueado legado (mantido para compatibilidade) */
.tp-card--locked {
  border-color: rgba(124, 58, 237, 0.2);
}

.tp-locked-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  height: 100%;
  min-height: 220px;
  padding: 20px;
}

/* Blocker inline de IA */
.tp-ai-blocker {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 24, 0.92);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
}

/* ————— Empty state ————— */
.tp-empty {
  text-align: center;
  color: var(--text-secondary, #888);
  padding: 40px;
  font-size: 0.9rem;
}

/* ————— Skeleton loading ————— */
.tp-loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 0 0 8px;
}

.tp-card-skeleton {
  background: var(--tp-bg-card, #12121f);
  border: 1px solid var(--tp-border, rgba(255,255,255,0.08));
  border-radius: 16px;
  height: 220px;
  position: relative;
  overflow: hidden;
}

.tp-card-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.04) 50%,
    transparent 100%
  );
  animation: tp-shimmer 1.4s ease-in-out infinite;
}

@keyframes tp-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ──────────────────────────────────────────────────
   Separadores de seção no grid
────────────────────────────────────────────────── */
.tp-section-sep {
  grid-column: 1 / -1;          /* spaná o grid inteiro */
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 2px 2px;
  margin-top: 4px;
  opacity: 0.85;
}

.tp-section-sep--live   { color: #ff4d4d; }
.tp-section-sep--upcoming { color: #94a3b8; }
.tp-section-sep--finished { color: #64748b; }

/* Ponto pulsante para AO VIVO */
.tp-sep-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4d;
  animation: tp-live-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes tp-live-pulse {
  0%, 100% { opacity: 1;   transform: scale(1);    box-shadow: 0 0 0 0 rgba(255,77,77,.7); }
  50%       { opacity: 0.7; transform: scale(1.15); box-shadow: 0 0 0 6px rgba(255,77,77,0); }
}

/* ──────────────────────────────────────────────────
   Badges de status (AO VIVO / ENCERRADO)
────────────────────────────────────────────────── */
.tp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.67rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.tp-status-badge--live {
  background: rgba(255, 77, 77, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 77, 77, 0.4);
}

.tp-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4d4d;
  animation: tp-live-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.tp-status-badge--finished {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* Botão IA desabilitado */
.tp-btn--disabled {
  opacity: 0.38 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}
