/* ═══════════════════════════════════════════════
   OpenSky Flight Radar Styles
   ═══════════════════════════════════════════════ */

/* Aircraft altitude legend */
.altitude-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #666;
}

.altitude-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Marker popup */
.aircraft-popup {
  font-family: var(--font-body);
  min-width: 200px;
}
.aircraft-popup h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--c-navy);
}
.aircraft-popup table {
  width: 100%;
  font-size: 0.85rem;
}
.aircraft-popup td {
  padding: 3px 0;
}
.aircraft-popup td:first-child {
  color: #666;
}
.aircraft-popup td:last-child {
  text-align: right;
  font-weight: 600;
}

/* Flights list */
.flights-list-container {
  max-height: 400px;
  overflow-y: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.flight-row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}
.flight-row-item:hover {
  background: #f8f9fa;
}
.flight-row-item:last-child {
  border-bottom: none;
}

.flight-callsign {
  font-weight: 700;
  color: var(--c-navy);
  min-width: 90px;
  font-size: 0.95rem;
}

.flight-route {
  color: #666;
  font-size: 0.85rem;
  flex: 1;
}

.flight-time {
  font-size: 0.8rem;
  color: #999;
}

/* Stats cards */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: transform 0.3s;
}
.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card i {
  font-size: 1.5rem;
  color: var(--c-gold);
  margin-bottom: 8px;
}

.stat-card h3 {
  font-size: 1.8rem;
  margin: 8px 0 0;
  color: var(--c-navy);
}

.stat-card p {
  color: var(--c-text-muted);
  margin: 0;
  font-size: 0.85rem;
}

/* Map container fixes */
#openskyMap .leaflet-control-zoom a {
  background: #fff;
  color: var(--c-navy);
  border-color: #ddd;
}

#openskyMap .leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
}

#openskyMap .leaflet-popup-close-button {
  top: 8px !important;
  right: 8px !important;
}

/* Refresh animation */
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.pulse-ring {
  position: relative;
}
.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--c-gold);
  animation: pulse-ring 2s infinite;
}

/* Aircraft icon on map */
.aircraft-marker {
  background: transparent !important;
  border: none !important;
  transition: transform 1.8s linear !important;
}

.aircraft-pin {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--aircraft-color, #4ade80);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
  transform: rotate(var(--aircraft-heading, 0deg));
  transform-origin: center;
}

.aircraft-icon-svg {
  width: 30px;
  height: 30px;
  display: block;
  fill: currentColor;
  stroke: #0a1628;
  stroke-width: 1.35;
  paint-order: stroke fill;
}

.aircraft-popup h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--c-navy);
}

.aircraft-popup-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  padding: 6px;
  background: #D4AF37;
  color: #0A1628 !important;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}
