/* Feedback stays separate from map/canvas rendering and existing positioning transforms. */
.ux-feedback-ready {
  --ux-feedback-duration: 180ms;
  --ux-feedback-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.ux-feedback-ready .ux-pressed {
  animation: ux-control-press 200ms var(--ux-feedback-ease);
}
.ux-feedback-ready .ux-ack {
  animation: ux-control-ack 150ms ease-out;
}

.ux-feedback-ready
  :where(
    button,
    a[href],
    input,
    select,
    textarea,
    summary,
    [role='button'],
    [role='tab']
  ):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.ux-feedback-ready
  :where(
    dialog[open]:not(.media-fullscreen, .lightbox, .cover-crop):not(
        :has(canvas, .maplibregl-map, input[type='range'])
      ),
    .toast:not([hidden]),
    .ux-enter,
    [data-ux-enter='true']
  ) {
  animation: ux-surface-enter var(--ux-feedback-duration) var(--ux-feedback-ease);
}

.ux-feedback-setting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding-block: 12px;
  color: var(--color-text);
  cursor: pointer;
  touch-action: manipulation;
}
.ux-feedback-setting > input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--color-primary);
}
.ux-feedback-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ux-feedback-copy > strong {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}
.ux-feedback-copy > small {
  max-width: 55ch;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-muted);
  text-wrap: pretty;
}

@keyframes ux-control-press {
  from {
    scale: 0.975;
  }
  to {
    scale: 1;
  }
}
@keyframes ux-control-ack {
  from {
    opacity: 0.8;
  }
  to {
    opacity: 1;
  }
}
@keyframes ux-surface-enter {
  from {
    opacity: 0.88;
    translate: 0 4px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ux-feedback-ready .ux-pressed,
  .ux-feedback-ready
    :where(
      dialog[open]:not(.media-fullscreen, .lightbox, .cover-crop):not(
          :has(canvas, .maplibregl-map, input[type='range'])
        ),
      .toast:not([hidden]),
      .ux-enter,
      [data-ux-enter='true']
    ) {
    animation: ux-control-ack 150ms ease-out;
  }
}
