/*
 * The feedback question. Loaded by the site, the app and the survey page, so
 * every colour falls back to the shared CommerceTrace values when the page
 * does not define its own tokens.
 */
.ctf {
  --ctf-ink: var(--text, #161b22);
  --ctf-muted: var(--muted, #464e5b);
  --ctf-line: var(--border, rgba(14, 17, 22, 0.1));
  --ctf-line-strong: var(--border-bright, rgba(14, 17, 22, 0.18));
  --ctf-raised: var(--bg-raised, #ffffff);
  --ctf-sunken: var(--bg-sunken, #eceef2);
  --ctf-accent: #2450c8;
  --ctf-accent-soft: #e8eefb;
  --ctf-ok: #0d7545;
  --ctf-bad: #c0301e;
  position: relative;
  margin: 16px 0;
  padding: 20px 22px;
  border: 1px solid var(--ctf-line);
  border-radius: 14px;
  background: var(--ctf-raised);
  color: var(--ctf-ink);
  font: inherit;
  font-size: 15px;
  text-align: left;
}
.ctf-compact { padding: 16px 18px; background: var(--ctf-sunken); border-color: transparent; }
.ctf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ctf .ctf-q { margin: 0 0 14px; color: var(--ctf-ink); font-weight: 650; font-size: 16px; line-height: 1.35; }
.ctf-compact .ctf-q.ctf-q { font-size: 15px; margin-bottom: 10px; }
.ctf-close {
  flex: none; width: 32px; height: 32px; margin: -6px -8px 0 0; border: 0; border-radius: 8px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M11 11l10 10M21 11L11 21' stroke='%23464e5b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 32px no-repeat;
  cursor: pointer;
}
.ctf-close:hover { background-color: var(--ctf-sunken); }

.ctf-ratings, .ctf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ctf-rating, .ctf-chip {
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--ctf-line-strong); background: var(--ctf-raised); color: var(--ctf-ink);
  font: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; cursor: pointer; text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ctf-rating { min-height: 44px; padding: 10px 18px; font-weight: 600; }
.ctf-rating:hover, .ctf-chip:hover { border-color: var(--ctf-accent); }
.ctf-rating[aria-pressed="true"], .ctf-chip[aria-pressed="true"] {
  border-color: var(--ctf-accent); background: var(--ctf-accent-soft); color: var(--ctf-accent);
}
.ctf-chip[aria-pressed="true"]::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%232450c8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ctf-rating:focus-visible, .ctf-chip:focus-visible, .ctf-send:focus-visible, .ctf-close:focus-visible,
.ctf-text:focus-visible, .ctf-email:focus-visible, .ctf-contact input:focus-visible {
  outline: 2px solid var(--ctf-accent); outline-offset: 2px;
}

.ctf-more:empty { display: none; }
.ctf-more { margin-top: 18px; display: grid; gap: 18px; }
.ctf-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.ctf .ctf-legend { margin: 0 0 10px; padding: 0; font-size: 14px; font-weight: 650; color: var(--ctf-ink); }
.ctf-chips { gap: 8px; }
.ctf-problem { display: contents; }
.ctf-detail {
  flex-basis: 100%; margin: 2px 0 6px; padding: 12px 14px; border-radius: 12px;
  background: var(--ctf-sunken);
}
.ctf-compact .ctf-detail { background: var(--ctf-raised); }
.ctf .ctf-detail-q { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ctf-muted); }
.ctf-label { display: block; margin: 0 0 -10px; font-size: 14px; font-weight: 650; }
.ctf-text, .ctf-email {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--ctf-line-strong); background: var(--ctf-raised); color: var(--ctf-ink);
  font: inherit; font-size: 15px; line-height: 1.45; resize: vertical;
}
.ctf-contact { display: grid; gap: 8px; font-size: 14px; color: var(--ctf-muted); }
.ctf-contact-row { display: flex; align-items: center; gap: 10px; }
.ctf-contact input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--ctf-accent); }
.ctf-email { max-width: 340px; }
.ctf-email[hidden] { display: none; }

.ctf-footer:empty { display: none; }
.ctf-footer { margin-top: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.ctf-send {
  min-height: 44px; padding: 10px 22px; border: 0; border-radius: 10px;
  background: var(--ctf-accent); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.ctf-send:hover { background: #1b3fa3; }
.ctf-send:disabled { opacity: 0.7; cursor: progress; }
.ctf .ctf-status { margin: 0; font-size: 13px; color: var(--ctf-muted); }
.ctf .ctf-status[data-tone="ok"] { color: var(--ctf-ok); }
.ctf .ctf-status[data-tone="error"] { color: var(--ctf-bad); }
.ctf .ctf-thanks, .ctf .ctf-thanks-inline { margin: 0; font-size: 15px; font-weight: 600; color: var(--ctf-ok); }
.ctf .visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 520px) {
  .ctf { padding: 16px; }
  .ctf-rating { flex: 1 1 auto; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ctf-rating, .ctf-chip { transition: none; }
}
