/* ===================================================================
   ROMAIN JOB — Cockpit / HUD Animations
   =================================================================== */

/* === COCKPIT PAGE === */
.cockpit-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  align-items: start;
}

/* --- Radar Panel --- */
.radar-panel {
  grid-row: 1 / 3;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.radar-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.radar-title {
  font-family: var(--font-hud);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--cyan);
}

.radar-mode {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.radar-canvas-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

#radar-canvas {
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(0,212,255,0.15), 0 0 60px rgba(0,212,255,0.05);
}

.radar-ring-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.2);
  pointer-events: none;
}

.radar-legend {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.radar-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.radar-dot-sample {
  width: 7px; height: 7px;
  border-radius: 50%;
}

/* --- Gauges Row --- */
.gauges-panel {
  padding: 20px;
}

.gauges-title {
  font-family: var(--font-hud);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--cyan);
  margin-bottom: 16px;
}

.gauges-row {
  display: flex;
  gap: 16px;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
}

.gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gauge-canvas {
  display: block;
}

/* --- Activity Feed --- */
.activity-panel {
  padding: 20px;
  overflow: hidden;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.activity-title {
  font-family: var(--font-hud);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--cyan);
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: rgba(0,212,255,0.04);
  border-left: 2px solid var(--border);
  transition: all 0.2s;
}

.activity-item:hover {
  background: rgba(0,212,255,0.08);
  border-left-color: var(--cyan);
}

.activity-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  white-space: nowrap;
  margin-top: 2px;
}

.activity-text {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

.activity-company {
  font-weight: 600;
  color: var(--text);
}

/* --- Quick Actions --- */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- Urgency Panel --- */
.urgency-panel {
  padding: 16px 20px;
}

.urgency-title {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.urgency-blink {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: urgency-pulse 1s ease-in-out infinite;
}

@keyframes urgency-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,184,0,0.7); }
  50% { box-shadow: 0 0 0 6px rgba(255,184,0,0); }
}

.urgency-items {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.urgency-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: rgba(255,184,0,0.06);
  border: 1px solid rgba(255,184,0,0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.urgency-item:hover {
  background: rgba(255,184,0,0.12);
  box-shadow: var(--glow-amber);
}

.urgency-name {
  font-weight: 600;
  font-size: 12px;
  flex: 1;
}

.urgency-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--amber);
  letter-spacing: 1px;
}

/* === ALTIMETER ANIMATION === */
@keyframes needle-sweep {
  0% { transform: rotate(-120deg); }
  100% { transform: rotate(120deg); }
}

/* === HUD SCAN LINE === */
.hud-scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: hud-scan 6s linear infinite;
  opacity: 0.3;
  pointer-events: none;
  z-index: 200;
}

@keyframes hud-scan {
  0% { top: 0; }
  100% { top: 100vh; }
}

/* === COCKPIT RESPONSIVE === */
@media (max-width: 900px) {
  .cockpit-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .radar-panel { grid-row: auto; }
}

/* ===== COCKPIT RESPONSIVE ===== */
@media (max-width: 1023px) {
  .cockpit-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "radar"
      "gauges"
      "urgency"
      "activity" !important;
  }
}

@media (max-width: 767px) {
  .cockpit-grid { gap: 12px !important; }
  #radar-canvas { width: 220px !important; height: 220px !important; }
  .radar-canvas-wrap { display: flex; justify-content: center; }
  .gauges-row {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }
  .gauge-canvas { width: 100px !important; height: 100px !important; }
  .gauge-wrap { min-width: 100px; flex-shrink: 0; }
}
