/* Feedback island styles — ported from feedback/panel/src/styles.css and
 * rethemed onto ICE's palette.
 *
 * Two prefixes, on purpose:
 *   .feedback-*  the shell that has no upstream counterpart — the FAB and the
 *                drawer. Deliberately modelled on ICE's own .chat-fab /
 *                .chat-panel so the two docked FABs and their drawers read as
 *                siblings of the same app, and written against ICE's tokens
 *                directly, exactly as those rules are.
 *   .tmfb-*      everything ported 1:1 from the package (list, badges, thread,
 *                composer, confirm). Upstream's class names AND its --tmfb-*
 *                variable layer are kept; the layer is simply re-pointed at ICE's
 *                tokens in the one block below. That is the whole retheme, and it
 *                keeps a future upstream re-sync a readable diff.
 *
 * Light mode only. ICE has no dark mode at all — zero prefers-color-scheme,
 * `.dark` or `data-theme` in its stylesheet — so the package's dark half is
 * dropped rather than carried as dead CSS.
 *
 *   .fbp-*       the full-width Σχόλια page (#feedbackPage). It reuses ICE's own
 *                .table-wrap / .hist-* table styling wholesale, so only the bits
 *                that have no counterpart are defined here.
 *
 * Not defined here: #fabDock's own rule and .hidden (ICE's global
 * `display: none !important` utility, which the FAB, the drawer and the page's two
 * views all use to show/hide). The one exception is the stacking modifier at the
 * bottom of this file, which has to name #fabDock to out-specify it.
 */

/* The retheme. Colour literals appear here and (deliberately) in three places
 * below; everything else derives from these. The three neutral literals mirror
 * rules in web/styles.css exactly, so the two stylesheets stay in step:
 *   --tmfb-border-hover  = .chat-chip:hover
 *   --tmfb-accent-line   = .chat-chip.cmd / .pres-upsell border
 *   --tmfb-disabled      = .chat-send:disabled */
.feedback-panel,
.feedback-fab,
.fbp {
  --tmfb-bg: var(--card);
  --tmfb-surface: var(--soft);
  --tmfb-border: var(--line);
  --tmfb-border-hover: #c7c9d0;
  --tmfb-text: var(--ink);
  --tmfb-muted: var(--muted);
  --tmfb-accent: var(--brand);
  --tmfb-accent-2: var(--brand-2);
  --tmfb-accent-soft: var(--brand-soft);
  --tmfb-accent-soft-2: var(--brand-soft-2);
  --tmfb-accent-line: #c9d8c4;
  --tmfb-disabled: #c4cbd4;
  /* Amber is a signal, not brand: it is the "look here" tint upstream uses for a
   * deep-linked ticket, and it stays in ICE's own warm status family (--partial /
   * --partial-bg) rather than competing with the green brand. */
  --tmfb-highlight: 245, 158, 11;
  --tmfb-radius: var(--radius-sm);
}

/* ── The FAB ──────────────────────────────────────────────────────────────────
 * A flex child of #fabDock — it must not position itself; the dock owns
 * position/right/bottom/z-index. Same pill geometry, padding and weight as
 * .chat-fab so the pair looks like one control set, but filled with the lime
 * --accent instead of Βοηθός's deep-green gradient: lime is the palette's
 * designated highlight (the logo diamond, .sc-tag.win, .home-card-ic.lime all
 * use `background: var(--accent); color: var(--brand)`), so the two FABs are
 * instantly distinguishable while both clearly belong to this app. */
.feedback-fab {
  position: relative; /* only so the count badge can anchor to it */
  display: flex; align-items: center; gap: 9px;
  padding: 13px 20px 13px 16px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #b7d94f); color: var(--brand);
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 26px rgba(31, 69, 54, .3);
  transition: transform .12s, box-shadow .12s;
}
.feedback-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(31, 69, 54, .38); }
.feedback-fab--open { box-shadow: 0 4px 14px rgba(31, 69, 54, .26), inset 0 0 0 2px var(--brand); }
/* An SVG, not an emoji — so it inherits --brand from the pill and matches the
   line weight of every other icon in the app. */
.feedback-fab-icon { display: grid; place-items: center; flex: none; }
.feedback-fab-icon svg { width: 19px; height: 19px; display: block; }
.feedback-fab-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--missing); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 2px var(--card);
}

/* ── The drawer ───────────────────────────────────────────────────────────────
 * Same non-blocking side-drawer geometry as .chat-panel (no page backdrop), one
 * z-index above it so an open feedback drawer sits on top when Βοηθός is open
 * too. */
.feedback-panel {
  position: fixed; top: 16px; right: 16px; bottom: 16px; z-index: 47;
  width: min(420px, calc(100vw - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(16, 17, 20, .3);
  font-family: inherit; color: var(--ink);
  animation: feedbackIn .18s ease-out;
}
@keyframes feedbackIn { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.feedback-panel * { box-sizing: border-box; }

/* .chat-head tints green → lime; this one is lime → green, so the two drawer
   headers are told apart at a glance while sharing the same treatment. */
.feedback-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(203, 232, 107, .3), rgba(31, 69, 54, .07));
}
.feedback-head-text { flex: 1; min-width: 0; }
.feedback-head-text strong { font-size: 15px; font-weight: 800; display: block; }
.feedback-sub {
  font-size: 11.5px; color: var(--muted);
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feedback-back {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  width: 28px; height: 28px; border-radius: 9px; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 700; line-height: 1; padding: 0;
  transition: background .12s, border-color .12s;
}
.feedback-back:hover { background: var(--soft); border-color: #b9bbc2; }

.feedback-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.feedback-foot {
  flex: none; padding: 12px 14px; border-top: 1px solid var(--line);
  background: var(--card);
}

/* ── List (FeedbackList) ─────────────────────────────────────────────────────── */
.tmfb-list__filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tmfb-filter {
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--tmfb-border); background: var(--tmfb-bg); color: var(--tmfb-muted);
  border-radius: 999px; padding: 5px 11px;
  transition: background .12s, border-color .12s, color .12s;
}
.tmfb-filter:hover { color: var(--tmfb-text); background: var(--tmfb-surface); }
.tmfb-filter--active {
  background: var(--tmfb-accent-soft); border-color: var(--tmfb-accent-line); color: var(--tmfb-accent-2);
}
.tmfb-list__refresh { margin-left: auto; }

.tmfb-list__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tmfb-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 11px; border: 1px solid var(--tmfb-border); border-radius: 12px;
  background: var(--tmfb-bg); cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.tmfb-row:hover { background: var(--tmfb-surface); border-color: var(--tmfb-border-hover); }
.tmfb-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--tmfb-accent); }
.tmfb-row__main { min-width: 0; }
.tmfb-row__title {
  display: block; font-weight: 700; font-size: 13.5px; color: var(--tmfb-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tmfb-row__meta {
  display: block; margin-top: 2px; font-size: 11.5px; color: var(--tmfb-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tmfb-row__badges { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* Every inline icon in the panel, at one size and one weight. */
.tmfb-ic { display: inline-grid; place-items: center; flex: none; }
.tmfb-ic svg { width: 14px; height: 14px; display: block; }

.tmfb-row__del {
  border: none; background: transparent; cursor: pointer; color: var(--tmfb-muted);
  display: grid; place-items: center;
  line-height: 1; padding: 4px 5px; border-radius: 7px; opacity: .5;
  transition: opacity .12s, background .12s, color .12s;
}
.tmfb-row__del:hover { opacity: 1; background: var(--missing-bg); color: var(--missing); }

/* Flash-highlight for a deep-linked ticket ("↗ Go to source"): an amber tint
 * that fades to nothing over ~7s, so it is easy to spot without a click. */
@keyframes tmfb-fade-highlight {
  0% { background-color: rgba(var(--tmfb-highlight), .35); }
  100% { background-color: transparent; }
}
.tmfb-highlight { animation: tmfb-fade-highlight 7s ease-out forwards; }
/* Compound selectors on purpose: .tmfb-row and .tmfb-detail both set `border`
   as a shorthand, so a single-class rule here would lose to whichever of them
   comes later in the file. */
.tmfb-row.tmfb-highlight,
.tmfb-detail.tmfb-highlight { border-color: rgba(var(--tmfb-highlight), .9); }
@media (prefers-reduced-motion: reduce) {
  .tmfb-highlight { animation-duration: 1ms; }
}

/* ── Detail (FeedbackDetail) ─────────────────────────────────────────────────── */
.tmfb-detail { border: 1px solid transparent; border-radius: 12px; }
.tmfb-detail__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tmfb-detail__title {
  margin: 0; margin-right: auto; font-size: 15.5px; font-weight: 800; letter-spacing: -.2px;
  color: var(--tmfb-text); overflow-wrap: anywhere;
}
.tmfb-detail__delete {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--tmfb-border); background: var(--tmfb-bg); color: var(--tmfb-muted);
  border-radius: 8px; padding: 5px 9px;
  transition: border-color .12s, color .12s;
}
.tmfb-detail__delete:hover:not(:disabled) { border-color: var(--missing); color: var(--missing); }
.tmfb-detail__delete:disabled { opacity: .55; cursor: default; }
.tmfb-detail__body {
  margin: 12px 0 6px; font-size: 13.5px; line-height: 1.55; color: var(--tmfb-text);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.tmfb-detail__meta { font-size: 11.5px; color: var(--tmfb-muted); margin-bottom: 14px; overflow-wrap: anywhere; }

/* "Go to source" — only rendered on the Σχόλια page, where a ticket points at a
   different artifact than the one you are looking at. */
.tmfb-gotosource {
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--tmfb-border); background: var(--tmfb-surface); color: var(--tmfb-accent-2);
  border-radius: 9px; padding: 7px 12px; margin-bottom: 14px;
  transition: background .12s, border-color .12s;
}
.tmfb-gotosource:hover {
  background: var(--tmfb-accent-soft); border-color: var(--tmfb-accent-line);
}

/* Status control — both sides may change it (a client can reopen a ticket). */
.tmfb-statusbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tmfb-status-btn {
  font-family: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--tmfb-border); background: var(--tmfb-bg); color: var(--ink-soft);
  border-radius: 9px; padding: 6px 11px;
  transition: background .12s, border-color .12s;
}
.tmfb-status-btn:hover:not(:disabled) { background: var(--tmfb-surface); }
.tmfb-status-btn:disabled { cursor: default; opacity: .55; }
.tmfb-status-btn--active {
  border-color: var(--tmfb-accent-line); background: var(--tmfb-accent-soft); color: var(--tmfb-accent-2);
  font-weight: 700; opacity: 1;
}

/* The .tmfb-assist rules for the AI "suggest fix" button were removed with the
   button itself — the Feedback service dropped that feature entirely. */

/* Thread — chat bubbles, matching .chat-msg: the viewer's own on the right. */
.tmfb-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tmfb-reply { max-width: 86%; padding: 8px 12px; border-radius: 14px; }
.tmfb-reply--mine { align-self: flex-end; background: var(--tmfb-accent); color: #fff; border-bottom-right-radius: 4px; }
.tmfb-reply--theirs { align-self: flex-start; background: var(--tmfb-surface); color: var(--tmfb-text); border-bottom-left-radius: 4px; }
.tmfb-reply__meta { font-size: 10.5px; margin-bottom: 2px; overflow-wrap: anywhere; }
.tmfb-reply--mine .tmfb-reply__meta { color: rgba(255, 255, 255, .82); }
.tmfb-reply--theirs .tmfb-reply__meta { color: var(--tmfb-muted); }
.tmfb-reply__body { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── Composer + reply box (shares .chat-input's geometry) ─────────────────────── */
.tmfb-compose { display: flex; flex-direction: column; gap: 9px; }
.tmfb-pop__priority { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.tmfb-pop__prioritylabel { font-size: 11.5px; color: var(--tmfb-muted); margin-right: 2px; }
.tmfb-priopick {
  font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--tmfb-border); background: var(--tmfb-bg); color: var(--tmfb-muted);
  border-radius: 999px; padding: 4px 10px;
  transition: background .12s, color .12s;
}
.tmfb-priopick:hover:not(:disabled) { color: var(--tmfb-text); background: var(--tmfb-surface); }
.tmfb-priopick:disabled { opacity: .55; cursor: default; }
.tmfb-priopick--active { border-color: transparent; }
.tmfb-priopick--low.tmfb-priopick--active { background: var(--tmfb-surface); color: var(--ink-soft); }
.tmfb-priopick--medium.tmfb-priopick--active { background: var(--partial-bg); color: var(--partial); }
.tmfb-priopick--high.tmfb-priopick--active { background: var(--missing-bg); color: var(--missing); }

.tmfb-pop__compose,
.tmfb-replybox { display: flex; align-items: flex-end; gap: 8px; }
.tmfb-compose__input,
.tmfb-replybox__input {
  flex: 1; resize: none; border: 1px solid var(--tmfb-border); border-radius: 12px;
  padding: 10px 12px; font-family: inherit; font-size: 13.5px; line-height: 1.4;
  color: var(--tmfb-text); background: var(--tmfb-bg);
  max-height: 140px; outline: none; transition: border-color .12s;
}
.tmfb-compose__input:focus,
.tmfb-replybox__input:focus { border-color: var(--tmfb-accent); }
.tmfb-replybox__send {
  flex: none; border: none; border-radius: 11px; padding: 11px 16px;
  background: var(--tmfb-accent); color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .12s;
}
.tmfb-replybox__send:hover:not(:disabled) { background: var(--tmfb-accent-2); }
.tmfb-replybox__send:disabled { background: var(--tmfb-disabled); cursor: default; }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
/* Rethemed onto ICE's own status palette, which already has an exact counterpart
   for every colour the package hardcoded. */
.tmfb-badge,
.tmfb-priority {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.tmfb-badge--open { background: var(--partial-bg); color: var(--partial); }
.tmfb-badge--in_progress { background: var(--different-bg); color: var(--different); }
.tmfb-badge--fixed { background: var(--match-bg); color: var(--match); }
.tmfb-badge--not_fixed { background: var(--missing-bg); color: var(--missing); }
/* The two statuses Atlas added in its migration 0020. ICE's own status family
   (--match / --partial / --different / --missing) was full at four, and these
   two borrow Atlas's own choices instead of doubling up a hue that already
   means something else here: violet for "ready for testing" and a neutral slate
   for "closed". Same hues as the Atlas admin and the delivery report, so a
   ticket reads the same wherever somebody looks at it. */
.tmfb-badge--ready_for_testing { background: #ede9fe; color: #6d28d9; }
.tmfb-badge--closed { background: #e2e8f0; color: #475569; }
/* A status this build has no label for — see statusBadge(). Deliberately plain:
   it should look unfinished rather than borrow the authority of a real pill. */
.tmfb-badge--unknown { background: var(--tmfb-surface); color: var(--muted); }

/* Priority is the `severity` field, surfaced to users. */
.tmfb-priority--low { background: var(--tmfb-surface); color: var(--tmfb-muted); }
.tmfb-priority--medium { background: var(--partial-bg); color: var(--partial); }
.tmfb-priority--high { background: var(--missing-bg); color: var(--missing); }

/* ── Delete confirm (the package deliberately dropped window.confirm) ─────────
 * Absolute inside the drawer; the --fixed variant covers the viewport instead,
 * for the full-width page where there is no drawer to sit in. */
.tmfb-confirm {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.tmfb-confirm--fixed { position: fixed; z-index: 50; } /* == .modal in styles.css */
.tmfb-confirm__backdrop { position: absolute; inset: 0; background: rgba(20, 32, 27, .45); }
.tmfb-confirm__box {
  position: relative; width: 100%; max-width: 320px;
  background: var(--tmfb-bg); border: 1px solid var(--tmfb-border); border-radius: 14px;
  padding: 18px; box-shadow: 0 24px 60px rgba(16, 17, 20, .3);
}
.tmfb-confirm__title { font-size: 14.5px; font-weight: 800; margin-bottom: 6px; }
.tmfb-confirm__text { font-size: 12.5px; color: var(--tmfb-muted); line-height: 1.5; }
.tmfb-confirm__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.tmfb-confirm__cancel,
.tmfb-confirm__delete {
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--tmfb-border); border-radius: 9px; padding: 8px 14px;
}
.tmfb-confirm__cancel { background: var(--tmfb-bg); color: var(--tmfb-text); }
.tmfb-confirm__cancel:hover:not(:disabled) { background: var(--tmfb-surface); }
.tmfb-confirm__delete { background: var(--missing); border-color: var(--missing); color: #fff; }
/* brightness rather than a second red literal — ICE has no darker-red token. */
.tmfb-confirm__delete:hover:not(:disabled) { filter: brightness(.88); }
.tmfb-confirm__cancel:disabled,
.tmfb-confirm__delete:disabled { opacity: .55; cursor: default; }

/* ── Shared ──────────────────────────────────────────────────────────────────── */
.tmfb-empty { color: var(--tmfb-muted); font-size: 13px; padding: 18px 8px; text-align: center; }
/* The "⚠" prefix errorText() used to bake into the string lives here instead, so
   the message stays plain text (it goes through textContent in five places) and
   the mark is a real icon at the app's line weight. */
.tmfb-error {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--missing-bg); color: var(--missing);
  border-radius: 10px; padding: 9px 11px; font-size: 12.5px; font-weight: 500;
  margin: 8px 0; overflow-wrap: anywhere;
}
.tmfb-error::before {
  content: ""; flex: none; width: 15px; height: 15px; margin-top: 1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v4.5'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v4.5'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── The Σχόλια page (#feedbackPage) ──────────────────────────────────────────
 * Deliberately NOT the 420px drawer: this page exists to show every ticket in the
 * product side by side with the artifact it belongs to, which needs the width. The
 * table itself is ICE's — <table> in a .table-wrap with .hist-row / .hist-title /
 * .hist-user / .hist-date / .hist-empty — so it is styled by web/styles.css and
 * only what has no counterpart there is defined here. */
.fbp-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 14px;
}
.fbp-toolbar__label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin: 0 2px 0 6px;
}
.fbp-toolbar__label:first-child { margin-left: 0; }
.fbp-toolbar__sep { flex: 1 1 16px; }

.fbp .hist-row { outline: none; }
.fbp .hist-row:focus-visible { box-shadow: inset 0 0 0 2px var(--tmfb-accent); }
.fbp .hist-title span { display: block; }
.fbp-replies { font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.fbp-artifact { display: block; font-weight: 600; white-space: nowrap; }
.fbp-artifact__title {
  display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted);
  max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* The thread is prose — reading it across a 1400px monitor is worse than the
   drawer was, so the detail keeps a column width even though the list is wide. */
.fbp-detail { max-width: 780px; }
.fbp-back {
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 12px; margin-bottom: 16px;
  transition: background .12s, border-color .12s;
}
.fbp-back:hover { background: var(--soft); border-color: #b9bbc2; }
.fbp-detail__foot { margin-top: 14px; }

/* ── Stacking over full-screen overlays ───────────────────────────────────────
 * ICE's layers: .topbar 40, #fabDock 45, .chat-panel 46, our drawer 47, .modal 50,
 * the deck editor .ds 60, #diffResults.maximized 80, .auth-overlay 100.
 *
 * Feedback is wanted ON the deck and ON a maximized diff, and both of those are
 * full-screen overlays that would otherwise bury the dock and the drawer. So JS
 * toggles these modifiers only while such an overlay is up, lifting the two just
 * past 80 — and still below the auth overlay (100), which must always win. Leaving
 * them at 81/82 permanently would put feedback over every ordinary modal, which is
 * why it is a modifier and not the base rule.
 *
 * The #fabDock selector is required: styles.css sets that z-index on the id, so a
 * bare class (0,1,0) would lose to it (1,0,0). The rule adds nothing else. */
#fabDock.fabdock--over-overlay { z-index: 81; }
.feedback-panel--over-overlay { z-index: 82; }
/* While an app dialog is up (.modal 50, the cost-edit pop-up .cce-backdrop 90): above both,
 * below the auth overlay (100). Howden #87 — a comment must be possible mid-edit. */
#fabDock.fabdock--over-modal { z-index: 91; }
.feedback-panel--over-modal { z-index: 92; }
#fabDock.fabdock--over-modal #chatFab { display: none; }

/* The dock feedback-ui.js creates for itself on the standalone deck page
 * (web/deck.html has no app shell — see ensureDock). styles.css is loaded there too,
 * so ICE's own #fabDock rule normally supplies this geometry and wins on specificity
 * (1,0,0 over 0,1,0); these are the same values, kept only so the button can never
 * end up static and unreachable if that rule is renamed. z-index is left out on
 * purpose — the --over-overlay modifier above owns it, and the deck is always up on
 * that route. */
.fabdock--own {
  position: fixed; right: 22px; bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}

/* …but the lift is for feedback only. #chatFab shares the dock, and its own panel
 * (.chat-panel, z-46) is NOT lifted — it belongs to app.js and would stay behind
 * the deck, so a raised Βοηθός button would vanish on click and show nothing. Today
 * the whole dock sits under the deck, i.e. Βοηθός is already unavailable there; this
 * keeps it that way instead of promoting it into a dead control. One line to undo if
 * app.js ever lifts .chat-panel too (or hides #chatFab when the deck opens, which
 * would make this a no-op). On a maximized diff it is already a no-op — app.js
 * hides #chatFab itself there (app.js:1774). */
#fabDock.fabdock--over-overlay #chatFab { display: none; }

/* Matches ICE's own FAB/drawer breakpoint: the label collapses so both docked
 * FABs stay side by side on a phone, and the drawer goes full-screen. */
@media (max-width: 560px) {
  .feedback-fab { padding: 13px 16px; }
  .feedback-fab-label { display: none; }
  .feedback-panel { top: 0; right: 0; bottom: 0; left: 0; width: 100vw; border-radius: 0; }
  .fbp-toolbar__label { margin-left: 0; }
}
