/* Feedback tab + sheet (from the feedback-tab skill). Colours map to Passport Party's tokens in app.css.
 * --fb-attention carries white text: #cc4e00 passes 4.5:1. */
:root {
  --fb-paper: var(--ink-2, #12152a);
  --fb-card: var(--ink-3, #1b1f3a);
  --fb-ink: var(--text, #f6f1e7);
  --fb-ink-2: var(--muted, #a7a3b9);
  --fb-line: rgba(255, 255, 255, 0.14);
  --fb-accent: var(--gold, #f28c28);
  --fb-accent-ink: #1d1206;
  --fb-accent-soft: rgba(242, 140, 40, 0.16);
  --fb-attention: #cc4e00;
  --fb-good: var(--good, #46d68c);
  --fb-error: #ff8a78;
  --fb-radius: 14px;
}
html[data-theme='light'] { --fb-paper: #f6f1e7; --fb-card: #ffffff; --fb-ink: #1d1b2c; --fb-ink-2: #5f5b72; --fb-line: #e2ddd0; --fb-accent: #b9800f; --fb-accent-ink: #fff; --fb-error: #b0302a; }

.fb-tab {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 20;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  padding: 12px 8px;
  border: 1px solid var(--fb-line);
  border-right: 0;
  border-radius: 0 var(--fb-radius) var(--fb-radius) 0;
  background: var(--fb-card);
  color: var(--fb-ink-2);
  font: 700 12px var(--ui, system-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.35);
  margin-right: env(safe-area-inset-right, 0);
}
.fb-tab:hover { color: var(--fb-accent); }

.fb-dialog {
  font-family: var(--ui, system-ui);
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  background: var(--fb-card);
  color: var(--fb-ink);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
.fb-dialog::backdrop { background: rgba(5, 6, 14, 0.7); backdrop-filter: blur(4px); }
@media (max-width: 520px) {
  .fb-dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
    max-height: 92dvh;
  }
}

.fb-form, .fb-sent { display: grid; gap: 14px; padding: 20px; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-form h2, .fb-sent h2 { font-size: 22px; }
.fb-sent p { margin: 0; color: var(--fb-ink-2); }
.fb-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--fb-line); background: transparent; color: var(--fb-ink-2);
  font-size: 22px; line-height: 1; cursor: pointer;
}

.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-chip {
  padding: 6px 12px; border-radius: 999px; font-size: 14px; cursor: pointer;
  border: 1px solid var(--fb-line); background: var(--fb-paper); color: var(--fb-ink);
}
.fb-chip[aria-checked="true"] { background: var(--fb-accent); border-color: var(--fb-accent); color: var(--fb-accent-ink); }

.fb-field { display: grid; gap: 6px; }
.fb-label { font-size: 13px; color: var(--fb-ink-2); font-weight: 600; }
.fb-field textarea, .fb-field input {
  font: inherit; color: var(--fb-ink); background: var(--fb-paper);
  border: 1px solid var(--fb-line); border-radius: 10px; padding: 10px 12px; width: 100%;
  resize: vertical;
}
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.fb-error { margin: 0; color: var(--fb-error); font-size: 14px; }
.fb-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fb-context { font-size: 12px; color: var(--fb-ink-2); }
.fb-btn {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--fb-line);
  background: var(--fb-paper); color: var(--fb-ink); font-weight: 600; cursor: pointer;
}
.fb-btn--primary { background: var(--fb-accent); border-color: var(--fb-accent); color: var(--fb-accent-ink); }
.fb-btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- replies ---------- */

/* The bright orange tab that appears above Feedback when there's a reply. */
.fb-tab--replied {
  transform: translateY(calc(-50% - 118px)) rotate(180deg);
  background: var(--fb-attention);
  border-color: var(--fb-attention);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--fb-attention) 70%, transparent);
}
.fb-tab--replied:hover { color: #fff; background: color-mix(in srgb, var(--fb-attention) 85%, black); }
@media (prefers-reduced-motion: no-preference) {
  .fb-tab--replied { animation: replied-in 0.5s ease-out both, replied-nudge 2.4s ease-in-out 0.6s 3; }
}
@keyframes replied-in { from { opacity: 0; transform: translate(12px, calc(-50% - 118px)) rotate(180deg); } }
@keyframes replied-nudge {
  0%, 100% { transform: translateY(calc(-50% - 118px)) rotate(180deg); }
  50% { transform: translate(-4px, calc(-50% - 118px)) rotate(180deg); }
}

.fb-sheet { display: grid; gap: 14px; padding: 20px; max-height: 88dvh; overflow-y: auto; }
.fb-sheet .fb-form, .fb-sheet .fb-sent { padding: 0; }
.fb-views { display: inline-flex; gap: 4px; background: var(--fb-paper); border: 1px solid var(--fb-line); border-radius: 999px; padding: 3px; }
.fb-view { border: 0; background: transparent; color: var(--fb-ink-2); font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.fb-view[aria-selected="true"] { background: var(--fb-accent); color: var(--fb-accent-ink); }
.fb-dot { min-width: 18px; height: 18px; border-radius: 999px; background: var(--fb-attention); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; }

.fb-empty { margin: 0; color: var(--fb-ink-2); }
.fb-threads { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fb-thread { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--fb-line); background: var(--fb-paper); }
.fb-thread--new { border-color: var(--fb-attention); box-shadow: 0 0 0 1px var(--fb-attention); }
.fb-thread__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fb-done { font-size: 12px; font-weight: 700; color: var(--fb-good); }
.fb-bubble { margin: 0; padding: 8px 12px; border-radius: 14px; max-width: 88%; white-space: pre-wrap; font-size: 15px; }
.fb-bubble--me { justify-self: end; background: var(--fb-accent); color: var(--fb-accent-ink); border-bottom-right-radius: 4px; }
.fb-bubble--them { justify-self: start; background: var(--fb-card); border: 1px solid var(--fb-line); border-bottom-left-radius: 4px; }
.fb-from { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fb-ink-2); margin-bottom: 2px; }
.fb-system { margin: 0; text-align: center; font-size: 12px; color: var(--fb-ink-2); }
.fb-reply { display: flex; gap: 8px; }
.fb-reply__input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 15px; color: var(--fb-ink); background: var(--fb-card); border: 1px solid var(--fb-line); border-radius: 999px; padding: 8px 14px; }

.fb-form h2, .fb-sent h2, .fb-head h2 { font-family: var(--display, Georgia, serif); margin: 0; }
.fb-tab[hidden] { display: none; }
.fb-hp { pointer-events: none; }
