/* Pre-launch feedback chat (server/feedback.py, templates/_feedback.html, js/feedback.js): build stage only,
   removable as one unit. Colours and faces come from the page's version through site.css's custom properties. */
.fb-fab {
  position: fixed; z-index: 65; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); box-shadow: 4px 4px 0 var(--accent-deep), 0 6px 18px rgb(0 0 0 / .45);
  transition: transform .2s var(--ease-out), background .2s, box-shadow .2s;
}
.fb-fab svg { width: 26px; height: 26px; }
@media (hover: hover) { .fb-fab:hover { background: var(--accent-hi); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent-deep), 0 8px 22px rgb(0 0 0 / .5); } }
.fb-fab:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--accent-deep); }
.fb-fab[aria-expanded="true"] { background: var(--accent-hi); }

.fb-panel {
  position: fixed; z-index: 66; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 72px);
  width: min(380px, calc(100vw - 32px)); max-height: calc(100svh - 120px); overflow: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  background: var(--ink-2); color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--hard);
  font: 400 14px/1.5 var(--f-mono);
}
.fb-panel[hidden] { display: none; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-head h2 { margin: 0; font: 900 15px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-hi); }
.fb-x { width: 32px; height: 32px; display: grid; place-items: center; font-size: 24px; line-height: 1; color: var(--text-dim); }
@media (hover: hover) { .fb-x:hover { color: var(--accent-hi); } }

.fb-mine { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-height: 132px; overflow: auto; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.fb-mine li { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-dim); }
.fb-mine[hidden] { display: none; }
.fb-mine li span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-mine b { flex: none; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.fb-mine b[data-s="approved"], .fb-mine b[data-s="built"] { color: var(--accent-hi); }
.fb-mine b[data-s="rejected"] { color: var(--text-dim); }

.fb-form { display: grid; gap: 12px; }
.fb-who { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.fb-who b { color: var(--accent); }
.fb-field { display: grid; gap: 6px; }
.fb-field[hidden] { display: none; }
.fb-field span { font: 600 11px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }
.fb-field input, .fb-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--ink);
  color: var(--text); font: 400 16px/1.45 var(--f-mono); caret-color: var(--accent); resize: vertical;   /* 16px: iOS does not zoom */
}
.fb-field textarea { min-height: 96px; }
.fb-field input:focus, .fb-field textarea:focus { outline: none; border-color: var(--accent); }

.fb-rec { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 40px; }
.fb-mic { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line-strong); font: 600 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.fb-mic svg { width: 18px; height: 18px; color: var(--accent); }
@media (hover: hover) { .fb-mic:hover { border-color: var(--accent); } }
.fb-mic[aria-pressed="true"] { background: var(--error); border-color: var(--error); color: var(--ink); }
.fb-mic[aria-pressed="true"] svg { color: var(--ink); animation: fb-pulse 1s ease-in-out infinite; }
@keyframes fb-pulse { 50% { opacity: .35; } }
.fb-timer { font: 600 13px/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--accent-hi); }
.fb-discard { font: 600 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); text-decoration: underline; text-underline-offset: 4px; }

.fb-send { padding: 14px; background: var(--accent); color: var(--ink); font: 900 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; transition: background .2s; }
@media (hover: hover) { .fb-send:not(:disabled):hover { background: var(--accent-hi); } }
.fb-send:disabled { opacity: .4; cursor: not-allowed; }
.fb-msg { margin: 0; min-height: 1.5em; font-size: 12px; color: var(--accent-hi); }
.fb-msg.is-error { color: var(--error); }

@media (max-width: 600px) {
  .fb-fab { width: 52px; height: 52px; }
  .fb-panel { right: 12px; left: 12px; width: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 66px); }
}
