/* Shared SVG Corridor / Multi-Fuel / Spread / Lite Widget styles */
/* Supports both [data-theme="dark"|"light"] and html.fp-light conventions */

html.fp-light {
  --pamev-surface: #ffffff;
  --pamev-surface-2: #f8fafc;
  --pamev-text: #0f172a;
  --pamev-muted: #475569;
  --pamev-border: #cbd5e1;
  --pamev-accent: #0ea5e9;
  --pamev-good: #059669;
  --pamev-bad: #dc2626;
}

.fpc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.fpc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fpc-host {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.fpc-svg-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.fpc-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
}

.fpc-tip {
  display: none;
  position: absolute;
  pointer-events: none;
  z-index: 30;
  background: var(--bg-card, #0f172a);
  color: var(--text, #f1f5f9);
  border: 1px solid var(--border-strong, var(--border, #334155));
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.45;
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.3));
  min-width: 185px;
  max-width: 280px;
}

.fpc-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
}

.fpc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fpc-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 2.5px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.fpc-legend-swatch.is-dashed {
  height: 0;
  border-top: 2px dashed currentColor;
  background: transparent !important;
}

.fpc-legend-band {
  display: inline-block;
  width: 12px;
  height: 9px;
  border-radius: 2px;
  opacity: 0.25;
}

.fpc-zoom-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.fpc-lite .fpc-zoom-hint,
.fpc-lite .cc-ev-strip {
  display: none;
}

.fpc-ev-tabs,
.fpc-zoom-reset {
  max-width: 100%;
}

.fpc-actions .cc-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-sub, #141922);
  border: 1px solid var(--border, #252c3a);
  border-radius: 10px;
}

.fpc-actions .cc-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim, #9aa5b6);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}

.fpc-actions .cc-tab:hover {
  color: var(--text, #eef1f6);
  background: var(--bg-hover, rgba(255, 255, 255, 0.06));
}

.fpc-actions .cc-tab.active,
.fpc-actions .cc-tab.is-active {
  background: var(--accent, #22c55e);
  color: var(--accent-fg, #07130d);
}

html[data-theme="light"] .fpc-actions .cc-tabs,
html.fp-light .fpc-actions .cc-tabs {
  background: var(--bg-sub, #f1f5f9);
  border-color: var(--border, #cbd5e1);
}

html[data-theme="light"] .fpc-actions .cc-tab,
html.fp-light .fpc-actions .cc-tab {
  color: var(--text-dim, #475569);
}

html[data-theme="light"] .fpc-actions .cc-tab:hover,
html.fp-light .fpc-actions .cc-tab:hover {
  color: var(--text, #0f172a);
  background: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .fpc-actions .cc-tab.active,
html.fp-light .fpc-actions .cc-tab.active,
html[data-theme="light"] .fpc-actions .cc-tab.is-active,
html.fp-light .fpc-actions .cc-tab.is-active {
  background: var(--accent, #16a34a);
  color: #ffffff;
}

@media (max-width: 720px) {
  .fpc-actions .cc-tab,
  .fpc-ev-tabs .cc-tab,
  .fpc-zoom-reset,
  .cc-ev-chip {
    min-height: 36px;
  }
  .fpc-tip {
    max-width: calc(100% - 16px);
  }
}
