/* Fix this (web/fix-this.js): the right-click item, the pick-mode highlight and hint, the inline
   composer and its one-line status. Grey, black and white; above everything else on the page. */

.fx-root { position: fixed; inset: 0; pointer-events: none; z-index: 2147483000; font: 14px/1.4 var(--font, -apple-system, system-ui, sans-serif); color: var(--ink, #1d1d1f); }
.fx-root > * { pointer-events: auto; }
.fx-root .fx-highlight, .fx-root .fx-pick-hint { pointer-events: none; }
html.fx-picking, html.fx-picking * { cursor: crosshair !important; }

/* The right-click item */
.fx-menu {
  position: fixed; min-width: 168px; padding: 4px; border-radius: 10px;
  background: var(--surface, #fff); border: 1px solid rgba(29, 29, 31, 0.12);
  box-shadow: 0 10px 30px rgba(29, 29, 31, 0.14), 0 1px 3px rgba(29, 29, 31, 0.08);
  animation: fx-in 120ms ease-out;
}
.fx-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%;
  height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: inherit;
  font: inherit; font-weight: 520; text-align: left; cursor: pointer;
}
.fx-menu-item:hover, .fx-menu-item:focus-visible { background: var(--ink, #1d1d1f); color: #fff; outline: none; }
.fx-menu-item kbd { font: 12px/1 var(--font, system-ui); color: var(--tertiary, rgba(92, 89, 87, 0.72)); }
.fx-menu-item:hover kbd, .fx-menu-item:focus-visible kbd { color: rgba(255, 255, 255, 0.7); }

/* The element being pointed at */
.fx-highlight {
  position: fixed; border-radius: 7px; border: 2px solid var(--ink, #1d1d1f);
  background: rgba(29, 29, 31, 0.045); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7);
  transition: left 80ms ease-out, top 80ms ease-out, width 80ms ease-out, height 80ms ease-out;
}
.fx-highlight.fx-tagged::after {
  content: attr(data-tag); position: absolute; left: -2px; bottom: calc(100% + 6px);
  max-width: min(320px, 80vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 8px; border-radius: 6px; background: var(--ink, #1d1d1f); color: #fff;
  font: 500 12px/1.35 var(--font, system-ui);
}
.fx-highlight.fx-tagged.fx-tag-below::after { bottom: auto; top: calc(100% + 6px); }

.fx-pick-hint {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px);
  padding: 7px 14px; border-radius: 999px; background: var(--ink, #1d1d1f); color: #fff;
  font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 6px 20px rgba(29, 29, 31, 0.22); animation: fx-hint-in 140ms ease-out;
}
html.nexus-mac .fx-pick-hint { top: calc(var(--mac-titlebar, 0px) + 10px); }
/* On a phone the top is where the highlighted element's name goes: the hint sits at the bottom. */
@media (max-width: 600px) { .fx-pick-hint { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); } }

/* The composer, beside the element */
.fx-composer {
  position: fixed; margin: 0; padding: 8px 8px 8px 12px; border-radius: 14px;
  background: var(--surface, #fff); border: 1px solid rgba(29, 29, 31, 0.12);
  box-shadow: 0 14px 40px rgba(29, 29, 31, 0.16), 0 1px 3px rgba(29, 29, 31, 0.08);
  animation: fx-in 140ms ease-out; transition: opacity 240ms ease, transform 240ms ease;
}
.fx-composer.fx-leaving { opacity: 0; transform: translateY(-4px); }
.fx-composer-what { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-bottom: 4px; }
.fx-composer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--secondary, #5c5957); }
.fx-close {
  display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--secondary, #5c5957); cursor: pointer;
}
.fx-close:hover, .fx-close:focus-visible { background: var(--fill, rgba(29, 29, 31, 0.055)); color: var(--ink, #1d1d1f); outline: none; }
.fx-composer-row { display: flex; align-items: center; gap: 8px; }
.fx-input {
  flex: 1; min-width: 0; height: 34px; padding: 0; border: 0; outline: none; background: none;
  color: var(--ink, #1d1d1f); font: 15px/1.4 var(--font, system-ui);
}
/* The app's focus ring would box the field in; the composer's own edge shows focus instead. */
.fx-root .fx-input:focus, .fx-root .fx-input:focus-visible { outline: none !important; box-shadow: none !important; }
.fx-composer:focus-within { border-color: rgba(29, 29, 31, 0.3); }
.fx-input::placeholder { color: var(--tertiary, rgba(92, 89, 87, 0.72)); }
.fx-send {
  flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--ink, #1d1d1f); color: #fff; font: 600 14px/1 var(--font, system-ui); cursor: pointer;
  transition: opacity 120ms ease;
}
.fx-send:disabled { opacity: 0.28; cursor: default; }
.fx-send:not(:disabled):hover { opacity: 0.86; }
.fx-composer[data-state="sending"] .fx-send { opacity: 0.5; }
.fx-composer-status:empty { display: none; }
.fx-composer-status { margin-top: 6px; font-size: 12.5px; color: var(--destructive, #c70013); }

/* After Send: one line, then gone */
.fx-composer[data-state="sent"] { padding: 9px 14px; width: auto !important; }
.fx-sent { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 520; white-space: nowrap; }
.fx-sent-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink, #1d1d1f); animation: fx-pulse 1.4s ease-in-out infinite; }
.fx-sep { color: var(--tertiary, rgba(92, 89, 87, 0.72)); }
.fx-open { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(29, 29, 31, 0.35); cursor: pointer; }
.fx-open:hover { text-decoration-color: currentColor; }

/* The Work list: a session "Fix this" started */
.work-fix-label {
  display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; vertical-align: 1px;
  border: 1px solid rgba(29, 29, 31, 0.18); color: var(--secondary, #5c5957);
  font-size: 10.5px; font-weight: 600; line-height: 15px; letter-spacing: 0.02em;
}

@keyframes fx-in { from { opacity: 0; transform: translateY(2px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fx-hint-in { from { opacity: 0; transform: translate(-50%, -3px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .fx-menu, .fx-composer, .fx-pick-hint { animation: none; }
  .fx-highlight, .fx-composer { transition: none; }
  .fx-sent-dot { animation: none; }
}
