/* Container & Tabs */
/* ===== Header & Tabs (no background) ===== */

.flight-header {
  background-color: transparent !important;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 90%;
  margin: 0 auto 1rem;
}

/* Center the tabs; keep them text-only */
#flight-tabs {
  display: flex;
  align-items: center;
  justify-content: center; 
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  list-style: none;
}

#flight-tabs .nav-link {
  color: #0148A1;
  background: transparent;
  border: 0;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

#flight-tabs .nav-link.active {
  color: #0148A1;
  border-bottom: 2px solid #0148A1;  /* simple active indicator */
}

/* The vertical bar between tabs */
#flight-tabs .separator {
  color: #0148A1;
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
}

/* Timestamp on the right in blue */
#flight-timestamp {
  color: #0148A1;
  font-weight: 500;
  margin-left: auto;
}

/* Tables */
.flight-table {
  width: 100%;
  max-width: 90%;
  margin: 1.5rem auto;
  border-collapse: collapse;
}
.flight-table th,
.flight-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.8rem;
}
.flight-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

/* Section-header: first row in each table */
.flight-table thead .section-header th {
  background-color: #0148A1 !important;
  color: #fff !important;
  font-size: 1rem;
  text-align: left;
  padding: 1rem;
}

/* Column-header: second row */
.flight-table thead .column-header th {
  background-color: #0148A1 !important;
  color: #fff !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Status badges */
.flight-status-on-time    { background: #28a745!important; color: #fff!important; }
.flight-status-early      { background: #20c997!important; color: #fff!important; }
.flight-status-delayed    { background: #dc3545!important; color: #fff!important; }
.flight-status-scheduled  { background: #17a2b8!important; color: #fff!important; }
.flight-status-cancelled  { background: #6c757d!important; color: #fff!important; }
.flight-status-completed  { background: #6f42c1!important; color: #fff!important; }

/* New status badge styles for faux-buttons */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  width: 180px;
  box-sizing: border-box;
}

.status-early {
  background-color: #28a745 !important;
  color: #fff !important;
  border-color: #28a745 !important;
}

.status-delayed {
  background-color: #ffc107 !important;
  color: #212529 !important;
  border-color: #ffc107 !important;
}

.status-cancelled {
  background-color: #dc3545 !important;
  color: #fff !important;
  border-color: #dc3545 !important;
}

/* Date separators (like Flightradar24) */
.date-separator td {
  background-color: #f8f9fa !important;
  border-top: 2px solid #dee2e6 !important;
  border-bottom: 1px solid #dee2e6 !important;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
}

/* Load more flights button */
.load-more-row td {
  background-color: #f8f9fa !important;
  border-top: 1px solid #dee2e6 !important;
  padding: 1rem !important;
}

.load-more-arrivals,
.load-more-departures {
  background-color: #0148A1 !important;
  border-color: #0148A1 !important;
  color: white !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.load-more-arrivals:hover,
.load-more-departures:hover {
  background-color: #013a7a !important;
  border-color: #013a7a !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.flight-status-on-time,
.flight-status-early,
.flight-status-delayed,
.flight-status-scheduled,
.flight-status-cancelled,
.flight-status-completed {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Row highlighting */
.row-delayed {
  background-color: #fffbe6 !important;
}

.row-cancelled {
  background-color: #ffe6e6 !important;
}

.row-early {
  background-color: #e6fff0 !important;
}

/* Loading and error states */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

.text-muted {
  color: #6c757d !important;
}

.text-danger {
  color: #dc3545 !important;
}

/* Disclaimer styling */
.disclaimer {
  font-size: 0.875rem;
  color: #6c757d;
  text-align: center;
  margin-top: 1rem;
}

/* Responsive scroll */
@media (max-width: 600px) {
  .flight-table {
    display: block;
    overflow-x: auto;
  }
}
