/*
 * Feedback widget integration stylesheet.
 *
 * Body-level --ammo-feedback-primary-* capture exists because redefining
 * --primary-fill from itself on the same element would be a cycle; the hex
 * values are the AMMO app.css light/dark tokens used only when the host lacks
 * them.
 *
 * --ammo-feedback-clearance is set only once the widget has mounted (via the
 * :has selector); the footer reads it to clear the fixed launcher.
 */

body {
  --ammo-feedback-primary-fill: var(--primary-fill, light-dark(#2689df, #3097ef));
  --ammo-feedback-primary-ink: var(--primary-ink, #ffffff);
}

body:has(> [data-ammo-feedback]) {
  --ammo-feedback-clearance: 72px;
}

[data-ammo-feedback] {
  color-scheme: light dark;
  font-family: inherit;
  --control-bg: transparent;
  --control-border: var(--line, light-dark(#dce2eb, #2b3444));
  --primary-fill: var(--ammo-feedback-primary-fill);
  --primary-ink: var(--ammo-feedback-primary-ink);
  --red: var(--danger, light-dark(#ae3341, #ffabb4));
  --green: var(--success, light-dark(#256c50, #8cd6b0));
}

html[data-theme="light"] [data-ammo-feedback] {
  color-scheme: light;
}

html[data-theme="dark"] [data-ammo-feedback] {
  color-scheme: dark;
}

@media (max-width: 480px) {
  body:has(> [data-ammo-feedback]) {
    --ammo-feedback-clearance: 64px;
  }
}
