/* feedback.css - positions + paints the "Leave feedback" dock affordance for
   the Corin / Beacon Insurance demo. The pill sits bottom-RIGHT, lifted clear
   above the Ask-AI pill so the two never overlap. Tokens are Corin's own
   semantic set (--surface / --accent / --text / --border-teal), so the same
   paint reads in light + dark, both WCAG-AA, and tracks whichever accent the
   theme resolves (navy or teal). White ink rides the accent fills.

   Dock geography this clears (read live from the site CSS):
     · Ask-AI pill  (.vc-ask)        bottom-RIGHT  right:20 bottom:22  (~44px tall)
     · Theme toggle (.ti-theme-toggle) bottom-LEFT  left:18 bottom:18
     · Ownership tag (#ti-own)        bottom-LEFT  left:16 bottom:18
     · Gate role chip (#ti-role)      bottom-CENTER (desktop) / full-width bar
                                       bottom:74 (mobile <=640, body pads 230px)
   So the feedback pill stacks ABOVE the Ask-AI pill on the right, and lifts
   higher on phones to stay clear of the full-width gate bar. */

/* ---- position (bottom-right, above the Ask-AI pill) ---- */
.ti-feedback-launch {
  position: fixed;
  right: 20px;
  bottom: 78px;            /* above the Ask-AI pill (bottom:22, ~44px tall) + a gap */
  z-index: 45;             /* above the Ask-AI pill (z-index:40), below the gate chrome */
}
.ti-fb-panel {
  position: fixed;
  right: 20px;
  bottom: 126px;           /* anchored above the launch pill */
  z-index: 46;
}

/* phone: the gate role chip becomes a full-width bar at bottom:74 and the body
   pads 230px, so lift the feedback pill well clear of both the bar and the
   Ask-AI pill, and drop to a compact glyph-only puck. */
@media (max-width: 640px) {
  .ti-feedback-launch { right: 14px; bottom: 240px; padding: 8px; }
  .ti-fb-panel { right: 14px; bottom: 288px; }
  .ti-feedback-launch-label { display: none; }
}

/* ---- 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(--text, #191c1b);
  border: 1px solid var(--border-teal, rgba(43, 58, 140, 0.20));
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(25, 28, 27, 0.04));
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ti-feedback-launch:hover { background: var(--accent-pale, rgba(43, 58, 140, 0.06)); border-color: var(--accent, #2b3a8c); }
.ti-feedback-launch:focus-visible { outline: 2px solid var(--gold, #a8702c); 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(--accent, #2b3a8c);
  color: #fff;                /* white ink on the accent dot (navy/teal CTA rule) */
  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 - 162px);
  display: none;
  flex-direction: column;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e7dfd1);
  border-radius: 16px;
  box-shadow: var(--shadow, 0 6px 22px rgba(25, 28, 27, 0.07));
  overflow-y: auto;
  font-family: var(--sans, system-ui, sans-serif);
}
.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-family: var(--serif, Georgia, serif); font-size: 16px; color: var(--text, #191c1b); letter-spacing: -0.01em; }
.ti-fb-close {
  background: none; border: none; color: var(--text-dim, #585d5b);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.ti-fb-close:hover { color: var(--text, #191c1b); }
.ti-fb-close:focus-visible { outline: 2px solid var(--gold, #a8702c); outline-offset: 2px; }

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

.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(--text, #191c1b); }

.ti-fb-note {
  width: 100%; box-sizing: border-box; min-width: 0;
  background: var(--surface-2, #f3eee5);
  border: 1px solid var(--border, #e7dfd1);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--text, #191c1b);
  font-size: 13.5px; line-height: 1.5;
  font-family: var(--sans, system-ui, sans-serif);
  resize: vertical;
}
.ti-fb-note::placeholder { color: var(--text-dimmer, #767a72); }
.ti-fb-note:focus-visible { outline: 2px solid var(--gold, #a8702c); 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(--accent-pale, rgba(43, 58, 140, 0.06));
  border: 1px solid var(--border-teal, rgba(43, 58, 140, 0.20));
  border-radius: 8px;
  padding: 7px 10px;
}
.ti-fb-page-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-deep, #1d2a66);
  flex: 0 0 auto;
}
.ti-fb-page-val {
  font-size: 12.5px; color: var(--text, #191c1b);
  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, #f3eee5);
  border: 1px solid var(--border, #e7dfd1);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--text-dim, #585d5b);
  cursor: pointer;
  font-family: var(--sans, system-ui, sans-serif);
}
.ti-fb-rating:hover { border-color: var(--border-teal, rgba(43, 58, 140, 0.20)); color: var(--text, #191c1b); }
.ti-fb-rating:focus-visible { outline: 2px solid var(--gold, #a8702c); outline-offset: 2px; }
.ti-fb-rating.is-on {
  background: var(--accent-soft, rgba(43, 58, 140, 0.14));
  border-color: var(--border-teal, rgba(43, 58, 140, 0.20));
  color: var(--accent-deep, #1d2a66);
  font-weight: 600;
}

.ti-fb-status {
  min-height: 18px;
  font-size: 12.5px; line-height: 1.4;
  color: var(--text-dim, #585d5b);
}
.ti-fb-status.is-ok { color: var(--ok, #2f7d5b); font-weight: 600; }
.ti-fb-status.is-error { color: var(--warn, #a8443e); font-weight: 600; }

.ti-fb-actions { display: flex; justify-content: flex-end; }
.ti-fb-send {
  background: var(--accent, #2b3a8c);
  color: #fff;                /* white ink on the accent CTA (navy/teal rule) */
  border: 1px solid var(--accent, #2b3a8c);
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  font-family: var(--sans, system-ui, sans-serif);
}
.ti-fb-send:hover { background: var(--accent-deep, #1d2a66); border-color: var(--accent-deep, #1d2a66); }
.ti-fb-send:focus-visible { outline: 2px solid var(--gold, #a8702c); 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; }
}
