/* Scoped CSS for Live Flight Tracker Map */
.lftm-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  line-height: 1.5;
}

.lftm-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.lftm-hero-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0284c7;
  background-color: #e0f2fe;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.lftm-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem;
  letter-spacing: -0.025em;
}

.lftm-subtitle {
  font-size: 1.125rem;
  color: #64748b;
  max-width: 650px;
  margin: 0 auto;
}

/* Tabs */
.lftm-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.75rem;
  overflow-x: auto;
}

.lftm-tab {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lftm-tab:hover {
  color: #0f172a;
}

.lftm-tab-active {
  color: #0284c7;
  border-bottom-color: #0284c7;
}

/* Views */
.lftm-view {
  display: none;
}

.lftm-view-active {
  display: block;
}

/* Layout */
.lftm-radar-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .lftm-radar-layout {
    grid-template-columns: 1fr;
  }
}

.lftm-radar-col, .lftm-hud-col {
  display: flex;
  flex-direction: column;
}

.lftm-card, .lftm-radar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lftm-radar-card {
  background-color: #0b132b;
  border-color: #1e293b;
  color: #f8fafc;
}

.lftm-radar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lftm-select-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lftm-label-inline {
  font-size: 0.8125rem;
  color: #94a3b8;
  font-weight: 600;
}

.lftm-select {
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  border: 1px solid #334155;
  background-color: #1e293b;
  color: #f8fafc;
  font-size: 0.8125rem;
}

.lftm-btn-group {
  display: flex;
  gap: 0.5rem;
}

/* Radar Canvas Wrapper */
.lftm-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 6/5;
  background-color: #030712;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #1e293b;
}

.lftm-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.lftm-compass-north {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.75rem;
  pointer-events: none;
}

.lftm-sweep-legend {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: #38bdf8;
  pointer-events: none;
}

.lftm-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  display: inline-block;
  box-shadow: 0 0 6px #22c55e;
}

.lftm-status-alert {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.lftm-radar-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid #1e293b;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* HUD Column */
.lftm-hud-card {
  position: sticky;
  top: 1rem;
}

.lftm-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.lftm-hud-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lftm-hud-callsign {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.025em;
}

.lftm-hud-squawk-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background-color: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
}

.lftm-label-xs {
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.lftm-squawk-code {
  font-family: monospace;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

/* Route Banner */
.lftm-route-banner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.lftm-airport {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lftm-iata {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0284c7;
}

.lftm-city {
  font-size: 0.75rem;
  color: #64748b;
}

.lftm-route-arrow {
  font-size: 1.25rem;
  color: #94a3b8;
}

/* Telemetry Grid */
.lftm-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.lftm-telem-item {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.lftm-telem-label {
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
}

.lftm-telem-val {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 0.125rem;
}

.lftm-hud-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Table */
.lftm-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lftm-search-wrap {
  max-width: 260px;
}

.lftm-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.375rem 0.625rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.lftm-table-responsive {
  overflow-x: auto;
}

.lftm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.lftm-table th {
  background-color: #f1f5f9;
  color: #475569;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid #cbd5e1;
}

.lftm-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.lftm-badge-squawk {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  background-color: #f1f5f9;
  border-radius: 0.25rem;
  font-family: monospace;
  font-weight: 700;
  border: 1px solid #e2e8f0;
}

.lftm-target-btn-active {
  background-color: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Buttons */
.lftm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #0284c7;
  border: 1px solid #0284c7;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lftm-btn:hover {
  background-color: #0369a1;
}

.lftm-btn-secondary {
  background-color: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

.lftm-btn-secondary:hover {
  background-color: #334155;
}

.lftm-btn-danger {
  background-color: #dc2626;
  border-color: #dc2626;
}

.lftm-btn-danger:hover {
  background-color: #b91c1c;
}

.lftm-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.lftm-btn-block {
  width: 100%;
}

/* Transponder Decoder Cards */
.lftm-decoder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.lftm-code-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.lftm-card-emergency {
  border-left: 4px solid #ef4444;
}

.lftm-card-warning {
  border-left: 4px solid #f59e0b;
}

.lftm-card-danger {
  border-left: 4px solid #b91c1c;
}

.lftm-code-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.625rem;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: monospace;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.lftm-code-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.lftm-code-desc {
  font-size: 0.875rem;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}

.lftm-section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.lftm-section-desc {
  font-size: 0.9375rem;
  color: #64748b;
  margin: 0 0 1.25rem;
}

/* Ad slots */
.lftm-ad-slot {
  min-height: 280px;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  color: #94a3b8;
  font-size: 0.875rem;
}

.lftm-mt-4 { margin-top: 1.5rem; }

.lftm-target-btn {
  font-size: 0.75rem;
}

