/* ============================================================
   飞机故障系统 UI 样式
   ============================================================ */

/* 故障警告窗口 */
.fault-alert-window {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 360px;
  background: #ffffff;
  border: 2px solid #DC2626;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(220, 38, 38, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 13px;
  color: #1F2937;
  overflow: hidden;
  user-select: none;
}

.fault-alert-header {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #fff;
  padding: 10px 14px;
  cursor: move;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
}

.fault-alert-header .fault-alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fault-alert-header .fault-alert-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.fault-alert-close {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.15s;
  font-size: 16px;
  font-weight: bold;
}

.fault-alert-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.fault-alert-close.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.fault-alert-body {
  padding: 14px;
}

.fault-alert-section {
  margin-bottom: 12px;
}

.fault-alert-section:last-child {
  margin-bottom: 0;
}

.fault-alert-label {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fault-alert-value {
  font-size: 13px;
  color: #1F2937;
  font-weight: 500;
}

.fault-alert-value.danger {
  color: #DC2626;
  font-weight: 600;
}

.fault-alert-value.warning {
  color: #D97706;
  font-weight: 600;
}

.fault-alert-value.success {
  color: #059669;
  font-weight: 600;
}

.fault-alert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #F3F4F6;
}

.fault-alert-row:last-child {
  border-bottom: none;
}

.fault-alert-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.fault-alert-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.fault-alert-btn.primary {
  background: #DC2626;
  color: #fff;
}

.fault-alert-btn.primary:hover {
  background: #B91C1C;
}

.fault-alert-btn.secondary {
  background: #F3F4F6;
  color: #374151;
}

.fault-alert-btn.secondary:hover {
  background: #E5E7EB;
}

.fault-alert-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fault-alert-penalty {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
}

.fault-alert-penalty-title {
  font-size: 12px;
  font-weight: 600;
  color: #DC2626;
  margin-bottom: 6px;
}

.fault-alert-penalty-item {
  font-size: 11px;
  color: #7F1D1D;
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

/* 飞机红色呼吸框（地图上的飞机高亮） */
.aircraft-fault-highlight {
  position: absolute;
  pointer-events: none;
  border: 2px solid #DC2626;
  border-radius: 4px;
  animation: faultPulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

@keyframes faultPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
  }
  50% {
    transform: scale(1.25);
    opacity: 0.6;
    box-shadow: 0 0 16px rgba(220, 38, 38, 0.9);
  }
}

/* 飞机列表中的故障标识 */
.ac-fault-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #FEE2E2;
  color: #DC2626;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  animation: faultBadgePulse 1.5s ease-in-out infinite;
}

@keyframes faultBadgePulse {
  0%, 100% {
    background: #FEE2E2;
  }
  50% {
    background: #FECACA;
  }
}

/* 维修面板中的紧急维修标注 */
.maintenance-emergency-tag {
  display: inline-block;
  padding: 1px 6px;
  background: #DC2626;
  color: #fff;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

/* 紧急维修按钮 */
.btn-emergency-maintenance {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600 !important;
  animation: emergencyBtnPulse 2s ease-in-out infinite;
}

@keyframes emergencyBtnPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
  }
}

/* 滞留乘客信息条 */
.stranded-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  font-size: 12px;
  margin: 8px 0;
}

.stranded-info-bar .stranded-count {
  font-weight: 600;
  color: #D97706;
}

.stranded-deadline {
  font-size: 11px;
  color: #92400E;
  font-weight: 500;
}

.stranded-deadline.overtime {
  color: #DC2626;
  font-weight: 600;
}
