/* feedback.css - positions + paints the "Leave feedback" dock affordance for
   Harbor Haulers. The pill sits bottom-right. Harbor has no other fixed bottom
   dock (no assistant pill, no theme toggle, no tour launcher), so the pill rests in
   a free corner and never overlaps the topbar or footer at 1280 or 375. Tokens
   map to Harbor's light Datum set (--surface / --surface-2 / --ink / --muted /
   --line) with the brand yellow-on-black accent, all WCAG-AA. Each var() carries
   a safe literal fallback so the pill still reads if a token is missing. */

/* ---- position (bottom-right; the corner is free on Harbor) ---- */
.ti-feedback-launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
}
.ti-fb-panel {
  position: fixed;
  right: 20px;
  bottom: 68px;            /* anchored above the launch pill (~40px tall + gap) */
  z-index: 61;
}
@media (max-width: 820px) {
  .ti-feedback-launch { right: 14px; bottom: 14px; }
  .ti-fb-panel { right: 14px; bottom: 62px; max-height: calc(100vh - 90px); }
}

/* ---- the pill ---- */
.ti-feedback-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface, #ffffff);
  color: var(--ink, #070604);
  border: 1px solid var(--yellow, #f2c324);
  box-shadow: 0 8px 24px rgba(7, 6, 4, 0.16);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ti-feedback-launch:hover { background: var(--yellow-soft, #fff6d2); }
.ti-feedback-launch:focus-visible { outline: 2px solid var(--ink, #070604); 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(--black, #070604);
  color: var(--yellow, #f2c324);
  font-weight: 800;
  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 - 96px);
  display: none;
  flex-direction: column;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #deded8);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(7, 6, 4, 0.18);
  overflow-y: auto;
  font-family: inherit;
}
.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, #070604); letter-spacing: -0.01em; }
.ti-fb-close {
  background: none; border: none; color: var(--muted, #66645d);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.ti-fb-close:hover { color: var(--ink, #070604); }
.ti-fb-close:focus-visible { outline: 2px solid var(--ink, #070604); outline-offset: 2px; }

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

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

.ti-fb-note {
  width: 100%; box-sizing: border-box; min-width: 0;
  background: var(--surface-2, #f1f1ee);
  border: 1px solid var(--line, #deded8);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink, #070604);
  font-size: 13.5px; line-height: 1.5;
  font-family: inherit;
  resize: vertical;
}
.ti-fb-note::placeholder { color: var(--muted, #66645d); }
.ti-fb-note:focus-visible { outline: 2px solid var(--ink, #070604); outline-offset: 1px; }

/* the read-only page line: a quiet yellow-tint tag plus the page label */
.ti-fb-page-row {
  display: flex; align-items: baseline; gap: 8px;
  background: var(--yellow-soft, #fff6d2);
  border: 1px solid var(--yellow, #f2c324);
  border-radius: 8px;
  padding: 7px 10px;
}
.ti-fb-page-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a5c00;
  flex: 0 0 auto;
}
.ti-fb-page-val {
  font-size: 12.5px; color: var(--ink, #070604);
  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(--surface-2, #f1f1ee);
  border: 1px solid var(--line, #deded8);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--muted, #66645d);
  cursor: pointer;
  font-family: inherit;
}
.ti-fb-rating:hover { border-color: var(--yellow, #f2c324); color: var(--ink, #070604); }
.ti-fb-rating:focus-visible { outline: 2px solid var(--ink, #070604); outline-offset: 2px; }
.ti-fb-rating.is-on {
  background: var(--yellow-soft, #fff6d2);
  border-color: var(--yellow, #f2c324);
  color: var(--ink, #070604);
  font-weight: 700;
}

.ti-fb-status {
  min-height: 18px;
  font-size: 12.5px; line-height: 1.4;
  color: var(--muted, #66645d);
}
.ti-fb-status.is-ok { color: var(--green, #2f7d39); font-weight: 700; }
.ti-fb-status.is-error { color: var(--red, #b64235); font-weight: 700; }

.ti-fb-actions { display: flex; justify-content: flex-end; }
.ti-fb-send {
  background: var(--yellow, #f2c324);
  color: var(--black, #070604);
  border: 1px solid var(--yellow-2, #d89d00);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.ti-fb-send:hover { background: var(--yellow-2, #d89d00); }
.ti-fb-send:focus-visible { outline: 2px solid var(--ink, #070604); 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 clear of the
   footer and the page edge on a narrow screen. */
@media (max-width: 820px) {
  .ti-feedback-launch { padding: 8px; }
  .ti-feedback-launch-label { display: none; }
}
