/* ==========================================================================
   ULTRA-HIGH READABILITY STANDARD FONT SYSTEM (SENIOR & ALL AGES OPTIMIZED)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after, html, body, h1, h2, h3, h4, h5, h6, p, span, div, a, button, input, select, textarea, label, table, th, td, code, pre {
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* ==========================================================================
   EV SAVINGS CALCULATOR — Reference Matched Ola/Astar 2-Column Stacked Bar Suite
   ========================================================================== */

/* ── Section Wrapper ── */
.ev-calc-section {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.2rem, 5vw, 2.5rem);
  background: #eef8f6;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

body:not(.light-theme):not([data-theme="light"]) .ev-calc-section {
  background: #09111c;
}

body.light-theme .ev-calc-section,
[data-theme="light"] .ev-calc-section {
  background: #eef8f6 !important;
}

/* ── Container Layout ── */
.ev-calc-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* ── Left Column ── */
.ev-calc-left-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ev-selects-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.ev-custom-select-wrap {
  position: relative;
}

.ev-calc-select {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%206b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.75rem center;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 0.5rem 2.2rem 0.5rem 0.95rem;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1f2937;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.ev-calc-select:hover {
  border-color: #059669;
}

body:not(.light-theme):not([data-theme="light"]) .ev-calc-select {
  background-color: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

.ev-calc-hero-title {
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 0.8rem 0;
}

body:not(.light-theme):not([data-theme="light"]) .ev-calc-hero-title {
  color: #ffffff;
}

.ev-calc-hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: #4b5563;
  margin: 0 0 2rem 0;
}

body:not(.light-theme):not([data-theme="light"]) .ev-calc-hero-subtitle {
  color: #94a3b8;
}

.ev-hero-stats-row {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.ev-hero-stat-box {
  display: flex;
  flex-direction: column;
}

.ev-hero-stat-amount {
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #00a854;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body:not(.light-theme):not([data-theme="light"]) .ev-hero-stat-amount {
  color: #00ff88;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.ev-hero-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  margin-top: 0.25rem;
}

body:not(.light-theme):not([data-theme="light"]) .ev-hero-stat-label {
  color: #94a3b8;
}

.ev-calc-expert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #00a854;
  text-decoration: none;
  transition: all 0.2s ease;
}

body:not(.light-theme):not([data-theme="light"]) .ev-calc-expert-link {
  color: #00ff88;
}

.ev-calc-expert-link:hover {
  transform: translateX(3px);
}

/* ── Right Column ── */
.ev-calc-right-col {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 24px;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

body:not(.light-theme):not([data-theme="light"]) .ev-calc-right-col {
  background: #111a28;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ev-slider-header {
  margin-bottom: 0.6rem;
}

.ev-slider-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

body:not(.light-theme):not([data-theme="light"]) .ev-slider-title {
  color: #cbd5e1;
}

.ev-slider-title strong {
  color: #0f172a;
  font-weight: 800;
}

body:not(.light-theme):not([data-theme="light"]) .ev-slider-title strong {
  color: #ffffff;
}

/* ── Slider Overrides ── */
.ev-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.ev-neon-slider {
  width: 100% !important;
  height: 12px !important;
  border-radius: 999px !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  background: #cbd5e1 !important;
  margin: 0 !important;
}

body:not(.light-theme):not([data-theme="light"]) .ev-neon-slider {
  background: rgba(255, 255, 255, 0.15) !important;
}

.ev-neon-slider::-webkit-slider-runnable-track {
  width: 100% !important;
  height: 12px !important;
  border-radius: 999px !important;
  background: transparent !important;
  border: none !important;
  -webkit-appearance: none !important;
}

.ev-neon-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 3.5px solid #00a854 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  cursor: grab !important;
  margin-top: -7px !important;
  transition: transform 0.15s ease !important;
}

body:not(.light-theme):not([data-theme="light"]) .ev-neon-slider::-webkit-slider-thumb {
  border-color: #00ff88 !important;
  box-shadow: 0 0 16px #00ff88 !important;
}

.ev-slider-labels {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #9ca3af !important;
}

/* ── Stacked Bar Chart Box ── */
.ev-stacked-chart-box {
  position: relative;
  display: flex;
  height: 240px;
  margin-top: 0.5rem;
}

.ev-chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 200px;
  width: 45px;
  padding-right: 0.4rem;
}

.ev-y-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
  text-align: right;
  line-height: 1;
}

.ev-chart-bars-area {
  flex: 1;
  height: 200px;
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  border-bottom: 1.5px solid #d1d5db;
}

body:not(.light-theme):not([data-theme="light"]) .ev-chart-bars-area {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.ev-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  border-bottom: 1px dashed #e5e7eb;
  pointer-events: none;
}

body:not(.light-theme):not([data-theme="light"]) .ev-grid-line {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.line-5k { top: 0%; }
.line-4k { top: 20%; }
.line-3k { top: 40%; }
.line-2k { top: 60%; }
.line-1k { top: 80%; }
.line-0k { top: 100%; }

.ev-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  width: 100px;
  height: 100%;
  justify-content: flex-end;
}

.ev-stacked-bar {
  width: 64px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.ev-bar-segment {
  width: 100%;
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Colors matching screenshot */
.seg-fixed-ice,
.seg-fixed-ev {
  background: #1c2b2b;
}

body:not(.light-theme):not([data-theme="light"]) .seg-fixed-ice,
body:not(.light-theme):not([data-theme="light"]) .seg-fixed-ev {
  background: #1e293b;
}

.seg-maint-ice {
  background: #4b85d1;
}

.seg-running-ice {
  background: #b8c0e6;
}

.seg-running-ev {
  background: #d1d5db;
}

body:not(.light-theme):not([data-theme="light"]) .seg-running-ev {
  background: #475569;
}

.seg-savings-ev {
  background: #00a854;
  box-shadow: 0 0 15px rgba(0, 168, 84, 0.4);
}

body:not(.light-theme):not([data-theme="light"]) .seg-savings-ev {
  background: #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.ev-bar-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 0.75rem;
  text-align: center;
}

body:not(.light-theme):not([data-theme="light"]) .ev-bar-name {
  color: #f1f5f9;
}

/* ── Chart Legend ── */
.ev-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
}

body:not(.light-theme):not([data-theme="light"]) .ev-chart-legend {
  color: #cbd5e1;
}

.ev-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ev-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-fixed { background: #1c2b2b; }
.dot-maint { background: #4b85d1; }
.dot-running { background: #b8c0e6; }
.dot-savings { background: #00a854; }

body:not(.light-theme):not([data-theme="light"]) .dot-savings { background: #00ff88; }

/* ── Mobile Responsiveness (≤ 768px & ≤ 480px) ── */
@media (max-width: 840px) {
  .ev-calc-container {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .ev-calc-hero-title {
    font-size: 2.1rem;
  }

  .ev-hero-stats-row {
    gap: 1.8rem;
  }

  .ev-hero-stat-amount {
    font-size: 2rem;
  }

  .ev-stacked-bar {
    width: 54px;
  }

  .ev-chart-legend {
    gap: 0.8rem 1rem;
    font-size: 0.75rem;
  }
}
