/* Light-theme overrides for Radar structure visuals. */

:root[data-theme="light"] .elliott-visual-shell,
:root[data-theme="light"] .fib-visual-shell {
  color: var(--text, #0f172a);
  background:
    radial-gradient(circle at 82% 0%, var(--page-accent-soft, rgba(96, 165, 250, 0.2)), transparent 34%),
    linear-gradient(180deg, var(--panel, #ffffff), var(--panel-2, #f1f5f9));
  border: 1px solid var(--line, #e5e7eb);
  box-shadow: var(--shadow-soft, 0 14px 34px rgba(15, 23, 42, 0.08));
}

:root[data-theme="light"] .elliott-visual-copy,
:root[data-theme="light"] .elliott-visual-title,
:root[data-theme="light"] .elliott-focus-card strong,
:root[data-theme="light"] .elliott-visual-footer strong,
:root[data-theme="light"] .fib-visual-head strong,
:root[data-theme="light"] .fib-visual-meta strong,
:root[data-theme="light"] .fib-svg-table-headline,
:root[data-theme="light"] .fib-svg-table-price {
  color: var(--text, #0f172a);
  fill: var(--text, #0f172a);
}

:root[data-theme="light"] .elliott-visual-sub,
:root[data-theme="light"] .elliott-focus-card small,
:root[data-theme="light"] .fib-visual-head span,
:root[data-theme="light"] .fib-svg-table-legend,
:root[data-theme="light"] .fib-svg-table-legend.is-target,
:root[data-theme="light"] .elliott-grid-row text,
:root[data-theme="light"] .fib-svg-table-kicker,
:root[data-theme="light"] .fib-svg-table-col {
  color: var(--soft, #475569);
  fill: var(--soft, #475569);
}

:root[data-theme="light"] .elliott-focus-card,
:root[data-theme="light"] .fib-visual-meta {
  background: var(--panel, #ffffff);
  border: 1px solid var(--line, #e5e7eb);
}

:root[data-theme="light"] .elliott-visual-footer,
:root[data-theme="light"] .fib-svg-table-divider,
:root[data-theme="light"] .fib-svg-table-separator,
:root[data-theme="light"] .elliott-grid-row line {
  border-color: var(--line, #e5e7eb);
  stroke: var(--line, #e5e7eb);
}

:root[data-theme="light"] .elliott-area {
  fill: var(--yellow-soft, rgba(202, 138, 4, 0.1));
}

:root[data-theme="light"] .elliott-line,
:root[data-theme="light"] .elliott-line-projected,
:root[data-theme="light"] .elliott-point {
  stroke: var(--yellow, #ca8a04);
}

:root[data-theme="light"] .elliott-point,
:root[data-theme="light"] .elliott-point.projected,
:root[data-theme="light"] .fib-svg-current-dot,
:root[data-theme="light"] .fib-svg-table-now-dot {
  fill: var(--yellow, #ca8a04);
}

:root[data-theme="light"] .elliott-point-wave,
:root[data-theme="light"] .elliott-point-price,
:root[data-theme="light"] .elliott-target-label,
:root[data-theme="light"] .elliott-target-band,
:root[data-theme="light"] .fib-svg-current-readout,
:root[data-theme="light"] .fib-svg-table-ratio.is-golden,
:root[data-theme="light"] .fib-svg-table-ratio.is-current,
:root[data-theme="light"] .fib-svg-table-price.is-golden,
:root[data-theme="light"] .fib-svg-table-price.is-current,
:root[data-theme="light"] .fib-svg-table-zone.is-golden,
:root[data-theme="light"] .fib-svg-table-zone.is-current,
:root[data-theme="light"] .fib-svg-table-legend.is-golden {
  color: var(--yellow, #ca8a04);
  fill: var(--yellow, #ca8a04);
}

:root[data-theme="light"] .elliott-target-zone,
:root[data-theme="light"] .fib-svg-table-highlight.is-golden {
  fill: var(--yellow-soft, rgba(202, 138, 4, 0.1));
  stroke: var(--yellow, #ca8a04);
}

:root[data-theme="light"] .fib-svg-table-highlight.is-current {
  fill: var(--page-accent-soft, rgba(96, 165, 250, 0.2));
  stroke: var(--page-accent, #60a5fa);
}

:root[data-theme="light"] .fib-svg-table-distance.is-positive {
  fill: var(--green, #16a34a);
}

:root[data-theme="light"] .fib-svg-table-distance.is-negative {
  fill: var(--red, #dc2626);
}

:root[data-theme="light"] .fib-svg-table-distance.is-neutral,
:root[data-theme="light"] .fib-svg-table-zone {
  fill: var(--soft, #475569);
}

:root[data-theme="light"] .fib-svg-table-marker.is-extension {
  fill: var(--red, #dc2626);
}

:root[data-theme="light"] .fib-svg-table-marker.is-retracement {
  fill: var(--blue, #2563eb);
}

:root[data-theme="light"] .fib-svg-table-marker.is-golden {
  fill: var(--yellow, #ca8a04);
}

:root[data-theme="light"] .fib-level-card {
  background: var(--panel, #ffffff);
  border-color: var(--line, #e5e7eb);
  color: var(--text, #0f172a);
}

:root[data-theme="light"] .fib-level-card.fib-down {
  background:
    linear-gradient(180deg, var(--red-soft, rgba(220, 38, 38, 0.1)), var(--panel, #ffffff));
  border-color: var(--state-danger-ring, rgba(220, 38, 38, 0.22));
}

:root[data-theme="light"] .fib-level-card.fib-up {
  background:
    linear-gradient(180deg, var(--green-soft, rgba(22, 163, 74, 0.1)), var(--panel, #ffffff));
  border-color: var(--state-success-ring, rgba(22, 163, 74, 0.22));
}

:root[data-theme="light"] .fib-level-card .fib-level-top strong {
  color: var(--text, #0f172a);
}

:root[data-theme="light"] .fib-level-card.fib-down .fib-level-top span {
  color: var(--red, #dc2626);
}

:root[data-theme="light"] .fib-level-card.fib-up .fib-level-top span {
  color: var(--green, #16a34a);
}

:root[data-theme="light"] .fib-level-note {
  color: var(--soft, #475569);
}

:root[data-theme="light"] .fib-level-status {
  background: var(--panel, #ffffff);
  border-color: var(--line, #e5e7eb);
}

:root[data-theme="light"] .fib-level-status span {
  color: var(--soft, #475569);
}

:root[data-theme="light"] .fib-level-status strong {
  color: var(--text, #0f172a);
}

:root[data-theme="light"] .fib-level-status.fib-status-open {
  background: var(--green-soft, rgba(22, 163, 74, 0.1));
  border-color: var(--state-success-ring, rgba(22, 163, 74, 0.22));
}

:root[data-theme="light"] .fib-level-status.fib-status-open span,
:root[data-theme="light"] .fib-level-status.fib-status-open strong {
  color: var(--green, #16a34a);
}

:root[data-theme="light"] .fib-level-status.fib-status-near {
  background: var(--yellow-soft, rgba(202, 138, 4, 0.1));
  border-color: var(--state-warning-ring, rgba(202, 138, 4, 0.24));
}

:root[data-theme="light"] .fib-level-status.fib-status-near span,
:root[data-theme="light"] .fib-level-status.fib-status-near strong {
  color: var(--yellow, #ca8a04);
}

:root[data-theme="light"] .fib-level-status.fib-status-done {
  background: var(--panel-2, #f1f5f9);
  border-color: var(--line, #e5e7eb);
}

:root[data-theme="light"] .fib-hint,
:root[data-theme="light"] .highlight-box.highlight-candidate {
  color: var(--soft, #475569);
  background:
    linear-gradient(180deg, var(--panel, #ffffff), var(--panel-2, #f1f5f9));
  border-color: var(--line, #e5e7eb);
}

:root[data-theme="light"] .highlight-box.highlight-candidate strong {
  color: var(--text, #0f172a);
}

:root[data-theme="light"] .highlight-box.highlight-candidate .subtle,
:root[data-theme="light"] .highlight-box.highlight-candidate .info-label,
:root[data-theme="light"] .fib-hint .info-label {
  color: var(--soft, #475569);
}

:root[data-theme="light"] .fib-hint {
  box-shadow: var(--shadow-soft, 0 14px 34px rgba(15, 23, 42, 0.08));
}

:root[data-theme="light"] .flow-card,
:root[data-theme="light"] .heat-row,
:root[data-theme="light"] .profile-row,
:root[data-theme="light"] .flow-alert,
:root[data-theme="light"] .table-wrap {
  color: var(--text, #0f172a);
  background:
    linear-gradient(180deg, var(--panel, #ffffff), var(--panel-2, #f1f5f9));
  border-color: var(--line, #e5e7eb);
}

:root[data-theme="light"] .flow-copy,
:root[data-theme="light"] .heat-price span,
:root[data-theme="light"] .heat-meta,
:root[data-theme="light"] .profile-price span,
:root[data-theme="light"] .flow-alert > span,
:root[data-theme="light"] .flow-card .subtle {
  color: var(--soft, #475569);
}

:root[data-theme="light"] .heat-price strong,
:root[data-theme="light"] .profile-price strong,
:root[data-theme="light"] .flow-alert strong,
:root[data-theme="light"] .flow-card .kv-line .v,
:root[data-theme="light"] .flow-table td {
  color: var(--text, #0f172a);
}

:root[data-theme="light"] .flow-card .kv-line .k,
:root[data-theme="light"] .flow-table th {
  color: var(--soft, #475569);
}

:root[data-theme="light"] .heat-bar,
:root[data-theme="light"] .profile-bar {
  background: var(--panel, #ffffff);
  border-color: var(--line, #e5e7eb);
}

:root[data-theme="light"] .heat-bar span,
:root[data-theme="light"] .profile-bar span {
  background: linear-gradient(90deg, var(--blue, #2563eb), var(--cyan, #06b6d4));
}

:root[data-theme="light"] .profile-tag,
:root[data-theme="light"] .imbalance-badge,
:root[data-theme="light"] .priority-pill {
  color: var(--soft, #475569);
  background: var(--panel, #ffffff);
  border-color: var(--line, #e5e7eb);
}

:root[data-theme="light"] .profile-poc {
  color: var(--yellow, #ca8a04);
  border-color: var(--state-warning-ring, rgba(202, 138, 4, 0.24));
  background: var(--yellow-soft, rgba(202, 138, 4, 0.1));
}

:root[data-theme="light"] .profile-vah {
  color: var(--blue, #2563eb);
  border-color: var(--page-accent, #60a5fa);
  background: var(--page-accent-soft, rgba(96, 165, 250, 0.2));
}

:root[data-theme="light"] .profile-val,
:root[data-theme="light"] .imbalance-yes,
:root[data-theme="light"] .flow-alert.alert-info {
  color: var(--green, #16a34a);
  border-color: var(--state-success-ring, rgba(22, 163, 74, 0.22));
  background: var(--green-soft, rgba(22, 163, 74, 0.1));
}

:root[data-theme="light"] .flow-table th,
:root[data-theme="light"] .flow-table td {
  border-color: var(--line, #e5e7eb);
}

:root[data-theme="light"] .delta-pos {
  color: var(--green, #16a34a);
}

:root[data-theme="light"] .delta-neg {
  color: var(--red, #dc2626);
}

:root[data-theme="light"] .delta-flat {
  color: var(--soft, #475569);
}

.status-help-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1, 4px);
}

.status-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.status-help > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size-help-dot, 18px);
  height: var(--size-help-dot, 18px);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--radius-pill, 999px);
  background: var(--panel, #ffffff);
  color: var(--soft, #475569);
  font-size: var(--font-size-xs, 11px);
  font-weight: 800;
  line-height: 1;
  list-style: none;
  cursor: help;
  user-select: none;
}

.status-help > summary::-webkit-details-marker {
  display: none;
}

.status-help-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + var(--space-2, 8px));
  right: 0;
  width: min(var(--status-help-width, 280px), calc(100vw - var(--space-6, 24px)));
  padding: var(--space-3, 12px);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  background: var(--panel, #ffffff);
  color: var(--text, #0f172a);
  box-shadow: var(--shadow-soft, 0 14px 34px rgba(15, 23, 42, 0.08));
  font-size: var(--font-size-sm, 13px);
  font-weight: 600;
  line-height: var(--line-height-normal, 1.45);
  text-transform: none;
  letter-spacing: normal;
}

.status-help:not([open]) .status-help-popover {
  display: none;
}

@media (max-width: 720px) {
  .status-help-popover {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--status-help-mobile-width, 260px), calc(100vw - var(--space-6, 24px)));
  }
}
