/* Operational phase, urgency, inbound, and Action Center enhancements. */

#next-flights .live-flight-status--inbound-only {
  display: grid;
}

#next-flights .live-flight-status--inbound-only .live-flight-status__section--inbound-compact {
  padding: 8px;
}

.flight-card--optimized {
  position: relative;
  overflow: hidden;
  border-left-width: 5px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.flight-card--urgency-neutral {
  border-left-color: #94a3b8;
}

.flight-card--urgency-normal {
  border-color: #b7e4c7;
  border-left-color: #15803d;
  background:
    linear-gradient(135deg, rgba(21, 128, 61, 0.07), transparent 38%),
    linear-gradient(180deg, #fff, #fbfffc);
}

.flight-card--urgency-monitor {
  border-color: #fde68a;
  border-left-color: #ca8a04;
  background:
    linear-gradient(135deg, rgba(202, 138, 4, 0.09), transparent 38%),
    linear-gradient(180deg, #fffef7, #fffdf3);
}

.flight-card--urgency-high {
  border-color: #fdba74;
  border-left-color: #ea580c;
  background:
    linear-gradient(135deg, rgba(234, 88, 12, 0.1), transparent 38%),
    linear-gradient(180deg, #fffaf6, #fff7ed);
}

.flight-card--urgency-critical {
  border-color: #fca5a5;
  border-left-color: #b91c1c;
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.11), transparent 38%),
    linear-gradient(180deg, #fff9f9, #fff1f2);
}

.flight-card--urgency-done {
  border-color: #d7dde5;
  border-left-color: #64748b;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.flight-card--urgency-normal .flight-card__top em {
  background: #15803d;
}

.flight-card--urgency-monitor .flight-card__top em {
  color: #422006;
  background: #facc15;
}

.flight-card--urgency-high .flight-card__top em {
  background: #ea580c;
}

.flight-card--urgency-critical .flight-card__top em {
  background: #b91c1c;
}

.flight-card--urgency-done .flight-card__top em,
.flight-card--urgency-neutral .flight-card__top em {
  background: #475569;
}

.flight-phase {
  display: grid;
  gap: 8px;
  margin: 1px 0 11px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.flight-phase__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.flight-phase__header > span {
  color: var(--muted-dark);
  font-size: 0.65rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flight-phase__header > strong {
  color: #111827;
  font-size: 0.88rem;
  font-weight: 950;
  letter-spacing: -0.01em;
  text-align: right;
}

.flight-phase ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flight-phase__step {
  position: relative;
  min-width: 0;
  border-radius: 10px;
  padding: 7px 5px;
  color: #64748b;
  background: #eef2f7;
  text-align: center;
}

.flight-phase__step span,
.flight-phase__step small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flight-phase__step span {
  color: inherit;
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.flight-phase__step small {
  margin-top: 2px;
  color: inherit;
  font-size: 0.65rem;
  font-weight: 850;
}

.flight-phase__step--done {
  color: #166534;
  background: #dcfce7;
}

.flight-phase__step--current {
  color: #fff;
  background: #111827;
  box-shadow: 0 5px 13px rgba(15, 23, 42, 0.18);
}

.flight-card--urgency-monitor .flight-phase__step--current {
  color: #422006;
  background: #facc15;
}

.flight-card--urgency-high .flight-phase__step--current {
  background: #ea580c;
}

.flight-card--urgency-critical .flight-phase__step--current {
  background: #b91c1c;
}

.flight-card--urgency-done .flight-phase__step--done {
  color: #334155;
  background: #e2e8f0;
}

.flight-phase--cancelled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: #fecaca;
  color: #7f1d1d;
  background: #fff1f2;
}

.flight-phase--cancelled strong {
  color: #991b1b;
  font-size: 0.88rem;
}

.flight-phase--cancelled span {
  color: #7f1d1d;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: right;
}

.flight-card--optimized .flight-card__times--operational {
  grid-template-columns: repeat(var(--flight-time-columns, 4), minmax(0, 1fr)) !important;
}

.flight-card__times--operational dt small {
  display: block;
  margin-top: 1px;
  color: #b45309;
  font-size: 0.55rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.flight-card--urgency-done .flight-card__times--operational,
.flight-card--urgency-done .live-flight-status {
  opacity: 0.9;
}

.live-flight-status__section--departed {
  border-left: 3px solid #64748b;
  padding-left: 9px;
}

.live-flight-status__section--inbound-compact {
  border-radius: 12px;
  padding: 9px;
}

.live-flight-status__section--inbound-neutral {
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
}

.live-flight-status__section--inbound-normal {
  border-left: 3px solid #15803d;
  background: #f0fdf4;
}

.live-flight-status__section--inbound-monitor {
  border-left: 3px solid #ca8a04;
  background: #fefce8;
}

.live-flight-status__section--inbound-high {
  border-left: 3px solid #ea580c;
  background: #fff7ed;
}

.live-flight-status__section--inbound-critical {
  border-left: 3px solid #b91c1c;
  background: #fff1f2;
}

.live-flight-status__section--inbound-done {
  border-left: 3px solid #64748b;
  background: #f1f5f9;
}

.inbound-operational-note {
  border-left: 3px solid rgba(15, 23, 42, 0.18);
  padding-left: 8px;
}
