/* Fleet Tracker - Full Screen Table Display (Exact BEFA Style Match) */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1d3a 100%);
  color: #e5e7eb;
  overflow: hidden;
  height: 100vh;
  margin: 0;
  padding: 0;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Header - matches dashboard.css lines 97-123 */
.header {
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(238, 108, 77, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  flex: 1;
  text-align: center;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Leaderboard Link */
.leaderboard-link {
  color: #60a5fa;
  text-decoration: underline;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.leaderboard-link:hover {
  color: #93c5fd;
}

#fleet-last-update {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 20px;
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  box-shadow: 0 0 8px rgba(107, 114, 128, 0.6);
  animation: pulse 2s infinite;
}

.status-dot.active {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Fleet Table Content - matches dashboard.css lines 148-183 */
.fleet-table-content {
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px - 40px); /* Subtract header and footer */
  overflow-y: auto;
  overflow-x: hidden;
}

.fleet-top-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}

.fleet-bottom-section {
  display: flex;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.fleet-top-section .status-section {
  flex: 0 0 auto;
  max-height: 300px;
  overflow-y: auto;
}

.fleet-bottom-section .status-section {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}

.status-section {
  margin-bottom: 15px;
}

/* Section Title - matches dashboard.css lines 188-198 */
.section-title {
  color: #60a5fa;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px 0;
  padding: 6px 10px;
  background: rgba(96, 165, 250, 0.1);
  border-left: 3px solid #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Fleet Table - matches dashboard.css lines 200-240 */
.fleet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.fleet-table thead {
  background: rgba(96, 165, 250, 0.2);
}

.fleet-table th {
  padding: 6px 10px;
  text-align: left;
  font-weight: 600;
  color: #93c5fd;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.3);
}

.fleet-table td {
  padding: 6px 10px;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fleet-table tbody tr {
  transition: background-color 0.2s ease;
}

.fleet-table tbody tr:hover {
  background: rgba(96, 165, 250, 0.1);
}

/* Clickable rows */
.fleet-table tbody tr.clickable-row {
  cursor: pointer;
}

.fleet-table tbody tr.clickable-row:hover {
  background: rgba(96, 165, 250, 0.15);
  transform: translateX(2px);
}

.fleet-table tbody tr.clickable-row:active {
  background: rgba(96, 165, 250, 0.2);
}

.fleet-table .no-data td {
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  padding: 15px;
}

/* Status indicators - matches dashboard.css lines 242-254 */
.status-flying {
  color: #22c55e;
  font-weight: 600;
}

.status-ground {
  color: #94a3b8;
}

.status-recent {
  color: #fbbf24;
}

/* Flight/Ground Indicators */
.flight-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #22c55e;
  margin-right: 6px;
  animation: blink 2s infinite;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.3; }
}

.ground-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #60a5fa;
  margin-right: 6px;
  box-shadow: 0 0 4px rgba(96, 165, 250, 0.5);
}

/* Column Specific Styling */
.reg-col {
  font-weight: 700;
  color: #fbbf24;
}

.type-col {
  color: #9ca3af;
  font-size: 12px;
}

.location-col {
  color: #60a5fa;
}

.status-col {
  color: #94a3b8;
}

.alt-col,
.spd-col {
  text-align: right;
  font-weight: 600;
  color: #22c55e;
  font-variant-numeric: tabular-nums;
}

.time-col,
.ground-time-col,
.last-seen-col {
  color: #9ca3af;
  font-size: 12px;
}

/* Stale data styling */
.stale {
  opacity: 0.5;
}

.stale td {
  color: #6b7280 !important;
}

/* Footer */
.footer {
  background: rgba(26, 29, 58, 0.8);
  padding: 10px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
  color: #93c5fd;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(96, 165, 250, 0.5);
}
