/* feedback.css - positions and paints the "Leave feedback" dock affordance for
   the MRP subsea-procurement demo. The pill sits bottom-right with the help dock,
   stacked above the Learn pill so both actions live on the same side. Tokens are
   the MRP subsea page set (ink / ink-2 /
   muted / paper / cream / mint / teal / gold / pink / line / line-2), so the
   paint reads on-brand and legible on this light-themed site. The teal accent
   marks the affordance, the send button carries white ink on the teal/magenta
   gradient like the page's primary button, and gold stays reserved for amounts.
   Every value keeps a safe raw fallback so the widget never renders unstyled if a
   token is ever renamed. */

/* ---- position: bottom-right, stacked above #help-dock ---- */
.ti-feedback-launch {
  position: fixed;
  right: 18px;
  bottom: 74px;
  z-index: 65;             /* under the tour overlay (80) + tour card (81), over content */
}
.ti-fb-panel {
  position: fixed;
  right: 18px;
  bottom: 122px;
  z-index: 66;
}
@media (max-width: 560px) {
  .ti-feedback-launch { right: 12px; bottom: 60px; }
  .ti-fb-panel { right: 12px; bottom: 106px; }
}

/* ---- the pill ---- */
.ti-feedback-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--paper, #FFFDF5);
  color: var(--ink, #17212F);
  border: 1px solid var(--line-2, rgba(216, 59, 140, 0.22));
  box-shadow: var(--shadow, 0 18px 48px rgba(8, 49, 56, 0.18));
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ti-feedback-launch:hover { background: var(--mint, #EAF8F9); border-color: var(--teal, #087D88); }
.ti-feedback-launch:focus-visible { outline: 2px solid var(--teal, #087D88); outline-offset: 2px; }
.ti-feedback-launch-glyph {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 60% 0 60% 60%;
  background: linear-gradient(135deg, var(--volt, #54C95A), var(--teal, #087D88));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
  transform: rotate(-35deg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
}
.ti-feedback-launch-glyph::after {
  content: "";
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  transform: rotate(35deg);
}
.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(--paper, #FFFDF5);
  border: 1px solid var(--line-2, rgba(216, 59, 140, 0.22));
  border-radius: 16px;
  box-shadow: 0 26px 64px rgba(23, 33, 47, 0.28);
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, 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-size: 16px; color: var(--ink, #17212F); letter-spacing: -0.01em; }
.ti-fb-close {
  background: none; border: none; color: var(--muted, #5C6B7A);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.ti-fb-close:hover { color: var(--ink, #17212F); }
.ti-fb-close:focus-visible { outline: 2px solid var(--teal, #087D88); outline-offset: 2px; }

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

.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, #17212F); }

.ti-fb-note {
  width: 100%; box-sizing: border-box; min-width: 0;
  background: #fff;
  border: 1px solid var(--line, rgba(23, 33, 47, 0.12));
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--ink, #17212F);
  font-size: 13.5px; line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  resize: vertical;
}
.ti-fb-note::placeholder { color: var(--muted, #5C6B7A); }
.ti-fb-note:focus-visible { outline: 2px solid var(--teal, #087D88); outline-offset: 1px; }

/* the read-only page line: a quiet teal-tinted tag plus the page label */
.ti-fb-page-row {
  display: flex; align-items: baseline; gap: 8px;
  background: var(--mint, #EAF8F9);
  border: 1px solid rgba(8, 125, 136, 0.22);
  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(--teal, #087D88);
  flex: 0 0 auto;
}
.ti-fb-page-val {
  font-size: 12.5px; color: var(--ink, #17212F);
  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: #fff;
  border: 1px solid var(--line, rgba(23, 33, 47, 0.12));
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--ink-2, #38495A);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
}
.ti-fb-rating:hover { border-color: var(--teal, #087D88); color: var(--ink, #17212F); }
.ti-fb-rating:focus-visible { outline: 2px solid var(--teal, #087D88); outline-offset: 2px; }
.ti-fb-rating.is-on {
  background: var(--mint, #EAF8F9);
  border-color: var(--teal, #087D88);
  color: var(--teal, #087D88);
  font-weight: 600;
}

.ti-fb-status {
  min-height: 18px;
  font-size: 12.5px; line-height: 1.4;
  color: var(--muted, #5C6B7A);
}
.ti-fb-status.is-ok { color: var(--ok, #1E7A6F); font-weight: 600; }
.ti-fb-status.is-error { color: var(--pink, #D83B8C); font-weight: 600; }

.ti-fb-actions { display: flex; justify-content: flex-end; }
.ti-fb-send {
  background: var(--teal-deep, #094F58);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(8, 125, 136, 0.20);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
}
.ti-fb-send:hover { filter: brightness(1.04); }
.ti-fb-send:focus-visible { outline: 2px solid var(--teal, #087D88); outline-offset: 2px; }
.ti-fb-send:disabled { opacity: 0.6; cursor: default; box-shadow: none; }

/* 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 */
@media (max-width: 560px) {
  .ti-feedback-launch { padding: 8px; }
  .ti-feedback-launch-label { display: none; }
}
