/* D282: the companion channel. It reuses the forge sheet shell, so only the conversation is new.
   The log is the screen: one line of the pilot, one line back, read like a voice on the intercom. */

.cmp-lede {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #8fa3b8;
}
.cmp-lede b { color: #9af7ff; font-size: 14px; letter-spacing: 0.14em; }

.cmp-log {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.cmp-row {
  border: 1px solid #1f3540;
  background: #08141a;
  padding: 8px 10px;
  max-width: 62ch;
}
.cmp-row b {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #6fe7ff;
}
.cmp-row p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #d8eef5;
  overflow-wrap: anywhere;
}
/* The pilot's own line sits on the other side of the channel. */
.cmp-row.you {
  margin-left: auto;
  border-color: #2b4a3c;
  background: #0a1813;
}
.cmp-row.you b { color: #8fe8bb; }
/* A scripted answer is honest about it: the model did not write this one. */
.cmp-row.script p { color: #c4d8e2; }
.cmp-src {
  margin-left: 6px;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #ffb454;
}

.cmp-form {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.cmp-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  color: #e4f6ff;
  background: rgba(6, 12, 18, 0.9);
  border: 1px solid rgba(120, 200, 255, 0.28);
}
.cmp-input:focus { outline: none; border-color: rgba(140, 225, 255, 0.7); }
.cmp-input::placeholder { color: #728496; }
.cmp-send {
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #06121c;
  background: #7fd4ff;
  border: 1px solid #7fd4ff;
  cursor: pointer;
}
.cmp-send[disabled] { opacity: 0.5; cursor: default; }

/* D288 amended: the strip records what already ran, so it reads as a receipt rather than the amber
   trigger it used to be. There is no button on it — an order needs no second word. */
.cmp-staged {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(143, 232, 187, 0.45);
  background: rgba(8, 24, 18, 0.75);
}
.cmp-staged b { font-size: 12px; letter-spacing: 0.14em; color: #8fe8bb; }
.cmp-staged span { flex: 1 1 140px; font-size: 13px; color: #d8eef5; }

/* The mode chip beside HOLD (D286): PTT · ARMED · WAKE. It exists so a desk, where the thumb
   button is hidden, can arm the microphone; on a phone it mirrors the button under the map. */
.cmp-mode {
  min-width: 58px;
  min-height: 44px;
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #8fa3b8;
  background: rgba(10, 16, 24, 0.9);
  border: 1px solid rgba(176, 160, 255, 0.28);
  cursor: pointer;
}
.cmp-mode:hover { border-color: rgba(200, 188, 255, 0.65); }
.cmp-mode.live { color: #ffb454; border-color: rgba(255, 180, 84, 0.7); }

/* Hold-to-talk (plan 65 slice 3). A hold, not a toggle: the microphone is live between press and
   release and the clip is sent on release. The amber LISTEN state is the only loud thing on the
   sheet, so a pilot can see the room is listening. */
.cmp-mic {
  min-width: 62px;
  min-height: 44px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #cfc6ff;
  background: rgba(176, 160, 255, 0.1);
  border: 1px solid rgba(176, 160, 255, 0.4);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cmp-mic:hover { border-color: rgba(200, 188, 255, 0.7); }
.cmp-mic.rec { color: #06121c; background: #ffb454; border-color: #ffb454; }
.cmp-mic[disabled] { opacity: 0.55; cursor: default; }

.cmp-foot {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #728496;
}
.cmp-foot b { color: #8fd0ff; font-weight: 400; }
.cmp-empty { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: #8fa3b8; max-width: 62ch; }
.cmp-bad { margin: 0 0 10px; font-size: 12px; color: #ff9f9f; }

@media (max-width: 879px), (pointer: coarse) {
  .cmp-row { max-width: none; }
  .cmp-example { display: none; }
}

/* D286: the thumb microphone. One button, three modes (PTT · ARMED · WAKE). `display: contents` keeps
   the desk shape's absolute map and button exactly where they were; the phone turns the same wrapper
   into a column so the button sits under the map's own label instead of over the scope. */
.map-stack { display: contents; }
.bedop-mic { display: none; }

/* A desk has a pointer, not a thumb: the same control sits in the zoom column (the chips end at 234 px
   from the pane top) and reads left to right. */
body:not(.phoneUi) .bedop-mic {
  position: absolute; top: 240px; right: 14px; z-index: 7;
  width: 126px; height: 34px; padding: 0 8px;
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px;
  font: inherit; color: #cfc6ff; background: rgba(10, 16, 24, 0.92);
  border: 1px solid rgba(176, 160, 255, 0.45); border-radius: 4px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
body:not(.phoneUi) .bedop-mic b { font-size: 12px; letter-spacing: 0.12em; }
body:not(.phoneUi) .bedop-mic em { font-style: normal; font-size: 11px; letter-spacing: 0.1em; color: #8fa3b8; }
body:not(.phoneUi) .bedop-mic[data-mode="wake"] { border-color: rgba(140, 200, 255, 0.55); }
body:not(.phoneUi) .bedop-mic.live {
  border-color: rgba(255, 180, 84, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 180, 84, 0.35), 0 0 16px rgba(255, 180, 84, 0.28);
}
body:not(.phoneUi) .bedop-mic.live em { color: #ffb454; }
body:not(.phoneUi) .bedop-mic[hidden] { display: none !important; }

body.phoneUi .map-stack {
  position: absolute; top: 8px; right: 8px; z-index: 20;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
body.phoneUi .map-stack .minimap { position: static; top: auto; right: auto; }
body.phoneUi .map-stack .bedop-mic {
  position: static; top: auto; right: auto;
}
body.phoneUi .bedop-mic {
  position: fixed; top: 116px; right: 8px; z-index: 20;
  width: 56px; height: 56px; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font: inherit; color: #cfc6ff; background: rgba(10, 16, 24, 0.92);
  border: 1px solid rgba(176, 160, 255, 0.45); border-radius: 4px;
  touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
body.phoneUi .bedop-mic b { font-size: 12px; letter-spacing: 0.12em; }
body.phoneUi .bedop-mic em { font-style: normal; font-size: 11px; letter-spacing: 0.1em; color: #8fa3b8; }
body.phoneUi .bedop-mic[data-mode="wake"] { border-color: rgba(140, 200, 255, 0.55); }
/* ON AIR is the only loud state: the same amber as a held take, so listening never looks decorative. */
body.phoneUi .bedop-mic.live {
  border-color: rgba(255, 180, 84, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 180, 84, 0.35), 0 0 16px rgba(255, 180, 84, 0.28);
}
body.phoneUi .bedop-mic.live em { color: #ffb454; }
body.phoneUi .bedop-mic[hidden] { display: none !important; }
/* A full screen sheet, a drawer or another pane owns the phone: the dock, its sheet and the
   microphone all step aside. The scope is the sector pane only; a menu, the deck, the chart and the
   other two panes hide the thumb button with it. */
body.siteOpen .bedop-mic,
body:has(.sheet:not([hidden])) .bedop-mic,
body:has(#haulTray:not([hidden])) .bedop-mic,
body:has(#noticeTray:not([hidden])) .bedop-mic,
body:has(.deck-overlay:not([hidden])) .bedop-mic,
body:has(.radar-overlay.is-open) .bedop-mic,
body.phoneUi:not([data-phone-sheet=""]) .bedop-mic,
body.phoneUi.paneAway .bedop-mic { display: none !important; }

/* D289: the command wheel. The ring is the keyboard and the middle is the sentence it is building.
   It sits above the thumb mic, which steps aside while the wheel is up so one thumb has one target. */
body.cmp-wheel-open .bedop-mic { display: none !important; }

.cmp-wheel-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 6, 10, 0.78);
}
.cmp-wheel-overlay[hidden] { display: none !important; }
.cmp-wheel-wrap { width: min(92vw, 430px); display: flex; flex-direction: column; gap: 8px; }
.cmp-wheel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cmp-wheel-head .eyebrow { font-size: 12px; letter-spacing: 0.14em; color: #6fe7ff; }

.cmp-wheel { position: relative; width: 100%; aspect-ratio: 1; --r: min(34vw, 150px); }

/* A key rides a ring: turn to its angle, step out along the radius, then stand back upright. */
.cmp-wheel-key {
  position: absolute; left: 50%; top: 50%;
  width: 78px; height: 28px; margin: 0; padding: 0 4px;
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--a)));
  font: inherit; font-size: 11px; letter-spacing: 0.06em; text-align: center;
  color: #cfd8e6; background: rgba(8, 16, 24, 0.94);
  border: 1px solid rgba(120, 200, 255, 0.3);
  cursor: pointer;
}
.cmp-wheel-key.on { color: #06121c; background: #ffb454; border-color: #ffb454; }

.cmp-wheel-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
.cmp-wheel-hint { font-size: 11px; letter-spacing: 0.12em; color: #6fe7ff; }
.cmp-wheel-line { font-size: 13px; line-height: 1.35; color: #e4f6ff; overflow-wrap: anywhere; }
.cmp-wheel-acts { display: flex; gap: 6px; width: 100%; }
.cmp-wheel-btn {
  flex: 1 1 0; min-height: 34px;
  font: inherit; font-size: 12px; letter-spacing: 0.12em;
  color: #8fa3b8; background: rgba(10, 16, 24, 0.9);
  border: 1px solid rgba(120, 200, 255, 0.28); cursor: pointer;
}
.cmp-wheel-btn.send { color: #06121c; background: #7fd4ff; border-color: #7fd4ff; }
.cmp-wheel-btn[disabled] { opacity: 0.45; cursor: default; }
.cmp-wheel-mic {
  width: 100%; min-height: 40px;
  font: inherit; font-size: 12px; letter-spacing: 0.12em;
  color: #cfc6ff; background: rgba(176, 160, 255, 0.1);
  border: 1px solid rgba(176, 160, 255, 0.4); cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.cmp-wheel-mic.rec { color: #06121c; background: #ffb454; border-color: #ffb454; }

@media (max-width: 480px) {
  .cmp-wheel-key { width: 64px; height: 26px; font-size: 11px; }
  .cmp-wheel { --r: min(34vw, 150px); }
}
