/* ============================================
   SCROLLING DETECTIONS LIST
   Apple-style dark theme with typewriter effect
   ============================================ */

.report-body {
  text-align: left;
  height: 280px;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Scrolling list container */
.scrolling-container {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}

/* Top fade */
.scrolling-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
  z-index: 10;
  pointer-events: none;
}

/* Bottom fade */
.scrolling-container::after {
  content: '';
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, transparent 100%);
  z-index: 10;
  pointer-events: none;
}

/* Reel container */
.observations-reel {
  position: relative;
  width: 100%;
  padding: 8px 10px 50px 10px;
  box-sizing: border-box;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Observation card */
.observation-card {
  padding: 6px 10px;
  margin-bottom: 2px;
  border-left: 2px solid rgba(41, 151, 255, 0.15);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #48484a;
  border-radius: 6px;
  background: transparent;
  transition: border-color 0.4s ease, color 0.4s ease, background 0.4s ease;
}

/* Row layout: clock SVG + text */
.obs-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mini clock SVG */
.obs-clock-svg {
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.observation-card:last-child .obs-clock-svg {
  opacity: 1;
}

/* Last (newest) card */
.observation-card:last-child {
  border-left-color: #2997ff;
  color: #f5f5f7;
  background: rgba(41, 151, 255, 0.06);
}

/* Second to last */
.observation-card:nth-last-child(2) {
  border-left-color: rgba(41, 151, 255, 0.4);
  color: #a1a1a6;
}

/* Third to last */
.observation-card:nth-last-child(3) {
  border-left-color: rgba(41, 151, 255, 0.25);
  color: #6e6e73;
}

/* Typing state */
.observation-card.typing {
  background: rgba(41, 151, 255, 0.08);
  border-left-color: #2997ff;
}

/* Observation line - typewriter target */
.observation-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  border-right: 2px solid transparent;
  flex: 1;
  min-width: 0;
}

/* Typewriter animation */
.observation-card.typing .observation-line {
  flex: none;
  width: 0;
  animation: typewriter 1s steps(80, end) forwards,
             cursorBlink 0.6s step-end 2;
  animation-delay: 0.05s, 1.05s;
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes cursorBlink {
  50% { border-color: #2997ff; }
}

/* Code styling */
.obs-code {
  color: #2997ff;
  font-weight: 600;
}

/* Severity levels */
.obs-severity {
  font-weight: 600;
  display: inline-block;
  min-width: 12px;
  text-align: center;
}

.obs-severity.sev-low {
  color: #30d158;
}

.obs-severity.sev-med {
  color: #ffd60a;
}

.obs-severity.sev-high {
  color: #ff453a;
}

.obs-divider {
  color: #3a3a3c;
  margin: 0 3px;
}

.obs-location {
  color: #f5f5f7;
  font-weight: 500;
}

.obs-clock-text {
  color: #64d2ff;
}

.obs-description {
  color: #a1a1a6;
}

.obs-pct {
  color: #ffd60a;
}

.obs-dim {
  color: #bf5af2;
}

.obs-joint-tag {
  display: inline-block;
  background: rgba(191, 90, 242, 0.15);
  color: #bf5af2;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* Processing Indicator */
.processing-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
  font-size: 11px;
  color: #6e6e73;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.processing-dots {
  display: flex;
  gap: 3px;
}

.processing-dots span {
  width: 5px;
  height: 5px;
  background: #2997ff;
  border-radius: 50%;
  animation: printerDot 1.4s ease-in-out infinite;
}

.processing-dots span:nth-child(2) { animation-delay: 0.2s; }
.processing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes printerDot {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.processing-text::after {
  content: '_';
  animation: printerCursor 1s step-end infinite;
}

@keyframes printerCursor {
  50% { opacity: 0; }
}
