/* =============================================================================
   EV Calculators – Shared Design System
   BMW Inspired: #1c69d4 primary, #0653b6 focus, zero border-radius
   ============================================================================= */

/* ── Base wrapper ──────────────────────────────────────────────────────────── */

.ev-calc-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: #262626;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.ev-hero-section {
  background: linear-gradient(135deg, #f0f5fd 0%, #e6edf5 60%, #f8f9fb 100%);
  border: 1px solid rgba(28, 105, 212, 0.35);
  border-radius: 0;
  padding: 44px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.ev-hero-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(28, 105, 212, 0.1) 0%, transparent 65%);
  pointer-events: none;
}

.ev-hero-badge {
  display: inline-block;
  background: #1c69d4;
  color: #ffffff;
  border-radius: 0;
  padding: 4px 14px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.ev-hero-section h1 {
  color: #0d1a23;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 14px 0;
  line-height: 1.2;
}

.ev-hero-subtitle {
  color: #4b5a6a;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  max-width: 640px;
}

/* ── Stat Cards ───────────────────────────────────────────────────────────── */

.ev-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ev-stats-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.ev-stats-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.ev-stat-card {
  background: #ffffff;
  border: 1px solid #e3e6eb;
  border-radius: 0;
  padding: 22px 18px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ev-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: rgba(28, 105, 212, 0.4);
}

.ev-stat-card.highlight {
  border-color: #1c69d4;
  background: linear-gradient(160deg, #f0f5fd 0%, #ffffff 100%);
}

.ev-stat-card.highlight::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1c69d4, #0653b6);
  border-radius: 0;
}

.ev-stat-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
  display: block;
  line-height: 1;
}

.ev-stat-label {
  color: #757575;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  display: block;
}

.ev-stat-value {
  color: #262626;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 5px;
  display: block;
}

.ev-stat-card.highlight .ev-stat-value {
  color: #1c69d4;
}

.ev-stat-value.negative {
  color: #dc2626 !important;
}

.ev-stat-value .ev-green { color: #1c69d4; }
.ev-stat-value .ev-orange { color: #c2570b; }

.ev-stat-value .vs {
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 400;
  margin: 0 5px;
}

.ev-stat-sub {
  color: #9ca3af;
  font-size: 0.7rem;
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Charts ───────────────────────────────────────────────────────────────── */

.ev-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.ev-charts-grid.cols-1 {
  grid-template-columns: 1fr;
}

.ev-chart-card {
  background: #ffffff;
  border: 1px solid #e3e6eb;
  border-radius: 0;
  padding: 24px;
}

.ev-chart-title {
  color: #374151;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ev-chart-card canvas {
  max-height: 300px;
}

/* ── Form section ─────────────────────────────────────────────────────────── */

.ev-form-section {
  background: #ffffff;
  border: 1px solid #e3e6eb;
  border-radius: 0;
  padding: 32px;
  margin-bottom: 24px;
}

.ev-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  flex-wrap: wrap;
  gap: 12px;
}

.ev-form-title {
  color: #262626;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.ev-live-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f0f5fd;
  border: 1px solid rgba(28, 105, 212, 0.4);
  border-radius: 0;
  padding: 5px 13px;
  color: #1c69d4;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ev-live-dot {
  width: 7px;
  height: 7px;
  background: #1c69d4;
  border-radius: 50%;
  animation: ev-pulse 1.6s ease-in-out infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes ev-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Generic form layout inside ev-form-section */
.ev-form-section .ev-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}

.ev-form-section .ev-fields-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.ev-form-section .ev-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ev-form-section .ev-field.full-width {
  grid-column: 1 / -1;
}

.ev-form-section label,
.ev-field-label {
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
  display: block;
}

.ev-form-section input[type="number"],
.ev-form-section input[type="text"],
.ev-form-section select,
.ev-input,
.ev-select {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 0;
  color: #262626;
  padding: 11px 14px;
  font-size: 0.97rem;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  -moz-appearance: textfield;
  appearance: none;
  font-family: inherit;
}

.ev-form-section input[type="number"]::-webkit-inner-spin-button,
.ev-form-section input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ev-form-section input:focus,
.ev-form-section select:focus,
.ev-input:focus,
.ev-select:focus {
  border-color: #1c69d4;
  box-shadow: 0 0 0 3px rgba(28, 105, 212, 0.15);
  outline: none;
  background: #ffffff;
}

.ev-field-desc {
  color: #9ca3af;
  font-size: 0.72rem;
  line-height: 1.4;
}

.ev-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.ev-input-group .ev-input {
  padding-right: 60px;
}

.ev-input-unit {
  position: absolute;
  right: 12px;
  color: #9ca3af;
  font-size: 0.82rem;
  font-weight: 500;
  pointer-events: none;
}

/* Buttons */
.ev-btn-primary {
  background: linear-gradient(135deg, #1c69d4 0%, #0653b6 100%);
  color: #ffffff;
  border: none;
  border-radius: 0;
  padding: 14px 36px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(28, 105, 212, 0.3);
  font-family: inherit;
  width: 100%;
}

.ev-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 105, 212, 0.4);
}

.ev-btn-primary:active {
  transform: translateY(0);
}

/* ── Register CTA ─────────────────────────────────────────────────────────── */

.ev-register-cta {
  background: linear-gradient(135deg, #f0f5fd 0%, #e8f0f9 100%);
  border: 1px solid rgba(28, 105, 212, 0.4);
  border-radius: 0;
  padding: 22px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ev-register-cta-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.ev-register-cta-content {
  flex: 1;
  min-width: 200px;
}

.ev-register-cta-content strong {
  color: #0d1a23;
  font-size: 1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.ev-register-cta-content p {
  color: #4b5a6a;
  font-size: 0.86rem;
  margin: 0;
  line-height: 1.5;
}

.ev-register-cta-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ev-btn-register {
  background: linear-gradient(135deg, #1c69d4 0%, #0653b6 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 0;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 800;
  transition: opacity 0.2s ease, transform 0.12s ease;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(28, 105, 212, 0.3);
}

.ev-btn-register:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.ev-btn-login {
  background: transparent;
  color: #1c69d4;
  text-decoration: none;
  border: 1px solid rgba(28, 105, 212, 0.5);
  border-radius: 0;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.ev-btn-login:hover {
  background: #f0f5fd;
  border-color: #1c69d4;
}

/* Saved indicator (for logged-in users) */
.ev-saved-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f5fd;
  border: 1px solid rgba(28, 105, 212, 0.4);
  border-radius: 0;
  padding: 10px 16px;
  color: #1c69d4;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ev-saved-indicator.visible {
  opacity: 1;
}

/* ── SEO Section ──────────────────────────────────────────────────────────── */

.ev-seo-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 2px solid #e3e6eb;
}

.ev-seo-section > h2 {
  color: #262626;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.ev-seo-section > p {
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 28px 0;
  font-size: 0.95rem;
}

.ev-seo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.ev-seo-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 20px;
}

.ev-seo-card h3 {
  color: #1c69d4;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 9px 0;
  line-height: 1.35;
}

.ev-seo-card p {
  color: #4b5563;
  font-size: 0.85rem;
  line-height: 1.65;
  margin: 0;
}

/* ── FAQ Section ──────────────────────────────────────────────────────────── */

.ev-faq-section h2 {
  color: #262626;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 18px 0;
}

.ev-faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 20px 22px;
  margin-bottom: 10px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ev-faq-item:hover {
  border-color: rgba(28, 105, 212, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ev-faq-item h3 {
  color: #262626;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 9px 0;
}

.ev-faq-item p {
  color: #4b5563;
  font-size: 0.87rem;
  line-height: 1.7;
  margin: 0;
}

.ev-faq-item p strong {
  color: #1c69d4;
  font-weight: 700;
}

/* ── Disclaimer ───────────────────────────────────────────────────────────── */

.ev-disclaimer {
  text-align: center;
  color: #9ca3af;
  font-size: 0.73rem;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

/* ── Status / Spinner ─────────────────────────────────────────────────────── */

.ev-calc-status {
  display: none;
  font-size: 0.78rem;
  color: #1c69d4;
  margin-bottom: 14px;
  align-items: center;
  gap: 8px;
}

.ev-calc-status.visible {
  display: flex;
}

.ev-calc-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(28, 105, 212, 0.3);
  border-top-color: #1c69d4;
  border-radius: 50%;
  animation: ev-spin 0.65s linear infinite;
  flex-shrink: 0;
}

@keyframes ev-spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .ev-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ev-stats-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .ev-hero-section {
    padding: 32px 24px;
  }
  .ev-hero-section h1 {
    font-size: 1.65rem;
  }
  .ev-charts-grid {
    grid-template-columns: 1fr;
  }
  .ev-seo-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ev-form-section .ev-fields-grid.cols-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .ev-stats-grid,
  .ev-stats-grid.cols-3 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ev-stat-card {
    padding: 16px 12px;
  }
  .ev-stat-value {
    font-size: 1.2rem;
  }
  .ev-form-section {
    padding: 22px 18px;
  }
  .ev-form-section .ev-fields-grid,
  .ev-form-section .ev-fields-grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .ev-seo-grid {
    grid-template-columns: 1fr;
  }
  .ev-hero-section {
    padding: 26px 18px;
  }
  .ev-register-cta {
    flex-direction: column;
    text-align: center;
  }
  .ev-register-cta-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .ev-hero-section h1 {
    font-size: 1.4rem;
  }
}
