/**
 * EventStep Component Styles
 *
 * Uses design tokens from UI-STYLING-GUIDE.md
 */

.EventStep {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;

  &:last-child {
    .TimelineLine {
      display: none;
    }
  }
}

/* =================================================================
   Timeline Connector
   ================================================================= */

.TimelineConnector {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 4px;
}

.TimelineDot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--theme-color-primary);
  border: 2px solid var(--theme-color-bg-1);
  flex-shrink: 0;
  z-index: 1;
}

.TimelineLine {
  width: 2px;
  flex: 1;
  background-color: var(--theme-color-border-default);
  margin-top: 4px;
}

/* =================================================================
   Event Card
   ================================================================= */

.EventCard {
  flex: 1;
  background-color: var(--theme-color-bg-2);
  border: 1px solid var(--theme-color-border-default);
  border-radius: 4px;
  padding: 12px;
  transition: all 0.15s ease;

  &:hover {
    background-color: var(--theme-color-bg-3);
    border-color: var(--theme-color-primary);
  }
}

/* =================================================================
   Event Header
   ================================================================= */

.EventHeader {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.EventIcon {
  flex-shrink: 0;
  padding: 6px;
  background-color: var(--theme-color-bg-3);
  border-radius: 4px;
  color: var(--theme-color-primary);
}

.EventMeta {
  flex: 1;
  min-width: 0;
}

.NodeInfo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.NodeType {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-color-fg-default);
}

.NodeLabel {
  font-size: 12px;
  color: var(--theme-color-fg-default-shy);
  font-style: italic;
}

.ComponentInfo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--theme-color-fg-default-shy);
}

.EventType {
  flex-shrink: 0;

  span {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--theme-color-bg-4);
    color: var(--theme-color-fg-default);

    &.type-signal {
      background-color: var(--theme-color-primary);
      color: white;
    }

    &.type-value-change {
      background-color: #3b82f6;
      color: white;
    }

    &.type-error {
      background-color: #ef4444;
      color: white;
    }
  }
}

/* =================================================================
   Event Timing
   ================================================================= */

.EventTiming {
  display: flex;
  gap: 16px;
  padding: 8px;
  background-color: var(--theme-color-bg-3);
  border-radius: 3px;
  margin-bottom: 8px;
}

.TimingItem {
  display: flex;
  gap: 6px;
  font-size: 11px;
}

.TimingLabel {
  color: var(--theme-color-fg-default-shy);
}

.TimingValue {
  font-weight: 600;
  font-family: monospace;
  color: var(--theme-color-fg-highlight);
}

/* =================================================================
   Port Info
   ================================================================= */

.EventPort {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  background-color: var(--theme-color-bg-3);
  border-radius: 3px;
  font-size: 11px;
  margin-bottom: 8px;
}

.PortLabel {
  color: var(--theme-color-fg-default-shy);
}

.PortName {
  font-weight: 600;
  font-family: monospace;
  color: var(--theme-color-fg-default);
}

/* =================================================================
   Data Preview
   ================================================================= */

.EventData {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background-color: var(--theme-color-bg-3);
  border-radius: 3px;
  margin-bottom: 8px;
}

.DataLabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--theme-color-fg-default-shy);
}

.DataValue {
  font-size: 11px;
  font-family: monospace;
  color: var(--theme-color-fg-default);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 100px;
  overflow-y: auto;
  padding: 4px;
  background-color: var(--theme-color-bg-1);
  border-radius: 2px;
}

/* =================================================================
   Error Info
   ================================================================= */

.EventError {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  border-radius: 3px;
  color: #ef4444;
  font-size: 12px;
}
