/* feedback.css - positions + paints the "Leave feedback" dock affordance for
   the Apex Motors demo. Apex is a single-page app with no bottom dock
   (no Ask-AI pill, no theme toggle, no tour launcher), so the pill sits in the
   clear bottom-right corner and never overlaps anything at 1280 or 375. Colors
   map to Apex's own dark tokens (--ink/--muted/--panel/--panel-2/--line),
   so the widget reads on-brand; the red marks the affordance and the gold
   focus ring matches Apex's eyebrow accent. Safe hex fallbacks keep it
   painted even if a token is ever absent. The site is dark-only, so there is no
   light-mode block. */

/* ---- position (Apex owns this; bottom-right, no dock to clear) ---- */
.ti-feedback-launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
}
.ti-fb-panel {
  position: fixed;
  right: 20px;
  bottom: 68px;            /* anchored just above the launch pill */
  z-index: 61;
}
@media (max-width: 620px) {
  .ti-feedback-launch { bottom: 16px; right: 14px; }
  .ti-fb-panel { bottom: 62px; right: 14px; }
}

/* ---- the pill ---- */
.ti-feedback-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--panel, rgba(16, 16, 16, .9));
  color: var(--ink, #f7f3ea);
  border: 1px solid var(--fb-border-accent, rgba(168, 15, 26, .42));
  box-shadow: 0 6px 22px rgba(0, 0, 0, .42);
  font-family: Avenir Next, Helvetica Neue, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 0;           /* override the site's 42px button floor */
  -webkit-tap-highlight-color: transparent;
}
.ti-feedback-launch:hover { background: var(--fb-accent-pale, rgba(168, 15, 26, .14)); }
.ti-feedback-launch:focus-visible { outline: 2px solid var(--gold, #b99b5f); outline-offset: 2px; }
.ti-feedback-launch-glyph {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--red, #a80f1a);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}
.ti-feedback-launch-label { white-space: nowrap; }

/* ---- the panel ---- */
.ti-fb-panel {
  width: min(340px, 92vw);
  max-height: calc(100vh - 100px);
  display: none;
  flex-direction: column;
  background: var(--panel-2, rgba(34, 33, 31, .96));
  border: 1px solid var(--line, rgba(247, 243, 234, .14));
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
  overflow-y: auto;
  font-family: Avenir Next, Helvetica Neue, Arial, sans-serif;
  backdrop-filter: blur(18px);
}
.ti-fb-panel.is-open { display: flex; }

.ti-fb-head {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.ti-fb-title { margin: 0; font-size: 16px; color: var(--ink, #f7f3ea); letter-spacing: -0.01em; }
.ti-fb-close {
  background: none; border: none; color: var(--muted, #b8b0a5);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
  min-height: 0;
}
.ti-fb-close:hover { color: var(--ink, #f7f3ea); }
.ti-fb-close:focus-visible { outline: 2px solid var(--gold, #b99b5f); outline-offset: 2px; }

.ti-fb-intro {
  margin: 0; padding: 0 16px 10px;
  font-size: 12.5px; line-height: 1.5; color: var(--muted, #b8b0a5);
}

.ti-fb-form { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 14px; }
.ti-fb-label { font-size: 12px; font-weight: 600; color: var(--ink, #f7f3ea); }

.ti-fb-note {
  width: 100%; box-sizing: border-box; min-width: 0;
  background: var(--panel-3, rgba(7, 7, 7, .72));
  border: 1px solid var(--line, rgba(247, 243, 234, .14));
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--ink, #f7f3ea);
  font-size: 13.5px; line-height: 1.5;
  font-family: Avenir Next, Helvetica Neue, Arial, sans-serif;
  resize: vertical;
}
.ti-fb-note::placeholder { color: var(--quiet, #8d857a); }
.ti-fb-note:focus-visible { outline: 2px solid var(--gold, #b99b5f); outline-offset: 1px; }

/* the read-only page line: a quiet tag plus the page label, never editable */
.ti-fb-page-row {
  display: flex; align-items: baseline; gap: 8px;
  background: var(--fb-accent-pale, rgba(168, 15, 26, .14));
  border: 1px solid var(--fb-border-accent, rgba(168, 15, 26, .42));
  border-radius: 8px;
  padding: 7px 10px;
}
.ti-fb-page-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold, #b99b5f);
  flex: 0 0 auto;
}
.ti-fb-page-val {
  font-size: 12.5px; color: var(--ink, #f7f3ea);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ti-fb-ratings { display: flex; flex-wrap: wrap; gap: 6px; }
.ti-fb-rating {
  background: var(--panel-3, rgba(7, 7, 7, .72));
  border: 1px solid var(--line, rgba(247, 243, 234, .14));
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--muted, #b8b0a5);
  cursor: pointer;
  min-height: 0;
  font-family: Avenir Next, Helvetica Neue, Arial, sans-serif;
}
.ti-fb-rating:hover { border-color: var(--fb-border-accent, rgba(168, 15, 26, .42)); color: var(--ink, #f7f3ea); }
.ti-fb-rating:focus-visible { outline: 2px solid var(--gold, #b99b5f); outline-offset: 2px; }
.ti-fb-rating.is-on {
  background: var(--fb-accent-soft, rgba(168, 15, 26, .22));
  border-color: var(--fb-border-accent, rgba(168, 15, 26, .42));
  color: var(--ink, #f7f3ea);
  font-weight: 600;
}

.ti-fb-status {
  min-height: 18px;
  font-size: 12.5px; line-height: 1.4;
  color: var(--muted, #b8b0a5);
}
.ti-fb-status.is-ok { color: var(--fb-ok, #6fcf97); font-weight: 600; }
.ti-fb-status.is-error { color: var(--fb-warn, #e5786c); font-weight: 600; }

.ti-fb-actions { display: flex; justify-content: flex-end; }
.ti-fb-send {
  background: var(--red, #a80f1a);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  min-height: 0;
  font-family: Avenir Next, Helvetica Neue, Arial, sans-serif;
}
.ti-fb-send:hover { background: #c01521; }
.ti-fb-send:focus-visible { outline: 2px solid var(--gold, #b99b5f); outline-offset: 2px; }
.ti-fb-send:disabled { opacity: 0.6; cursor: default; }

/* motion: a gentle reveal that the reduced-motion guard drops */
@media (prefers-reduced-motion: no-preference) {
  .ti-fb-panel.is-open { animation: tiFbIn 0.18s ease; }
}
@keyframes tiFbIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ti-fb-panel, .ti-feedback-launch { transition: none; animation: none; }
}

/* phone: the pill drops to a compact glyph-only puck so it stays light on a
   narrow screen. */
@media (max-width: 620px) {
  .ti-feedback-launch { padding: 8px; }
  .ti-feedback-launch-label { display: none; }
}
