/* ===================================================================
   MEDIATEA — Component Base
   
   Shared reset, font imports, and base utilities.
   Imported by every component alongside tokens.css.
   =================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&display=swap');

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Font smoothing */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══ Shared Utilities ═══ */

/* Credibility dot — used across multiple card types */
.credibility-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.credibility-high { background: var(--credibility-high); }
.credibility-mixed { background: var(--credibility-mixed); }
.credibility-low { background: var(--credibility-low); }

/* Bias badge — used in hero + other cluster views */
.bias-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.bias-badge--left {
  background: rgba(123, 168, 232, 0.15);
  color: #5A88C8;
}

.bias-badge--center {
  background: rgba(138, 155, 142, 0.15);
  color: var(--text-secondary);
}

.bias-badge--right {
  background: rgba(232, 136, 104, 0.15);
  color: #C87858;
}

/* Article type badge — used across card types */
.article-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-opinion {
  background: rgba(232, 164, 104, 0.15);
  color: var(--type-opinion);
}

.badge-analysis {
  background: rgba(123, 168, 232, 0.15);
  color: var(--type-analysis);
}

.badge-editorial {
  background: rgba(184, 136, 216, 0.15);
  color: var(--type-editorial);
}

.badge-feature {
  background: rgba(104, 200, 184, 0.15);
  color: var(--type-feature);
}

.badge-news {
  background: rgba(123, 158, 135, 0.12);
  color: var(--accent-primary);
}

/* ═══ Shared Animations ═══ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  animation: fadeInUp 0.5s var(--ease-smooth) both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }
.animate-in-delay-5 { animation-delay: 0.5s; }
.animate-in-delay-6 { animation-delay: 0.6s; }
.animate-in-delay-7 { animation-delay: 0.7s; }

/* ═══ Content Spacers ═══ */
.card-spacer {
  height: var(--card-gap);
}

/* Section background transitions */
.section-bg-lavender {
  background: var(--bg-secondary);
  padding-top: var(--space-md);
  padding-bottom: var(--space-lg);
  margin-top: var(--space-md);
  transition: background var(--duration-smooth) var(--ease-smooth);
}

/* Illustration placeholder */
.illustration-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  margin: var(--space-md) var(--feed-padding);
  border: 2px dashed rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.3);
}

.illustration-placeholder-icon {
  font-size: 32px;
  margin-bottom: var(--space-sm);
  opacity: 0.4;
}

.illustration-placeholder-text {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
}
