/* LazyRadarPlot — skeleton placeholder and fade-in styles */

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.chart-skeleton {
  background: var(--bg-tertiary, #e5e7eb);
  border-radius: 8px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .chart-skeleton {
    animation: none;
  }
}
/* ===================================================
   QA Insight Block — Gradient Glassmorphism Q&A
   =================================================== */

.qa-insight {
  position: relative;
  background: linear-gradient(135deg, rgba(55, 53, 50, 0.75) 0%, rgba(45, 42, 38, 0.9) 100%);
  backdrop-filter: blur(60px) saturate(220%);
  -webkit-backdrop-filter: blur(60px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 20px;
  overflow: hidden;
  isolation: isolate;
}

/* Accent gradient overlay — like StoryCard ::before */
.qa-insight__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse at 20% 0%,
    color-mix(in srgb, var(--qa-accent, #ea5b0c) 15%, transparent) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
}

/* Question */
.qa-insight__question {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--qa-accent, #ea5b0c);
  font-family: 'Big John', sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.4;
}

.qa-insight__q-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 4px;
  color: #fff;
  font-family: 'Big John', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Divider */
.qa-insight__divider {
  position: relative;
  z-index: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

/* Answer */
.qa-insight__answer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.qa-insight__a-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-top: 1px;
}

.qa-insight__answer-text {
  color: var(--text-secondary, rgba(255, 255, 255, 0.75));
  font-size: 0.88rem;
  line-height: 1.7;
}

.qa-insight__answer-text strong {
  color: var(--qa-accent, #ea5b0c);
  font-weight: 700;
}

.qa-insight__answer-text p {
  margin: 0;
}

/* Bottom glow line — like StoryCard ::after */
.qa-insight__bottom-glow {
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--qa-accent, #ea5b0c) 35%, transparent) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Export buttons row below insight */
.radar-export-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.radar-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(50, 50, 50, 0.7) 0%, rgba(40, 40, 40, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.radar-export-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(234, 91, 12, 0.15) 0%, rgba(234, 91, 12, 0.08) 100%);
  border-color: rgba(234, 91, 12, 0.4);
  color: #ea5b0c;
  box-shadow: 0 4px 12px rgba(234, 91, 12, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.radar-export-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.radar-export-btn--accent {
  background: linear-gradient(135deg, rgba(234, 91, 12, 0.15) 0%, rgba(234, 91, 12, 0.06) 100%);
  border-color: rgba(234, 91, 12, 0.35);
  color: #ea5b0c;
}

.radar-export-btn--accent:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(234, 91, 12, 0.25) 0%, rgba(234, 91, 12, 0.12) 100%);
  border-color: rgba(234, 91, 12, 0.5);
  box-shadow: 0 4px 16px rgba(234, 91, 12, 0.25);
}

.radar-export-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Next Section / Back to Overview row */
.radar-next-section-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  justify-content: flex-end;
}

.radar-next-section-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(234, 91, 12, 0.15) 0%, rgba(234, 91, 12, 0.06) 100%);
  border: 1px solid rgba(234, 91, 12, 0.35);
  border-radius: 8px;
  color: #ea5b0c;
  font-family: 'Big John', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(234, 91, 12, 0.15);
}

.radar-next-section-btn:hover {
  background: linear-gradient(135deg, rgba(234, 91, 12, 0.25) 0%, rgba(234, 91, 12, 0.12) 100%);
  border-color: rgba(234, 91, 12, 0.5);
  box-shadow: 0 4px 16px rgba(234, 91, 12, 0.25);
  transform: translateX(2px);
}

.radar-next-section-btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.radar-back-overview-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
}

.radar-back-overview-link:hover {
  color: rgba(255, 255, 255, 0.7);
}
/* ===================================================
   Slide Progress Bar — 3px animated bar at top
   =================================================== */

.slide-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 10;
  display: flex;
  gap: 3px;
  padding: 0 12px;
}

.slide-progress__segment {
  flex: 1;
  height: 100%;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.06);
  transition: background-color 0.3s ease;
}

.slide-progress__segment--active {
  opacity: 0.7;
}

/* ===================================================
   Slide Dots Navigation
   =================================================== */

.slide-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-dots__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.slide-dots__dot:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.2);
}

.slide-dots__dot--active {
  width: 10px;
  height: 10px;
  background: var(--dot-accent, #ea5b0c);
}

.slide-dots__dot--active:hover {
  background: var(--dot-accent, #ea5b0c);
}

/* Tooltip via title attribute — native browser tooltips */

/* Slide Navigation wrapper with arrows */
.slide-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slide-nav__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.slide-nav__arrow:hover:not(:disabled) {
  border-color: rgba(234, 91, 12, 0.4);
  background: rgba(234, 91, 12, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.slide-nav__arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

/* ===================================================
   Zoom Toggle Button
   =================================================== */

.zoom-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zoom-toggle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.zoom-toggle__btn:hover {
  border-color: rgba(234, 91, 12, 0.4);
  background: rgba(234, 91, 12, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.zoom-toggle__btn--active {
  background: linear-gradient(135deg, rgba(234, 91, 12, 0.2), rgba(234, 91, 12, 0.08));
  border-color: rgba(234, 91, 12, 0.5);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 12px rgba(234, 91, 12, 0.15);
}

/* ===================================================
   Radar Slide — Layout variants
   =================================================== */

.radar-slide {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.radar-slide__plots {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 12px;
}

/* Single plot layout */
.radar-slide__plots--single {
  flex-direction: column;
}

.radar-slide__plots--single .radar-plot-container {
  flex: 1;
  min-height: 0;
}

/* Dual plot layout */
.radar-slide__plots--dual .radar-plot-container {
  flex: 1;
  min-width: 0;
  min-height: 0;
}

/* Complex layout: 1 large + 2 stacked small */
.radar-slide__plots--complex {
  flex-direction: row;
}

.radar-slide__plots--complex .radar-slide__plot-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.radar-slide__plots--complex .radar-slide__plot-stack {
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radar-slide__plots--complex .radar-slide__plot-stack .radar-plot-container {
  flex: 1;
  min-height: 0;
}

/* Single with toggle: plot + toggle button overlay */
.radar-slide__plots--single-with-toggle {
  flex-direction: column;
  position: relative;
}

.radar-slide__plots--single-with-toggle .radar-plot-container {
  flex: 1;
  min-height: 0;
}

/* Per-chart PNG download button (top-right corner of each chart) */
.radar-plot-container {
  position: relative;
}

.radar-chart-download-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(39, 39, 39, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 4;
  opacity: 0.6;
}

.radar-plot-container:hover .radar-chart-download-btn {
  opacity: 1;
}

.radar-chart-download-btn:hover {
  background: rgba(39, 39, 39, 0.9);
  border-color: rgba(234, 91, 12, 0.4);
  color: #ea5b0c;
}

/* Chart info icon + tooltip (? button on every chart) */
.chart-info {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}

.chart-info__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(39, 39, 39, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
}

.radar-plot-container:hover .chart-info__btn {
  opacity: 1;
}

.chart-info__btn:hover {
  background: rgba(39, 39, 39, 0.9);
  border-color: rgba(234, 91, 12, 0.4);
  color: #ea5b0c;
}

.chart-info__tooltip {
  position: absolute;
  top: 34px;
  right: 0;
  width: 280px;
  padding: 12px 14px;
  background: rgba(39, 39, 39, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.chart-info__tooltip strong {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
}

.chart-info__tooltip p {
  margin: 0 0 6px;
}

.chart-info__tooltip p:last-child {
  margin-bottom: 0;
}

.radar-slide__toggle-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}

.radar-slide__envelope-legend-overlay {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

/* Envelope custom HTML legend */
.envelope-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
}

.envelope-legend__item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  cursor: default;
  transition: all 0.2s ease;
  user-select: none;
}

.envelope-legend__item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 1);
}

.envelope-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Insight panel below plots */
.radar-slide__insight {
  position: relative;
  flex-shrink: 0;
  margin-top: 12px;
}

/* Year toggle row */
.radar-slide__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

/* Responsive: dual plots stack vertically under 1024px */
@media (max-width: 1024px) {
  .radar-slide__plots--dual {
    flex-direction: column;
  }

  .radar-slide__plots--complex {
    flex-direction: column;
  }

  .radar-slide__plots--complex .radar-slide__plot-stack {
    width: 100%;
    flex-direction: row;
  }
}

/* Slide transition animation classes */
.radar-slide--enter {
  animation: slideEnter 0.3s ease forwards;
}

.radar-slide--exit {
  animation: slideExit 0.2s ease forwards;
}

@keyframes slideEnter {
  from {
    opacity: 0;
    transform: translateX(var(--slide-direction, 30px));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideExit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(calc(var(--slide-direction, 30px) * -1));
  }
}
/* ===================================================
   Demo Overlay & CTA — Radar section demo mode
   =================================================== */

/* --- Demo Overlay (top of chart container) --- */

.radar-demo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(30, 28, 26, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 8px 8px;
  pointer-events: none;
}

.radar-demo-overlay__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(234, 91, 12, 0.15);
  color: #ea5b0c;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
}

.radar-demo-overlay__text {
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* --- Demo CTA (glassmorphism box in insight area) --- */

.radar-demo-cta {
  position: relative;
  margin-top: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(55, 53, 50, 0.75) 0%, rgba(45, 42, 38, 0.9) 100%);
  backdrop-filter: blur(60px) saturate(220%);
  -webkit-backdrop-filter: blur(60px) saturate(220%);
  border: 1px solid rgba(234, 91, 12, 0.3);
  border-radius: 12px;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.radar-demo-cta__text {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Roboto', sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
}

.radar-demo-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, rgba(234, 91, 12, 0.15) 0%, rgba(234, 91, 12, 0.06) 100%);
  border: 1px solid rgba(234, 91, 12, 0.35);
  border-radius: 8px;
  color: #ea5b0c;
  font-family: 'Big John', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(234, 91, 12, 0.15);
}

.radar-demo-cta__btn:hover {
  background: linear-gradient(135deg, rgba(234, 91, 12, 0.25) 0%, rgba(234, 91, 12, 0.12) 100%);
  border-color: rgba(234, 91, 12, 0.5);
  box-shadow: 0 4px 16px rgba(234, 91, 12, 0.25);
}

/* --- Disabled export button state --- */

.radar-chart-download-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
