/* Discovery+ Price Elasticity Studio - Main Stylesheet */

/* Discovery+ Brand Colors & Variables */
:root {
  --dplus-blue: #0066FF;
  --dplus-dark: #1a1a2e;
  --dplus-purple: #6366f1;
  --dplus-green: #10b981;
  --dplus-red: #ef4444;
  --dplus-orange: #f59e0b;
}

/* Font Family */
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Dark Theme Gradient Background */
[data-bs-theme="dark"] body {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  min-height: 100vh;
  color: #e5e5e5;
}

/* Light Theme - Keep clean */
[data-bs-theme="light"] body {
  background: #f8f9fa;
  min-height: 100vh;
}

/* Step Navigation */
.step-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .step-nav {
  background: rgba(26, 26, 46, 0.95);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .step-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.step-nav .brand {
  font-weight: 700;
  font-size: 1.25rem;
}

.step-nav .brand span {
  color: var(--dplus-blue);
}

.step-indicator {
  display: flex;
  gap: var(--step-gap);
  align-items: center;
}

.step-dot {
  width: var(--step-dot-size, 32px);
  height: var(--step-dot-size, 32px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .step-dot {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  color: #e5e5e5;
}

[data-bs-theme="light"] .step-dot {
  background: rgba(0,0,0,0.05);
  border: 2px solid rgba(0,0,0,0.1);
  color: #212529;
}

.step-dot.active {
  background: var(--dplus-blue);
  border-color: var(--dplus-blue);
  color: #fff;
}

.step-dot.completed {
  background: var(--dplus-green);
  border-color: var(--dplus-green);
  color: #fff;
}

.step-dot:hover {
  transform: scale(1.1);
}

/* Module color coding */
.step-dot.module-data-foundation {
  border-color: #17a2b8 !important;
}

.step-dot.module-data-foundation.active,
.step-dot.module-data-foundation.completed {
  background: #17a2b8 !important;
  border-color: #17a2b8 !important;
}

.step-dot.module-elasticity {
  border-color: #fd7e14 !important;
}

.step-dot.module-elasticity.active,
.step-dot.module-elasticity.completed {
  background: #fd7e14 !important;
  border-color: #fd7e14 !important;
}

.step-dot.module-simulation {
  border-color: #6f42c1 !important;
}

.step-dot.module-simulation.active,
.step-dot.module-simulation.completed {
  background: #6f42c1 !important;
  border-color: #6f42c1 !important;
}

.step-dot.module-segmentation {
  border-color: #6f42c1 !important;
}

.step-dot.module-segmentation.active,
.step-dot.module-segmentation.completed {
  background: #6f42c1 !important;
  border-color: #6f42c1 !important;
}

.step-dot.module-analytics {
  border-color: #20c997 !important;
}

.step-dot.module-analytics.active,
.step-dot.module-analytics.completed {
  background: #20c997 !important;
  border-color: #20c997 !important;
}

/* Step legend */
.steps-stack {
  --step-dot-size: 32px;
  --step-line-width: 24px;
  --step-gap: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: max-content;
  margin-right: 2rem;
}

.step-legend {
  display: grid;
  grid-template-columns:
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size)
    var(--step-line-width)
    var(--step-dot-size);
  column-gap: var(--step-gap);
  align-items: center;
  margin-top: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.8;
  justify-content: center;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-sizing: border-box;
  flex: 0 0 12px;
  aspect-ratio: 1 / 1;
}

.legend-color.data-foundation {
  color: #17a2b8;
}

.legend-color.elasticity {
  color: #fd7e14;
}

.legend-color.simulation {
  color: #6f42c1;
}

.legend-color.segmentation {
  color: #6f42c1;
}

.legend-color.analytics {
  color: #20c997;
}

.legend-data-foundation {
  grid-column: 1 / span 5;
}

.legend-segmentation {
  grid-column: 7 / span 3;
}

.legend-elasticity {
  grid-column: 11 / span 5;
}

.legend-analytics {
  grid-column: 17 / span 1;
}

@media (max-width: 992px) {
  .steps-stack {
    align-items: center;
    width: 100%;
  }

  .step-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .legend-data-foundation,
  .legend-segmentation,
  .legend-elasticity,
  .legend-analytics {
    grid-column: auto;
  }
}

.step-line {
  width: var(--step-line-width, 24px);
  height: 2px;
}

[data-bs-theme="dark"] .step-line {
  background: rgba(255,255,255,0.2);
}

[data-bs-theme="light"] .step-line {
  background: rgba(0,0,0,0.1);
}

/* Steps Overview Modal */
.steps-overview-trigger {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.steps-modal .modal-content {
  border-radius: 0;
  border: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.steps-modal .modal-dialog {
  transform-origin: top right;
  transform: translateY(-18px) scale(0.98);
  opacity: 0;
  transition: transform 0.7s ease, opacity 0.5s ease;
}

.steps-modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.steps-modal .modal-header {
  padding: 1.25rem 1.5rem 0.75rem;
}

.steps-modal .modal-body {
  padding: 0.75rem 1.5rem 1.25rem;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Avoid forcing full-height layout inside the steps modal */
.steps-modal .modal-body .container-fluid,
.steps-modal .modal-body .row {
  height: auto !important;
}

[data-bs-theme="dark"] .steps-modal .modal-content {
  background: linear-gradient(160deg, rgba(20, 24, 45, 0.98), rgba(10, 12, 26, 0.98));
  color: #e5e5e5;
}

[data-bs-theme="light"] .steps-modal .modal-content {
  background: linear-gradient(160deg, #ffffff, #f3f6ff);
  color: #1a1a2e;
}

.steps-table {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.steps-table-header,
.steps-table-row {
  display: grid;
  grid-template-columns: minmax(90px, 110px) minmax(220px, 1.4fr) minmax(200px, 1fr);
  gap: 1rem;
  align-items: start;
}

.steps-table-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 1rem;
}

[data-bs-theme="light"] .steps-table-header {
  color: rgba(26, 26, 46, 0.7);
}

.steps-table-row {
  border-radius: 16px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.55s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  width: 100%;
  cursor: pointer;
  color: inherit;
  text-align: left;
  opacity: 0;
  transform: translateY(-16px) translateX(calc((var(--step-index, 1) - 1) * 26px)) scale(0.96);
  transition-delay: calc(var(--step-index, 1) * 0.05s);
  will-change: transform, opacity;
}

.steps-modal.show .steps-table-row {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

[data-bs-theme="light"] .steps-table-row {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .steps-table-row {
  background: rgba(17, 20, 38, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}

.steps-table-row:hover,
.steps-table-row:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 102, 255, 0.6);
}

.steps-table-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dplus-blue);
}

.steps-table-step-label {
  font-size: 0.75rem;
}

.steps-table-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.97rem;
  line-height: 1.25;
}

.steps-table-body strong {
  font-size: 1rem;
}

.steps-table-rfp {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.75);
}

[data-bs-theme="light"] .steps-table-rfp {
  color: rgba(26, 26, 46, 0.7);
}

.steps-modal-dot {
  cursor: default;
  pointer-events: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .steps-modal .modal-dialog,
  .steps-table-row,
  .steps-modal.show .steps-table-row {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

@media (max-width: 991px) {
  .steps-table-header {
    display: none;
  }

  .steps-table-row {
    grid-template-columns: 1fr;
  }

  .steps-table-rfp {
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
  }

  [data-bs-theme="dark"] .steps-table-rfp {
    border-top-color: rgba(255, 255, 255, 0.12);
  }
}

/* Main content - account for fixed nav */
.main-content {
  padding-top: 96px;
  min-height: 100vh;
}

/* Sections */
.section {
  display: none;
  padding: 2rem 0;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glassmorphism Cards */
.glass-card {
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: transform 0.2s, box-shadow 0.2s;
}

[data-bs-theme="dark"] .glass-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.glass-card:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .glass-card:hover {
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.15);
}

[data-bs-theme="light"] .glass-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Section Headers */
.section-header {
  margin-bottom: 2rem;
}

.section-header-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-header-main {
  min-width: 260px;
}

.section-header-citation {
  flex: 0 0 auto;
  max-width: 360px;
  margin-top: 1.3rem;
}

.section-citation-card {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(13, 110, 253, 0.06);
}

.section-citation-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--dplus-blue);
  margin-bottom: 0.35rem;
}

.section-citation-text {
  font-size: 0.9rem;
  color: #1f2937;
}

[data-bs-theme="dark"] .section-citation-card {
  border-color: rgba(255,255,255,0.1);
  background: rgba(59, 130, 246, 0.12);
}

[data-bs-theme="dark"] .section-citation-text {
  color: rgba(255,255,255,0.85);
}

.section-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dplus-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
}

[data-bs-theme="dark"] .section-title {
  color: #fff;
}

[data-bs-theme="dark"] .section-subtitle {
  color: rgba(255,255,255,0.6);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .hero h1 {
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

[data-bs-theme="dark"] .hero p {
  color: rgba(255,255,255,0.7);
}

/* Custom Buttons */
.btn-primary-custom {
  background: var(--dplus-blue);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
}

.btn-primary-custom:hover {
  background: #0052cc;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.3);
}

.btn-primary-custom:focus-visible {
  color: #fff;
}

.btn-secondary-custom {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .btn-secondary-custom {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}

[data-bs-theme="light"] .btn-secondary-custom {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.1);
  color: #212529;
}

.btn-secondary-custom:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .btn-secondary-custom:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

[data-bs-theme="light"] .btn-secondary-custom:hover {
  background: rgba(0,0,0,0.1);
  color: #212529;
}

/* Section Footer Navigation */
.section-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
}

[data-bs-theme="dark"] .section-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .section-footer {
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* Loading Section - Ensure always visible */
#load-data-section {
  display: block !important;
  visibility: visible !important;
  position: relative;
  z-index: 10;
}

#loading-progress {
  display: block !important;
  visibility: visible !important;
}

#loading-progress .progress {
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2);
}

#loading-progress-bar {
  min-width: 5% !important;
  transition: width 0.3s ease;
}

/* Section Header Navigation (at top) */
.section-header-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

/* Simulate Loading Bar */
.simulate-loading {
  max-width: 420px;
  margin: 1rem auto 0;
  text-align: left;
}

.simulate-loading-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--dplus-blue);
}

.simulate-loading .progress {
  height: 16px;
  background-color: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 102, 255, 0.2);
}

[data-bs-theme="dark"] .simulate-loading-label {
  color: #93c5fd;
}

[data-bs-theme="dark"] .simulate-loading .progress {
  background-color: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-bs-theme="dark"] .section-header-nav {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .section-header-nav {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Insight Box */
.insight-box {
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

[data-bs-theme="dark"] .insight-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-bs-theme="light"] .insight-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.insight-box .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.insight-box h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Pricing Tier Cards */
.tier-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.tier-card:hover {
  transform: translateY(-4px);
}

[data-bs-theme="dark"] .tier-card:hover {
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .tier-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.tier-card.ad-lite {
  border-left: 4px solid var(--dplus-orange);
}

.tier-card.ad-free {
  border-left: 4px solid var(--dplus-blue);
}

.tier-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .tier-name {
  color: #fff;
}

.tier-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dplus-blue);
  margin-bottom: 0.5rem;
}

.tier-price span {
  font-size: 1rem;
  font-weight: 400;
}

/* Hide tabs when showing individual elasticity model steps */
.hide-elasticity-tabs #elasticityTabs {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card > .card-header {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card > .card-body > .alert.alert-info {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card {
  border: none !important;
  background: transparent !important;
}

/* Keep existing custom styles with theme support */
.kpi-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 12px;
  padding: 1.5rem;
}

[data-bs-theme="dark"] .kpi-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .kpi-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.kpi-card:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .kpi-card:hover {
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.15);
}

[data-bs-theme="light"] .kpi-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.metric-card {
  text-align: center;
  padding: 1.5rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
}

[data-bs-theme="dark"] .metric-value {
  color: #fff;
}

.metric-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-bs-theme="dark"] .metric-label {
  color: rgba(255,255,255,0.6);
}

[data-bs-theme="light"] .metric-label {
  color: #6c757d;
}

.metric-change {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.metric-change.positive { color: var(--dplus-green); }
.metric-change.negative { color: var(--dplus-red); }
.scenario-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 16px;
  padding: 1.5rem;
}

[data-bs-theme="dark"] .scenario-card {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .scenario-card {
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.scenario-card:hover {
  transform: translateY(-2px);
  border-color: var(--dplus-blue);
}

.scenario-card.selected {
  border-color: var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card.selected {
  background: rgba(0, 102, 255, 0.05);
}

[data-bs-theme="light"] .scenario-card.selected {
  background: rgba(0, 102, 255, 0.05);
}

.scenario-card.recommended {
  border-color: var(--dplus-green);
}

[data-bs-theme="dark"] .scenario-card.recommended {
  background: rgba(16, 185, 129, 0.05);
}

[data-bs-theme="light"] .scenario-card.recommended {
  background: rgba(16, 185, 129, 0.05);
}

.badge-recommended {
  background: var(--dplus-green);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
}
/* Chat message styles */
.chat-message.system {
  opacity: 0.7;
  font-size: 0.875rem;
}
.chat-message.tool {
  color: #0d6efd;
}
.chat-message.tool-error {
  color: #dc3545;
}
.chat-message.error {
  color: #dc3545;
}

/* Markdown content styling */
.message-content {
  line-height: 1.6;
}
.message-content p {
  margin-bottom: 0.75rem;
}
.message-content p:last-child {
  margin-bottom: 0;
}
.message-content ul, .message-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}
.message-content li {
  margin-bottom: 0.25rem;
}
.message-content code {
  background-color: #f8f9fa;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #d63384;
}
.message-content pre {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}
.message-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}
.message-content strong {
  font-weight: 600;
}
.message-content em {
  font-style: italic;
}
.message-content blockquote {
  border-left: 4px solid #dee2e6;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 0.75rem;
  color: #6c757d;
}
.message-content h1, .message-content h2, .message-content h3,
.message-content h4, .message-content h5, .message-content h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.message-content h1 { font-size: 1.5rem; }
.message-content h2 { font-size: 1.35rem; }
.message-content h3 { font-size: 1.2rem; }
.message-content h4 { font-size: 1.1rem; }
.message-content h5 { font-size: 1rem; }
.message-content h6 { font-size: 0.95rem; }
.message-content table {
  width: 100%;
  margin-bottom: 0.75rem;
  border-collapse: collapse;
}
.message-content table th,
.message-content table td {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
}
.message-content table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Data viewer styles */
#data-table-container {
  max-height: 600px;
  overflow-y: auto;
  border-radius: 8px;
}

#data-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
}

[data-bs-theme="dark"] #data-table thead th {
  background-color: #212529;
}

[data-bs-theme="light"] #data-table thead th {
  background-color: #f8f9fa;
}

#data-table tbody tr:hover {
  background-color: rgba(0, 102, 255, 0.1);
}

/* Dataset accordion styles */
#datasets-accordion .accordion-button {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}

#datasets-accordion .accordion-button:not(.collapsed) {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

#datasets-accordion .accordion-body {
  padding: 0;
}

.dataset-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.dataset-item:hover {
  background-color: rgba(13, 110, 253, 0.05);
  border-left-color: #0d6efd;
}

.dataset-item.active {
  background-color: rgba(13, 110, 253, 0.1);
  border-left-color: #0d6efd;
  font-weight: 500;
}

.dataset-item i {
  width: 20px;
}

/* Loading progress styles */
#loading-progress {
  max-width: 600px;
  margin: 0 auto;
}

#loading-progress .progress {
  border-radius: 10px;
  overflow: hidden;
}

[data-bs-theme="dark"] #loading-progress .progress {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

[data-bs-theme="light"] #loading-progress .progress {
  background-color: #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#loading-progress .progress-bar {
  transition: width 0.3s ease, background-color 0.5s ease;
  font-weight: 500;
  background-color: var(--dplus-blue);
}

#loading-stage {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dplus-blue);
  min-height: 20px;
  display: block;
}

/* ML Methodology Popover Styles */
.ml-popover {
  max-width: 450px;
  font-size: 0.875rem;
}

.ml-popover .popover-header {
  background-color: #0d6efd;
  color: white;
  font-weight: 600;
  border-bottom: none;
}

.ml-popover .popover-body {
  padding: 1rem;
  line-height: 1.6;
}

.ml-popover .popover-body strong {
  color: #0d6efd;
  font-weight: 600;
}

.ml-popover .popover-arrow::after {
  border-right-color: #0d6efd;
}

/* Info icon hover effect */
[data-bs-toggle="popover"]:hover i {
  transform: scale(1.1);
  transition: transform 0.2s;
}

/* Interactive Demand Curve styles */
.demand-curve-controls {
  padding: 10px 15px;
  border-radius: 8px 8px 0 0;
}

[data-bs-theme="dark"] .demand-curve-controls {
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .demand-curve-controls {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.demand-curve-controls .btn {
  transition: all 0.3s ease;
}

.demand-curve-controls .btn.active {
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.demand-curve {
  transition: stroke-width 0.2s, opacity 0.2s;
}

.current-marker, .new-marker {
  transition: r 0.2s, transform 0.2s;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.current-marker:hover, .new-marker:hover {
  transform: scale(1.1);
}

/* Customer Segmentation Section Styles */
.segment-filters {
  padding: 20px;
  border-radius: 8px;
}

[data-bs-theme="dark"] .segment-filters {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .segment-filters {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}

.filter-pills {
  min-height: 38px;
}

.filter-pill {
  padding: 6px 14px;
  border: 2px solid var(--dplus-blue);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  user-select: none;
}

[data-bs-theme="dark"] .filter-pill {
  background-color: rgba(255, 255, 255, 0.05);
  color: #e5e5e5;
}

[data-bs-theme="light"] .filter-pill {
  background-color: white;
  color: #212529;
}

.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 102, 255, 0.3);
}

[data-bs-theme="dark"] .filter-pill:hover {
  background-color: rgba(0, 102, 255, 0.1);
}

[data-bs-theme="light"] .filter-pill:hover {
  background-color: #e7f3ff;
}

.filter-pill.active {
  background-color: var(--dplus-blue);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 102, 255, 0.3);
}

.filter-pill.active:hover {
  background-color: #0052cc;
}

/* Scenario card tabs styling */
.scenario-card-tab {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px;
  padding: 1rem;
}

[data-bs-theme="dark"] .scenario-card-tab {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="light"] .scenario-card-tab {
  border: 1px solid #dee2e6;
  background: white;
}

.scenario-card-tab:hover {
  transform: translateY(-2px);
  border-color: var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card-tab:hover {
  box-shadow: 0 4px 8px rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .scenario-card-tab:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.scenario-card-tab.selected {
  border: 2px solid var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card-tab.selected {
  background-color: rgba(0, 102, 255, 0.1);
}

[data-bs-theme="light"] .scenario-card-tab.selected {
  background-color: rgba(0, 102, 255, 0.05);
}

.scenario-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.scenario-card-actions .badge {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.scenario-card-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0.25rem 0.45rem;
}

/* Event Timeline Slider Styles */
.timeline-slider-container {
  position: relative;
  padding: 2rem 1rem;
  margin: 2rem 0;
}

.timeline-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  margin: 3rem 0;
}

[data-bs-theme="dark"] .timeline-track {
  background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .timeline-track {
  background: #e9ecef;
}

.timeline-event {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.timeline-event:hover {
  transform: translate(-50%, -50%) scale(1.5);
}

.timeline-event.event-price {
  background: var(--dplus-green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-event.event-promo {
  background: var(--dplus-blue);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.2);
}

.timeline-event.event-content {
  background: var(--dplus-orange);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.timeline-years {
  position: relative;
  height: 30px;
  margin-bottom: 1rem;
}

.timeline-year-marker {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.875rem;
  font-weight: 600;
}

[data-bs-theme="dark"] .timeline-year-marker {
  color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="light"] .timeline-year-marker {
  color: #6c757d;
}

.timeline-details {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dplus-blue);
}

/* Price Slider Styles (for interactive elasticity models) */
.price-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  transition: opacity 0.2s;
}

[data-bs-theme="dark"] .price-slider {
  background: rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .price-slider {
  background: #e9ecef;
}

.price-slider:hover {
  opacity: 1;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dplus-blue);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 102, 255, 0.3);
  transition: all 0.2s ease;
}

.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.5);
}

.price-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dplus-blue);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 102, 255, 0.3);
  border: none;
  transition: all 0.2s ease;
}

.price-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.5);
}

/* Metric Display Cards */
.metric-display-card {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .metric-display-card {
  background: rgba(0, 102, 255, 0.1);
  border: 1px solid rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .metric-display-card {
  background: rgba(0, 102, 255, 0.05);
  border: 1px solid rgba(0, 102, 255, 0.15);
}

.decision-engine-controls > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.decision-engine-controls .decision-engine-action {
  margin-top: auto;
}

.decision-engine-spacer {
  visibility: hidden;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.metric-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 600;
}

/* Insight Box (for What is Elasticity? type sections) */
.insight-box {
  padding: 1.25rem;
  border-radius: 12px;
  margin-top: 1.5rem;
}

[data-bs-theme="dark"] .insight-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-bs-theme="light"] .insight-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.insight-box .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.insight-box h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  margin-bottom: 0.5rem;
  z-index: 10;
}

[data-bs-theme="dark"] .event-tooltip {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

[data-bs-theme="light"] .event-tooltip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #212529;
}

.timeline-event:hover .event-tooltip {
  opacity: 1;
}

/* Time Horizon Bars (for Churn Elasticity) */
.time-bar {
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.time-bar .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  opacity: 0.5;
  transition: width 0.3s ease;
  border-radius: 6px 0 0 6px;
}

.time-bar .time-bar-label {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
}

[data-bs-theme="dark"] .time-bar .time-bar-label {
  color: #e5e5e5;
}

[data-bs-theme="light"] .time-bar .time-bar-label {
  color: #212529;
}

/* Tier Button Group (for Churn) */
.tier-btn {
  flex: 1;
  transition: all 0.2s ease;
}

.tier-btn.active {
  background-color: var(--dplus-blue);
  color: white;
  border-color: var(--dplus-blue);
}

/* Migration Flow (for Tier Migration) */
.migration-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.flow-box {
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  min-width: 150px;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .flow-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .flow-box {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.1);
}

.flow-arrow {
  font-size: 2rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* Event Details Table */
.event-details-table {
  max-height: 100vh;
  overflow-y: auto;
}
