/* ============================================================
   FPLN-PFD.CSS — PFD waypoint sidebar (desktop only)
   Vertical bar showing flight plan waypoints next to the PFD
   ============================================================ */

/* ── Layout wrapper: PFD + waypoint bar side by side ── */
.pfd-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 800px;  /* same as .fms-strip */
  margin: 0 auto;
}

/* PFD keeps its natural width, no shrink */
.pfd-layout .pfd-container {
  flex: 0 0 auto;
  margin: 0;
}

/* ── Waypoint sidebar ── */
.pfd-wpt-bar {
  display: none; /* hidden by default (mobile) */
  flex-direction: column;
  align-self: stretch;
  flex: 1 1 0;
  min-width: 0;
  background: black;
  border-left: 1px solid var(--border);
  font-family: var(--mono);
  overflow: hidden;
  padding: 2px 0;
}

/* ── Individual waypoint item ── */
.pfd-wpt-item {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-height: 0;
  padding: 0 6px 0 0;
  color: var(--green);
  font-size: .55rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s;
  overflow: hidden;
}

.pfd-wpt-item:hover {
  background: rgba(0, 255, 106, .05);
}

/* Active waypoint */
.pfd-wpt-item.active {
  color: var(--white);
  font-weight: 700;
  background: rgba(232, 240, 248, .08);
}

/* ── Vertical line + diamond node ── */
.pfd-wpt-node {
  position: relative;
  flex: 0 0 60px;
  align-self: stretch;
}

/* Continuous vertical line */
.pfd-wpt-node::before {
  content: '';
  position: absolute;
  right: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green);
}

/* Diamond marker */
.pfd-wpt-node::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -2px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--green);
  background: var(--surface);
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 1;
}

/* First item: line starts at diamond */
.pfd-wpt-item:first-child .pfd-wpt-node::before {
  top: 50%;
}

/* Last item: line ends at diamond */
.pfd-wpt-item:last-child .pfd-wpt-node::before {
  bottom: 50%;
}

/* Active: line + diamond turn white */
.pfd-wpt-item.active .pfd-wpt-node::before {
  background: var(--white);
}

.pfd-wpt-item.active .pfd-wpt-node::after {
  border-color: var(--white);
}

/* ── Waypoint label ── */
.pfd-wpt-label {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* ── Desktop only ── */
@media (min-width: 768px) {
  .pfd-wpt-bar {
    display: flex;
  }
}
