/* Feedback part. Colours come from the shell's variables, so light and dark follow by themselves. */

/* CHANGED : the shell sheet scrolls its own body and pins Send in its footer (no cap here) */
.fb-sheet .fb-head { margin-right: 44px; }
.fb-sheet .sheet-foot .fb-send { flex: 1; }
.fb-form { display: flex; flex-direction: column; gap: 8px; }
.fb-head { font-size: 19px; font-weight: 650; margin: 0; }
.fb-card .fb-head { margin-bottom: 2px; }
.fb-prompt { margin: 0 0 4px; font-size: 15px; }
.fb-label { font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.fb-text { min-height: 140px; font-size: 16px; line-height: 1.4; }
.fb-under { display: flex; align-items: center; gap: 10px; min-height: 8px; }
.fb-under .grow { flex: 1; }
.fb-count { text-align: right; }
.fb-offline {
  padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500;
  background: color-mix(in srgb, #b45309 16%, var(--surface)); color: var(--text);
  border: 1px solid color-mix(in srgb, #b45309 45%, transparent);
}

.fb-mic { min-height: var(--tap); gap: 8px; }
.fb-mic svg.ico, .fb-launch svg.ico, .fb-fab svg.ico, .fb-about svg.ico { width: 22px; height: 22px; }
.fb-mic.on { background: var(--danger); color: #fff; }
.fb-mic.on svg.ico { animation: fb-pulse 1.2s ease-in-out infinite; }
@keyframes fb-pulse { 50% { opacity: .35; } }

.fb-stars, .fb-thumbs { display: flex; gap: 4px; flex-wrap: wrap; }
.fb-star, .fb-thumb {
  width: var(--tap); height: var(--tap); border: 0; border-radius: 12px;
  display: grid; place-items: center;
  background: transparent; color: var(--muted);
}
.fb-star svg.ico, .fb-thumb svg.ico { width: 30px; height: 30px; }
.fb-star:active, .fb-thumb:active { background: var(--surface-2); }
.fb-star.on { color: #f59e0b; }
.fb-star.on svg.ico path { fill: currentColor; }
.fb-thumb.down svg.ico { transform: rotate(180deg); }
.fb-thumb.on { color: var(--accent); background: var(--accent-soft); }
.fb-thumb.on svg.ico path { fill: var(--accent-soft); }

.fb-actions { display: flex; gap: 10px; margin-top: 8px; }
.fb-actions .btn { flex: 1; }
.fb-actions .fb-send { flex: 2; }
.fb-privacy { margin: 6px 0 0; }

.appbar-btn.fb-launch { width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; justify-content: center; }   /* the same size as every top-bar button (28 Oct 2026) */

.fb-fab {
  position: fixed; left: max(16px, var(--sal)); bottom: calc(var(--tabbar) + var(--sab) + 16px);
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  display: grid; place-items: center; z-index: 5;
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.fb-fab.low { bottom: calc(var(--sab) + 16px); }
.fb-fab:active { transform: scale(.94); }
@media (min-width: 720px) { .fb-fab { left: calc(50% - 360px + 16px); } }

.fb-about .btn { gap: 8px; }

/* ADDED : screenshots with a comment, and the red pen over them */
.fb-pics { display: flex; flex-direction: column; gap: 8px; }
.fb-pic-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fb-pic { position: relative; width: 84px; height: 84px; flex: none; }
.fb-pic-open {
  display: block; width: 100%; height: 100%; padding: 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
}
.fb-pic-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fb-pic-x {
  position: absolute; top: -10px; right: -10px; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--surface); background: var(--text); color: var(--surface);
}
.fb-pic-x::before { content: ""; position: absolute; inset: -8px; }   /* a 48 px finger target */
.fb-pic-x svg.ico { width: 16px; height: 16px; }
.fb-addpic { min-height: var(--tap); gap: 8px; }
.fb-addpic svg.ico { width: 22px; height: 22px; }
.fb-pic-hint { margin: 0; }
.fb-pic-input { display: none; }

.fb-pen {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  background: #111318; color: #fff; touch-action: none; overscroll-behavior: contain;
  padding: var(--sat, env(safe-area-inset-top, 0px)) var(--sar, 0px) var(--sab, env(safe-area-inset-bottom, 0px)) var(--sal, 0px);
}
.fb-pen-top { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 8px; }
.fb-pen-title { flex: 1; text-align: center; font-size: 17px; font-weight: 650; }
.fb-pen-cancel, .fb-pen-spacer { min-width: 84px; }
.fb-pen-cancel {
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #fff;
  font: inherit; font-size: 16px; text-align: left;
}
.fb-pen-cancel:active { background: rgba(255, 255, 255, .12); }
.fb-pen-hint { text-align: center; font-size: 14px; color: rgba(255, 255, 255, .78); padding: 0 16px 6px; }
.fb-pen-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px 12px; }
.fb-pen-canvas {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto;
  touch-action: none; cursor: crosshair; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.fb-pen-status { min-height: 20px; text-align: center; font-size: 14px; color: #fcd34d; padding: 0 16px; }
.fb-pen-bar { display: flex; gap: 10px; padding: 8px 16px 12px; max-width: 560px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.fb-pen-btn { flex: 1; min-height: var(--tap, 48px); gap: 6px; }
.fb-pen-bar .btn.secondary { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .2); }
.fb-pen-bar .btn:disabled { opacity: .45; }
.fb-pen-done { flex: 1.4; background: #e11d48; border-color: #e11d48; color: #fff; }
.fb-pen-done svg.ico { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .fb-mic.on svg.ico { animation: none; }
  .fb-fab { transition: none; }
}

/*  owners_only: the button hides for everyone but an owner in the admin view */
.fb-fab[hidden], .fb-launch[hidden] { display: none !important; }

/*  (15 Nov 2026, "every page needs a message/feedback button"): the same button on a full-screen page's own bar (it has the look of
   the page's Refresh button beside it), and beside the X of a sheet that is a page of its own. */
.fb-launch.fb-in-bar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-width: 40px; padding: 0;
  border: 0; border-radius: 50%; background: var(--bar-btn, transparent); color: inherit; cursor: pointer; }
.fb-launch.fb-in-bar svg.ico { width: 20px; height: 20px; }
.fb-launch.fb-in-bar[hidden] { display: none; }
.sheet-fb {
  position: absolute; top: 2px; right: calc(max(4px, var(--sar, 0px)) + 48px); z-index: 2;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.sheet-fb:active { filter: brightness(.92); }
.sheet-fb svg.ico { width: 20px; height: 20px; }
.sheet-fb[hidden] { display: none; }
.sheet.has-fb .sheet-head { padding-right: 104px; }
.sheet.has-fb .sheet-body > h2:first-child, .sheet.has-fb .sheet-body > form:first-child > h2:first-child { margin-right: 92px; }
/* with the menu along the top (bar.top_nav on a wide window) the dossier's pages start under the top bar, whose own button is still there */
html.nav-top .dsr-page .fb-launch.fb-in-bar { display: none; }
