/**
 * Design Lock skin for Energy Bourse Calculator
 * Brand tokens: navy #0D1B3D · teal #00A88E · paper #F3F5F7
 * Does not change calculation logic — visual fidelity only.
 */

.ebc-calculator.ebc-skin-lock {
  --ebc-navy: #0D1B3D;
  --ebc-navy-2: #162B5B;
  --ebc-teal: #00A88E;
  --ebc-teal-dark: #008C76;
  --ebc-teal-soft: #E6F7F4;
  --ebc-green: #16A34A;
  --ebc-orange: #F59E0B;
  --ebc-red: #DC2626;
  --ebc-ink: #111827;
  --ebc-muted: #6B7280;
  --ebc-line: #E2E8F0;
  --ebc-bg: #F3F5F7;
  --ebc-card: #FFFFFF;
  max-width: 56rem;
  margin: 0 auto 2rem;
  padding: 0;
}

/* —— Light educational intro (replaces dark industrial hero) —— */
.ebc-skin-lock .ebc-page-intro {
  text-align: center;
  padding: 0.5rem 0.25rem 1.75rem;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 0;
  color: var(--ebc-navy);
  display: block;
}
.ebc-skin-lock .ebc-page-intro::before,
.ebc-skin-lock .ebc-page-intro::after {
  display: none !important;
}
.ebc-skin-lock .ebc-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ebc-line);
  color: var(--ebc-teal);
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(13, 27, 61, 0.04);
}
.ebc-skin-lock .ebc-page-badge-icon {
  font-size: 0.95rem;
  line-height: 1;
}
.ebc-skin-lock .ebc-page-intro h2 {
  margin: 0.85rem 0 0.5rem !important;
  color: var(--ebc-navy) !important;
  font-size: clamp(1.35rem, 3.5vw, 2.15rem) !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.02em;
}
.ebc-skin-lock .ebc-page-intro > p {
  margin: 0 auto !important;
  max-width: 36rem;
  color: var(--ebc-muted) !important;
  font-size: 0.875rem !important;
  line-height: 1.8 !important;
}
.ebc-skin-lock .ebc-page-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.ebc-skin-lock .ebc-page-meta span {
  padding: 0.35rem 0.75rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid var(--ebc-line);
  color: #475569;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Hide legacy dark hero if any leftover markup */
.ebc-skin-lock .ebc-hero {
  display: none !important;
}

/* —— Stepper —— */
.ebc-skin-lock .ebc-stepper {
  margin: 0 0 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--ebc-line);
  background: #fff;
  box-shadow: 0 1px 3px rgba(13, 27, 61, 0.04);
  overflow: hidden;
}
.ebc-skin-lock .ebc-step {
  color: #94a3b8;
  border-left-color: var(--ebc-line);
}
.ebc-skin-lock .ebc-step span {
  border-radius: 999px;
  width: 2.15rem;
  height: 2.15rem;
  background: #f1f5f9;
  font-weight: 800;
}
.ebc-skin-lock .ebc-step.is-active {
  color: var(--ebc-navy);
  background: linear-gradient(180deg, #f8fffd, #fff);
}
.ebc-skin-lock .ebc-step.is-active span {
  background: var(--ebc-navy);
  color: #fff;
  box-shadow: 0 0 0 4px #f1f5f9;
}
.ebc-skin-lock .ebc-step.is-done span {
  background: var(--ebc-teal);
  color: #fff;
}

/* —— Cards / fields —— */
.ebc-skin-lock .ebc-section,
.ebc-skin-lock .ebc-quick-panel,
.ebc-skin-lock .ebc-result-card {
  border-radius: 1.5rem;
  border-color: var(--ebc-line);
  box-shadow: 0 4px 24px rgba(13, 27, 61, 0.05);
}
.ebc-skin-lock .ebc-section:focus-within {
  border-color: rgba(0, 168, 142, 0.45);
  box-shadow: 0 8px 28px rgba(13, 27, 61, 0.07), 0 0 0 3px rgba(0, 168, 142, 0.08);
}
.ebc-skin-lock .ebc-section-number {
  background: var(--ebc-teal-soft);
  color: var(--ebc-teal-dark);
  border-radius: 0.85rem;
}
.ebc-skin-lock .ebc-section-head h3 {
  color: var(--ebc-navy) !important;
}
.ebc-skin-lock .ebc-field-card {
  border-radius: 1rem;
  background: #f8fafc;
  border-color: #e8eef4;
}
.ebc-skin-lock .ebc-field-card:focus-within {
  background: #fff;
  border-color: rgba(0, 168, 142, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 168, 142, 0.1);
}
.ebc-skin-lock .ebc-field-card input,
.ebc-skin-lock .ebc-field-card select {
  border-radius: 0.75rem !important;
  border-color: #cbd5e1 !important;
}
.ebc-skin-lock .ebc-field-card input:focus,
.ebc-skin-lock .ebc-field-card select:focus {
  border-color: var(--ebc-teal) !important;
  box-shadow: 0 0 0 3px rgba(0, 168, 142, 0.12) !important;
}
.ebc-skin-lock .ebc-field-hint {
  display: block;
  margin: -0.15rem 0 0.35rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
}
.ebc-skin-lock .ebc-help {
  position: relative;
  box-sizing: content-box;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 8px;
  margin: -8px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid #9fc3cf;
  border-radius: 50%;
  background: #e8f6f6;
  color: #087f80;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  outline: 0;
}
.ebc-skin-lock .ebc-field-mid {
  background: #f8fafc;
}
.ebc-skin-lock .ebc-field-peak {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}
.ebc-skin-lock .ebc-field-peak .ebc-label {
  color: #92400e;
}
.ebc-skin-lock .ebc-field-low {
  background: rgba(22, 163, 74, 0.07);
  border-color: rgba(22, 163, 74, 0.3);
}
.ebc-skin-lock .ebc-field-low .ebc-label {
  color: #14532d;
}

/* —— Live summary —— */
.ebc-skin-lock .ebc-live-summary > div {
  border-radius: 0.9rem;
  background: linear-gradient(180deg, var(--ebc-teal-soft), #fff);
  border-color: rgba(0, 168, 142, 0.2);
}
.ebc-skin-lock .ebc-live-summary strong {
  color: var(--ebc-teal-dark);
}

/* —— CTAs —— */
.ebc-skin-lock .ebc-submit,
.ebc-skin-lock .ebc-primary,
.ebc-skin-lock .ebc-lead-submit {
  background: var(--ebc-teal) !important;
  background-image: none !important;
  border-radius: 0.85rem !important;
  box-shadow: 0 6px 16px rgba(0, 168, 142, 0.22) !important;
}
.ebc-skin-lock .ebc-submit:hover,
.ebc-skin-lock .ebc-lead-submit:hover {
  background: var(--ebc-teal-dark) !important;
}
.ebc-skin-lock .ebc-secondary-action,
.ebc-skin-lock .ebc-link-primary {
  border-color: rgba(0, 168, 142, 0.35);
  background: var(--ebc-teal-soft);
  color: var(--ebc-teal-dark);
  border-radius: 0.75rem;
}
.ebc-skin-lock .ebc-quick-panel {
  background: linear-gradient(165deg, #fff 0%, #f8fffd 100%);
  border: 1px solid rgba(0, 168, 142, 0.22);
}
.ebc-skin-lock .ebc-quick-kicker {
  color: var(--ebc-teal);
  font-weight: 800;
  font-size: 0.7rem;
}
.ebc-skin-lock .ebc-quick-badge {
  background: var(--ebc-navy);
  color: #fff;
}

/* —— Results —— */
.ebc-skin-lock .ebc-result-card:before {
  background: linear-gradient(90deg, var(--ebc-teal), #5eead4);
}
.ebc-skin-lock .ebc-result-status h3,
.ebc-skin-lock .ebc-kpi b {
  color: var(--ebc-navy) !important;
}
.ebc-skin-lock .ebc-kpi-buy:after {
  background: var(--ebc-teal);
}
.ebc-skin-lock .ebc-chart-row-buy i {
  background: linear-gradient(90deg, var(--ebc-teal), #5eead4);
}

/* —— Lead modal —— */
.ebc-skin-lock ~ .ebc-lead-modal .ebc-lead-dialog,
.ebc-lead-modal .ebc-lead-dialog {
  border-radius: 1.5rem;
  border-color: var(--ebc-line);
  background: #fff;
}
.ebc-lead-modal .ebc-lead-dialog-icon {
  background: var(--ebc-teal-soft);
  color: var(--ebc-teal);
  border-radius: 1rem;
}
.ebc-lead-modal .ebc-lead-dialog-copy > span {
  color: var(--ebc-teal);
}
.ebc-lead-modal .ebc-lead-dialog-copy h3 {
  color: var(--ebc-navy) !important;
}
.ebc-lead-modal .ebc-lead-submit {
  background: var(--ebc-teal) !important;
  background-image: none !important;
}

/* —— Errors / empty —— */
.ebc-skin-lock .ebc-alert-error {
  border-radius: 1rem;
  border-color: #fecdd3;
  background: #fff1f2;
  color: #9f1239;
  font-size: 0.875rem;
  line-height: 1.75;
}
.ebc-skin-lock .ebc-alert-error strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.ebc-skin-lock .ebc-alert-error p {
  margin: 0 !important;
  color: inherit !important;
  font-size: 0.8rem !important;
}
.ebc-skin-lock .ebc-inline-error:not([hidden]) {
  display: block;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  font-size: 0.8rem;
  font-weight: 700;
}

/* —— Mobile —— */
@media (max-width: 640px) {
  .ebc-skin-lock {
    margin-bottom: 1.25rem;
  }
  .ebc-skin-lock .ebc-page-intro {
    padding-bottom: 1.1rem;
  }
  .ebc-skin-lock .ebc-page-meta {
    display: none;
  }
  /* Compact stepper: show active title prominently; shrink inactive labels */
  .ebc-skin-lock .ebc-stepper {
    border-radius: 0.85rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ebc-skin-lock .ebc-step {
    flex-direction: column;
    gap: 0.3rem;
    min-height: 3.75rem;
    padding: 0.55rem 0.25rem;
  }
  .ebc-skin-lock .ebc-step b {
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: 700;
  }
  .ebc-skin-lock .ebc-step:not(.is-active) b {
    display: none;
  }
  .ebc-skin-lock .ebc-step.is-active b {
    display: block;
    font-size: 0.8rem;
  }
  .ebc-skin-lock .ebc-step span {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.75rem;
  }
  .ebc-skin-lock .ebc-field-hint {
    font-size: 0.75rem;
  }
  .ebc-skin-lock .ebc-section {
    padding: 1.1rem;
    border-radius: 1.1rem;
  }
  .ebc-skin-lock .ebc-quick-actions {
    flex-direction: column;
  }
  .ebc-skin-lock .ebc-quick-actions .ebc-submit,
  .ebc-skin-lock .ebc-quick-actions .ebc-secondary-action {
    width: 100%;
    min-width: 0;
  }
  .ebc-skin-lock .ebc-submit-row {
    border-radius: 1rem;
  }
}

@media (max-width: 390px) {
  .ebc-skin-lock .ebc-page-intro h2 {
    font-size: 1.2rem !important;
  }
  .ebc-skin-lock .ebc-field-card {
    padding: 0.85rem;
  }
}

/* Theme page shell */
body.ebc-calculator-page .jb-bill-analysis {
  max-width: 56rem;
  margin-inline: auto;
}

/* Account save CTA after result */
.ebc-account-banner{
  margin-top:1.1rem;padding:1rem 1.15rem;border-radius:1rem;border:1px dashed rgba(0,168,142,.45);
  background:linear-gradient(165deg,#E6F7F4,#fff);text-align:right;
}
.ebc-account-banner--ok{border-style:solid;background:#E6F7F4}
.ebc-account-banner strong{display:block;color:#0D1B3D;font-size:.9rem;margin-bottom:.35rem}
.ebc-account-banner p{margin:0 0 .75rem!important;color:#64748b!important;font-size:.75rem!important;line-height:1.7!important}
.ebc-account-banner a{font-size:.8rem;font-weight:800;color:#00A88E}
.ebc-account-banner-cta{
  display:inline-flex;align-items:center;justify-content:center;margin:.25rem 0 .5rem;
  padding:.7rem 1.1rem;border-radius:.75rem;background:#00A88E!important;color:#fff!important;
  text-decoration:none!important;font-size:.8rem!important;font-weight:800!important;
}
.ebc-account-banner-cta:hover{background:#008C76!important}
.ebc-account-banner-link{display:inline-block;margin-right:.75rem;font-size:.75rem!important}
@media(max-width:640px){
  .ebc-account-banner-cta{width:100%}
  .ebc-account-banner-link{display:block;margin:.5rem 0 0;text-align:center}
}
