#autopilotPanel {
  position: absolute;
  top: 128px;
  left: 26px;
  width: 286px;
  padding: 13px 14px 11px;
  border: 1px solid #61e1cd50;
  border-left: 3px solid #6ce8cb;
  background: linear-gradient(135deg, #09232bef, #07131de8);
  color: #dcfff7;
  pointer-events: auto;
  font:
    10px/1.4 "Courier New",
    monospace;
  box-sizing: border-box;
}
#autopilotPanel [hidden] {
  display: none !important;
}
.ap-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ap-heading strong {
  font:
    800 16px Arial,
    sans-serif;
  letter-spacing: 2px;
}
#apState {
  color: #79dfc9;
  font-size: 8px;
  text-align: right;
  letter-spacing: 0.7px;
}
.ap-credit {
  color: #a2c5cd;
  margin: 4px 0 10px;
  font-size: 9px;
}
.ap-credit a {
  color: #83f3d7;
  text-decoration: none;
  border-bottom: 1px solid #83f3d750;
}
#autopilotToggle {
  width: 100%;
  background: #123e46;
  border: 1px solid #79dfc970;
  color: #d9fff6;
  padding: 7px;
  font:
    10px "Courier New",
    monospace;
  cursor: pointer;
}
#autopilotToggle:hover,
#autopilotToggle:focus-visible {
  background: #1b5960;
  outline: 1px solid #79dfc9;
}
.engaged #autopilotToggle {
  background: #273431;
}
#apDetails {
  margin-top: 12px;
  max-height: min(365px, calc(100vh - 590px));
  min-height: 130px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #397568 transparent;
}
.ap-label {
  color: #71aaae;
  font-size: 8px;
  letter-spacing: 1.2px;
  margin-bottom: 4px;
}
#apDecision {
  font-size: 12px;
  color: #effffb;
  margin-bottom: 5px;
}
.ap-metrics {
  display: flex;
  justify-content: space-between;
  color: #84e2c7;
  font-size: 9px;
}
.ap-options {
  margin: 10px 0;
}
.ap-option {
  position: relative;
  padding: 3px 5px;
  margin: 3px 0;
  background: #173741;
  font-size: 9px;
  overflow: hidden;
}
.ap-option i {
  position: absolute;
  inset: 0 auto 0 0;
  background: #3b92774a;
  width: 0;
}
.ap-option span {
  position: relative;
}
#apControl {
  color: #b8e8f0;
  font-size: 9px;
  margin-top: 5px;
}
#apObservation {
  color: #7bafb8;
  font-size: 9px;
  margin: 3px 0 10px;
}
#apFeed {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #5fa9a32c;
}
#apFeed li {
  font-size: 9px;
  color: #afcbc9;
  padding-top: 6px;
}
#apFeed li span {
  display: inline-block;
  margin-right: 6px;
  font-size: 7px;
  color: #72e2bd;
}
.ap-footer {
  margin-top: 10px;
  color: #749698;
  font-size: 8px;
}
#apModel {
  color: #a7c3c4;
}
#apError {
  color: #ffd49c;
  margin: 9px 0 0;
  font-size: 10px;
}
@media (max-width: 1100px) {
  #autopilotPanel {
    top: 168px;
    width: 254px;
  }
  #apDetails {
    max-height: calc(100vh - 600px);
  }
}
@media (max-width: 640px) {
  #autopilotPanel {
    left: 14px;
    top: 193px;
    width: min(286px, calc(100vw - 28px));
  }
  #apDetails {
    max-height: min(330px, calc(100vh - 665px));
    min-height: 100px;
  }
}
@media (max-height: 680px) and (min-width: 641px) {
  #autopilotPanel {
    top: 119px;
    width: 260px;
    padding: 8px 11px;
  }
  #apDetails {
    max-height: max(70px, calc(100vh - 500px));
    min-height: 70px;
  }
  .ap-credit {
    margin-bottom: 5px;
  }
}

/* Keep the cockpit visible while JEV uses the ordinary station service handlers. */
body.autopilot-engaged #stationInterface {
  visibility: hidden;
  pointer-events: none;
}
