/*! feedback.css 2.0.0 | DJ2000-UK/app-workbench */
/* Send feedback: the dialog from feedback.js. Every colour comes from the app's tokens
   (djcns.css), with the Athletic values as fallbacks for an app that has not adopted
   them yet. Small on purpose (DJ, 28 Nov 2026): a text box, one row of controls and
   Send. A bottom sheet on a phone that rides above the keyboard (--fb-keyboard, set by
   feedback.js from the visual viewport), centred on a wide screen; 44 px targets. */

.fb {
  --fb-panel: var(--panel, #171822);
  --fb-panel-bright: var(--panel-bright, #22232f);
  --fb-ink: var(--ink, #f7f8fb);
  --fb-muted: var(--muted, #9295a3);
  --fb-muted-bright: var(--muted-bright, #c7c9d2);
  --fb-line: var(--line, rgba(255, 255, 255, .105));
  --fb-line-strong: var(--line-strong, rgba(255, 255, 255, .21));
  --fb-accent: var(--accent, rgb(var(--accent-rgb, 112, 242, 178)));
  --fb-danger: var(--danger, #ff577c);
  --fb-positive: var(--positive, #4af08d);
  box-sizing: border-box;
  width: min(480px, calc(100vw - 16px));
  max-width: none;
  max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - var(--fb-keyboard, 0px));
  margin: auto auto calc(max(8px, env(safe-area-inset-bottom, 0px)) + var(--fb-keyboard, 0px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--fb-line-strong);
  border-radius: 22px;
  background: color-mix(in srgb, var(--fb-panel) 97%, black);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .5);
  color: var(--fb-ink);
  font: inherit;
  font-family: var(--font-sans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}
.fb[open] { display: flex; flex-direction: column; }
.fb::backdrop { background: rgba(4, 4, 12, .36); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
html:has(.fb[open]) { overflow: hidden; }
.fb *, .fb *::before, .fb *::after { box-sizing: border-box; }
.fb [hidden] { display: none !important; }

.fb__form { display: grid; min-height: 0; margin: 0; padding: 12px 12px 10px; gap: 8px; overflow-y: auto; overscroll-behavior: contain; }

.fb__head { position: relative; display: grid; min-height: 40px; padding: 0 44px 0 4px; align-content: center; gap: 1px; }
.fb__title { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; }
.fb__sub { margin: 0; overflow: hidden; color: var(--fb-muted); font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.fb__close { position: absolute; top: -2px; right: -4px; display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--fb-muted-bright); font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.fb__close:hover { background: color-mix(in srgb, var(--fb-ink) 7%, transparent); color: var(--fb-ink); }

.fb__textarea { display: block; width: 100%; min-height: 84px; padding: 10px 12px; resize: none; border: 1px solid var(--fb-line-strong); border-radius: 14px; background: color-mix(in srgb, var(--fb-panel) 80%, black); color: var(--fb-ink); font: inherit; font-size: 16px; line-height: 1.4; }
.fb__textarea::placeholder { color: var(--fb-muted); }
.fb__textarea:focus-visible { outline: 2px solid var(--fb-accent); outline-offset: 1px; }
.fb__count { margin: -4px 4px 0; color: var(--fb-muted); font-size: 12px; text-align: right; }
.fb__count:empty { display: none; }

/* The bigger picture, shown when the thumbnail is tapped. */
.fb__preview { display: grid; margin: 0; gap: 2px; }
.fb__preview img { display: block; max-width: 100%; max-height: 38dvh; justify-self: start; border: 1px solid var(--fb-line); border-radius: 12px; object-fit: contain; background: black; }
.fb__preview figcaption { display: flex; gap: 8px; align-items: center; color: var(--fb-muted); font-size: 12px; }

/* One row: the picture that goes, add your own, what's sent, Send. */
.fb__row { display: flex; min-width: 0; gap: 4px; align-items: center; }
.fb__thumb { position: relative; display: grid; flex: none; width: 44px; height: 44px; padding: 0; overflow: hidden; place-items: center; border: 1px solid var(--fb-line-strong); border-radius: 11px; background: color-mix(in srgb, var(--fb-panel) 70%, black); cursor: pointer; }
.fb__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.fb__thumb:disabled { cursor: default; }
.fb__thumb--busy img { display: none; }
.fb__thumb--busy::after { content: ""; width: 16px; height: 16px; border: 2px solid var(--fb-line-strong); border-top-color: var(--fb-accent); border-radius: 50%; }
.fb__thumb[aria-expanded="true"] { border-color: var(--fb-accent); }
.fb__file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.fb__icon { display: grid; flex: none; width: 44px; height: 44px; place-items: center; border-radius: 12px; color: var(--fb-muted-bright); cursor: pointer; }
.fb__icon:hover { background: color-mix(in srgb, var(--fb-ink) 7%, transparent); color: var(--fb-ink); }
.fb__file:focus-visible + .fb__icon { outline: 2px solid var(--fb-accent); outline-offset: 2px; }
.fb__hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }

.fb__link { min-width: 44px; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--fb-muted-bright); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fb__about { margin-right: auto; color: var(--fb-muted); font-weight: 500; }
.fb__button { display: inline-grid; flex: none; min-width: 88px; min-height: 44px; padding: 0 18px; place-items: center; border: 1px solid var(--fb-line-strong); border-radius: 13px; background: color-mix(in srgb, var(--fb-ink) 5%, transparent); color: var(--fb-ink); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; }
.fb__button--primary { border-color: color-mix(in srgb, var(--fb-accent) 50%, transparent); background: color-mix(in srgb, var(--fb-accent) 22%, var(--fb-panel)); }
.fb__button:disabled { border-color: var(--fb-line); background: color-mix(in srgb, var(--fb-ink) 4%, transparent); color: var(--fb-muted); cursor: default; }
.fb__button:focus-visible, .fb__close:focus-visible, .fb__link:focus-visible, .fb__thumb:focus-visible, .fb__summary:focus-visible { outline: 2px solid var(--fb-accent); outline-offset: 2px; }

/* What's sent: closed until asked for. */
.fb__details { display: grid; padding: 4px 10px 8px; gap: 0; border: 1px solid var(--fb-line); border-radius: 14px; background: color-mix(in srgb, var(--fb-ink) 3%, transparent); }
.fb__check { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
/* The real checkbox covers the whole row, so the row is the touch target. */
.fb__check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fb__box { display: grid; width: 20px; height: 20px; place-items: center; border: 1.5px solid var(--fb-line-strong); border-radius: 6px; background: color-mix(in srgb, var(--fb-ink) 4%, transparent); }
.fb__box::after { content: ""; width: 9px; height: 5px; border: solid var(--fb-panel); border-width: 0 0 2.5px 2.5px; opacity: 0; transform: translateY(-1px) rotate(-45deg); }
.fb__check input:checked + .fb__box { border-color: var(--fb-accent); background: var(--fb-accent); }
.fb__check input:checked + .fb__box::after { opacity: 1; }
.fb__check input:focus-visible + .fb__box { outline: 2px solid var(--fb-accent); outline-offset: 2px; }
.fb__check strong { display: block; font-size: 13px; font-weight: 600; }
.fb__check small { display: block; color: var(--fb-muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.fb__privacy { margin: 4px 0 0; color: var(--fb-muted); font-size: 12px; line-height: 1.45; }

.fb__status { margin: 0 4px; font-size: 13px; line-height: 1.45; }
.fb__status:empty { display: none; }
.fb__status[data-tone="error"] { color: var(--fb-danger); }
.fb__status[data-tone="ok"] { color: var(--fb-positive); }

/* Your feedback: one closed line until opened. */
.fb__mine { border-top: 1px solid var(--fb-line); }
.fb__summary { display: flex; min-height: 44px; padding: 0 4px; gap: 8px; align-items: center; color: var(--fb-muted-bright); font-size: 13px; font-weight: 600; list-style: none; cursor: pointer; }
.fb__summary::-webkit-details-marker { display: none; }
.fb__summary::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border: solid var(--fb-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.fb__mine[open] > .fb__summary::after { margin-top: 3px; transform: rotate(-135deg); }
.fb__list { display: grid; margin: 0 0 4px; padding: 0; gap: 8px; list-style: none; }
.fb__item { display: grid; padding: 10px 12px 0; gap: 4px; border: 1px solid var(--fb-line); border-radius: 14px; background: color-mix(in srgb, var(--fb-ink) 3%, transparent); }
.fb__item .fb__link { justify-self: start; margin-left: -6px; font-size: 12px; }
.fb__meta { display: flex; flex-wrap: wrap; margin: 0; gap: 8px; align-items: center; color: var(--fb-muted); font-size: 12px; }
.fb__pill { padding: 2px 8px; border: 1px solid var(--fb-line-strong); border-radius: 999px; color: var(--fb-muted-bright); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.fb__pill[data-status="planned"], .fb__pill[data-status="done"] { border-color: color-mix(in srgb, var(--fb-accent) 55%, transparent); color: var(--fb-ink); }
.fb__text { display: -webkit-box; margin: 0; overflow: hidden; font-size: 14px; line-height: 1.45; white-space: pre-wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow-wrap: anywhere; }
.fb__reply { margin: 0; padding: 8px 10px; border-left: 3px solid var(--fb-accent); border-radius: 8px; background: color-mix(in srgb, var(--fb-accent) 8%, transparent); color: var(--fb-muted-bright); font-size: 13px; line-height: 1.45; }
.fb__reply strong { margin-right: 6px; color: var(--fb-ink); }

@media (min-width: 700px) {
  .fb { width: 420px; margin: auto; translate: 0 calc(var(--fb-keyboard, 0px) / -2); }
  .fb__form { padding: 14px 14px 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .fb[open] { animation: fb-in .16s ease-out; }
  .fb__thumb--busy::after { animation: fb-spin .8s linear infinite; }
  @keyframes fb-in { from { transform: translateY(12px); } }
  @keyframes fb-spin { to { transform: rotate(1turn); } }
}
