/*
 * Compare alternatives modal - runs the user's scenario through a dozen
 * variants and shows the result side-by-side in a branded table.
 * Shares the Excelergy palette with setup-wizard.css for consistency.
 */

.ecmp-backdrop{
  position:fixed; inset:0; background:rgba(1,14,38,.55); z-index:8900;
  display:none; align-items:flex-start; justify-content:center;
  padding:24px 16px 72px; overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.ecmp-backdrop.open{ display:flex; animation: ecmpFade .18s ease-out }
@keyframes ecmpFade { from{opacity:0} to{opacity:1} }

.ecmp-shell{
  width:100%; max-width:1200px; display:flex; flex-direction:column; gap:12px;
}

.ecmp-brand{
  display:flex; align-items:center; gap:12px;
  color:#fff; font-size:14px;
}
.ecmp-brand-mark{
  width:36px; height:36px; border-radius:9px;
  background:rgba(255,255,255,.08);
  padding:4px;
  object-fit:contain;
}
.ecmp-brand-text{ display:flex; flex-direction:column; line-height:1.2 }
.ecmp-brand-text .product{ font-weight:600; opacity:.95 }
.ecmp-brand-text .subhead{ font-size:12px; opacity:.75 }
.ecmp-close{
  margin-left:auto; background:rgba(255,255,255,.1); color:#fff;
  border:1px solid rgba(255,255,255,.2); border-radius:8px;
  padding:6px 12px; font-size:13px; cursor:pointer;
}
.ecmp-close:hover{ background:rgba(255,255,255,.2); }

.ecmp-card{
  background:var(--card-solid, #ffffff); color:var(--text);
  border:1px solid var(--border); border-radius:14px;
  padding:24px; box-shadow:0 10px 30px rgba(1,14,38,.2);
}

.ecmp-header{
  display:flex; align-items:baseline; gap:12px; flex-wrap:wrap;
  margin:0 0 6px;
}
.ecmp-header h1{
  margin:0; font-size:22px; letter-spacing:-.01em; font-weight:650;
}
.ecmp-header .baseline-chip{
  font-size:12px; background:var(--primary-soft); color:var(--primary-dark);
  padding:3px 10px; border-radius:999px; font-weight:600;
}
.ecmp-sub{ margin:0 0 16px; color:var(--muted); font-size:14px; line-height:1.5 }

.ecmp-caveat{
  padding:12px 14px; background:#fef3c7; border:1px solid #fde68a;
  border-radius:10px; color:#78350f; font-size:13px; margin:0 0 16px;
  line-height:1.5;
}
.ecmp-caveat strong{ color:#78350f }

.ecmp-loading{
  padding:40px 16px; text-align:center; color:var(--muted);
}
.ecmp-spinner{
  width:40px; height:40px; margin:0 auto 16px;
  border:3px solid var(--border); border-top-color:var(--primary);
  border-radius:50%; animation: ecmpSpin 0.9s linear infinite;
}
@keyframes ecmpSpin { to{ transform:rotate(360deg) } }
.ecmp-loading .status{
  font-size:13px; color:var(--muted); margin-top:8px;
}

.ecmp-table-wrap{
  overflow-x:auto; margin:0 -4px 16px; padding:0 4px;
  -webkit-overflow-scrolling:touch;
}
.ecmp-table{
  width:100%; border-collapse:separate; border-spacing:0;
  font-size:13.5px;
}
.ecmp-table thead th{
  position:sticky; top:0; z-index:2;
  background:var(--bg-soft, #f5f8fb); color:var(--muted);
  font-size:11px; text-transform:uppercase; letter-spacing:.04em;
  font-weight:700; text-align:left;
  padding:10px 10px; border-bottom:2px solid var(--border);
  white-space:nowrap;
}
.ecmp-table thead th.num{ text-align:right }
.ecmp-table tbody tr{
  border-bottom:1px solid var(--border);
}
.ecmp-table tbody tr.baseline{
  background:var(--primary-soft);
  position:relative;
}
.ecmp-table tbody tr.baseline td:first-child{
  font-weight:700; color:var(--primary-dark);
}
.ecmp-table tbody tr.group-header td{
  background:#eef4fa; padding:6px 10px;
  font-size:11px; text-transform:uppercase; letter-spacing:.04em;
  color:var(--muted); font-weight:700;
}
.ecmp-table tbody tr:hover{ background:rgba(0,196,240,.04) }
.ecmp-table tbody tr.baseline:hover{ background:var(--primary-soft) }
.ecmp-table td{
  padding:10px 10px; vertical-align:middle;
}
.ecmp-table td.num{
  text-align:right; font-variant-numeric:tabular-nums;
  font-feature-settings: 'tnum';
}
.ecmp-table td.lever{
  color:var(--muted); font-size:12.5px;
}
.ecmp-delta-pos{ color:#15803d; font-weight:600 }
.ecmp-delta-neg{ color:#b1251b; font-weight:600 }
.ecmp-delta-flat{ color:var(--muted) }
.ecmp-save-btn{
  background:transparent; border:1.5px solid var(--border-strong);
  color:var(--primary); border-radius:8px;
  padding:5px 10px; font-size:12px; font-weight:600;
  cursor:pointer; white-space:nowrap;
  transition:border-color .15s, background .15s;
}
.ecmp-save-btn:hover{ border-color:var(--primary); background:var(--primary-soft) }
.ecmp-save-btn.saved{
  color:#15803d; border-color:#86efac; background:#dcfce7;
  cursor:default;
}

.ecmp-actions{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  padding-top:12px; border-top:1px solid var(--border);
}
.ecmp-btn{
  padding:10px 16px; border-radius:10px; border:1.5px solid transparent;
  font-size:14px; font-weight:600; cursor:pointer;
  transition:background .15s, border-color .15s;
}
.ecmp-btn-primary{ background:var(--primary); color:#fff; border-color:var(--primary) }
.ecmp-btn-primary:hover{ background:var(--primary-dark) }
.ecmp-btn-outline{
  background:transparent; color:var(--primary); border-color:var(--border-strong);
}
.ecmp-btn-outline:hover{ border-color:var(--primary) }
.ecmp-btn-ghost{ background:transparent; color:var(--muted); border-color:transparent }
.ecmp-btn-ghost:hover{ color:var(--text) }
.ecmp-spacer{ flex:1 }
.ecmp-toast{
  font-size:13px; color:var(--muted); margin-left:10px;
  opacity:0; transition:opacity .2s;
}
.ecmp-toast.show{ opacity:1 }
.ecmp-toast.ok{ color:#15803d }
.ecmp-toast.err{ color:#b1251b }

.ecmp-footnote{
  font-size:12px; color:var(--muted); text-align:center;
  margin:14px 0 0; line-height:1.5;
}

/* Entry CTA on the planner page - matches the setup-wizard CTA style */
.ecmp-cta-btn{
  display:inline-flex; align-items:center; gap:8px;
}
