/* ============================================================
   results.css — Pestañas, resumen ejecutivo y CTA de resultados
   ============================================================ */

/* ── Resumen ejecutivo (barra que aparece tras el cálculo) ─── */
.exec-summary {
  background: linear-gradient(135deg, var(--primary, #6b9dfc) 0%, #5186e8 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 4px 16px rgba(107, 157, 252, 0.35);
  animation: execFadeIn 0.3s ease both;
}

@keyframes execFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.exec-tagline {
  font-size: 1.05rem;
  font-weight: 600;
  flex: 1;
  min-width: 200px;
  line-height: 1.4;
}

.exec-badge {
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Pestañas de resultados ───────────────────────────────── */
.results-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--accent, #e9f0ff);
  border-radius: 12px;
  padding: 0.3rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.results-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: fit-content;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
  background: transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.tab-btn:hover  { color: var(--text, #0f172a); background: rgba(107, 157, 252, 0.12); }
.tab-btn.active {
  background: var(--card, #ffffff);
  color: var(--primary, #6b9dfc);
  box-shadow: 0 1px 4px rgba(0,0,0,0.09);
}

/* ── Paneles de pestañas ──────────────────────────────────── */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  animation: tabFadeIn 0.2s ease both;
}

@keyframes tabFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Sección CTA ──────────────────────────────────────────── */
.cta-section {
  margin-top: 2rem;
  padding: 1.75rem 1.5rem;
  background: var(--card, #fff);
  border-radius: 18px;
  box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,.07));
  text-align: center;
  border: 1.5px solid var(--accent, #e9f0ff);
}

.cta-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  color: var(--text, #0f172a);
}

.cta-section p {
  font-size: 0.875rem;
  color: var(--muted, #6b7280);
  margin: 0 0 1.35rem;
}

.cta-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-cta-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 0.72rem 1.4rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  min-width: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-cta-whatsapp:hover  { background: #20bd5b; }
.btn-cta-whatsapp:active { transform: scale(0.97); }

.btn-cta-revision {
  background: transparent;
  color: var(--primary, #6b9dfc);
  border: 2px solid var(--primary, #6b9dfc);
  padding: 0.72rem 1.4rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  min-width: 175px;
}
.btn-cta-revision:hover  { background: var(--accent, #e9f0ff); }
.btn-cta-revision:active { transform: scale(0.97); }

/* ── Pestaña Comparar ─────────────────────────────────────── */
.compare-panel-cta {
  text-align: center;
  padding: 2rem 1rem;
}
.compare-panel-cta p {
  color: var(--muted, #6b7280);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.compare-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.875rem;
}
.compare-summary-table th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  color: var(--muted, #6b7280);
  font-weight: 600;
  border-bottom: 1.5px solid var(--accent, #e9f0ff);
}
.compare-summary-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--accent, #e9f0ff);
  color: var(--text, #0f172a);
}

/* Los spans de delta que script.js pinta mediante paintDelta */
.kpi-diff.positive { color: #22c55e; font-weight: 700; }
.kpi-diff.negative { color: #ef4444; font-weight: 700; }

/* ── Modo oscuro ──────────────────────────────────────────── */
:root.dark .results-tabs          { background: rgba(255,255,255,.07); }
:root.dark .tab-btn.active        { background: rgba(255,255,255,.12); }
:root.dark .cta-section           { background: var(--card, #1e293b); border-color: rgba(255,255,255,.08); }
:root.dark .exec-summary          { box-shadow: 0 4px 16px rgba(0,0,0,.3); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 520px) {
  .exec-summary   { flex-direction: column; align-items: flex-start; }
  .cta-section    { padding: 1.25rem 1rem; }
  .cta-buttons    { flex-direction: column; align-items: stretch; }
  .btn-cta-whatsapp,
  .btn-cta-revision { min-width: unset; }
  .results-tabs   { padding: 0.2rem; }
  .tab-btn        { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
}
