/* ==========================================================================
   EV Savings — site-wide styles
   Tailwind (via CDN) handles utility classes; this file holds everything
   custom: theme colors, glass cards, the calculator chart, and article
   typography used across research/guide pages.
   ========================================================================== */

:root {
  --primary: #2dd4bf;
  --primary-glow: rgba(45, 212, 191, 0.4);
  --gas: #64748b;
  --bg-dark: #0f172a;
}

body {
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
  color: #f1f5f9;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', ui-sans-serif, system-ui, sans-serif;
}

.glass-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.input-glow:focus {
  box-shadow: 0 0 15px var(--primary-glow);
  border-color: var(--primary);
}

/* ---- Calculator chart ---- */

.chart-area {
  height: 350px;
  display: flex;
  align-items: flex-end;
  padding: 20px 0 0 60px;
  position: relative;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.bar-group {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 100%;
  position: relative;
  z-index: 1;
}

.bar {
  width: 30%;
  border-radius: 4px 4px 0 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: crosshair;
}

.bar-gas { background: linear-gradient(to top, #475569, #94a3b8); }
.bar-ev { background: linear-gradient(to top, #0d9488, #2dd4bf); box-shadow: 0 0 10px var(--primary-glow); }

.bar .tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -10px);
  background: #f1f5f9;
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  box-shadow: 0 10px 15px rgba(0,0,0,0.3);
}

.bar:hover .tooltip {
  opacity: 1;
  transform: translate(-50%, -15px);
}

.y-axis-label {
  position: absolute;
  left: -55px;
  top: 50%;
  transform: rotate(-90deg);
  font-size: 10px;
  font-weight: bold;
  color: #94a3b8;
  letter-spacing: 0.1em;
}

.savings-highlight {
  background: linear-gradient(135deg, #115e59 0%, #0d9488 100%);
  border: 1px solid rgba(45, 212, 191, 0.3);
}

/* ---- Tooltips on input labels ---- */

.custom-tooltip-container { position: relative; display: inline-block; }

.info-trigger {
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  font-size: 10px;
  margin-left: 4px;
  color: #2dd4bf;
  font-weight: bold;
}

.tooltip-box {
  visibility: hidden;
  width: 220px;
  background-color: #1e293b;
  color: #f1f5f9;
  text-align: center;
  border-radius: 8px;
  padding: 10px;
  position: absolute;
  z-index: 50;
  bottom: 125%;
  left: 50%;
  margin-left: -110px;
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid rgba(45, 212, 191, 0.3);
  font-size: 10px;
  font-weight: normal;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 10px 15px rgba(0,0,0,0.4);
}

.custom-tooltip-container:hover .tooltip-box { visibility: visible; opacity: 1; }

.tooltip-box.tooltip-below {
  bottom: auto;
  top: 125%;
  left: auto;
  right: -8px;
  margin-left: 0;
}

select option { background: #1e293b; color: white; }

/* ---- Article / research page typography ---- */

.article-content h2, .article-content h3 {
  color: #2dd4bf;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.article-content h2 { font-size: 1.5rem; }
.article-content h3 { font-size: 1.1rem; color: #f1f5f9; }

.article-content p {
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.article-content strong { color: #f1f5f9; }

.article-content ul, .article-content ol {
  color: #94a3b8;
  line-height: 1.8;
}

/* ---- Myth verdict badges (research articles) ---- */

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.verdict-myth {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #f87171;
}

.verdict-true {
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #2dd4bf;
}

.verdict-partly {
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #facc15;
}

/* ---- Affiliate links & product cards ---- */

.affiliate-link {
  color: #2dd4bf;
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.4);
  text-underline-offset: 3px;
  font-weight: 700;
}

.affiliate-link:hover { text-decoration-color: #2dd4bf; }

/* Citations to outside research/reports — same visual treatment as an
   affiliate link, but semantically distinct (not sponsored, not nofollow). */
.source-link {
  color: #94a3b8;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.4);
  text-underline-offset: 3px;
  font-weight: 600;
}

.source-link:hover { color: #f1f5f9; text-decoration-color: #f1f5f9; }

.sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.product-card:hover {
  border-color: rgba(45, 212, 191, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 20px 30px -15px rgba(0,0,0,0.6);
}

.sidebar-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #2dd4bf;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
  text-decoration: none;
}

.sidebar-cta:hover { color: #5eead4; }

/* ---- Research hub cards ---- */

.myth-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: all 0.25s ease;
  display: block;
}

.myth-card:hover {
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateY(-3px);
}
