.action-feedback-root {
  position: fixed;
  z-index: 1400;
  top: 24px;
  right: 24px;
  width: min(420px, calc(100vw - 48px));
  pointer-events: none;
}

.action-feedback-stack {
  display: grid;
  gap: 10px;
}

.action-feedback-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: start;
  min-height: 72px;
  padding: 14px 12px 16px 14px;
  overflow: hidden;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--stroke-strong);
  border-left: 4px solid var(--accent-2);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  pointer-events: auto;
  animation: action-feedback-enter 180ms ease-out both;
}

.action-feedback-card.success {
  border-left-color: var(--status-ok-text);
}

.action-feedback-card.warning {
  border-left-color: var(--status-warn-text);
}

.action-feedback-card.error {
  border-left-color: var(--status-stop-text);
}

.action-feedback-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--flash-info-text);
  background: var(--flash-info-bg);
  border-radius: 10px;
  font-size: 17px;
  font-weight: 900;
}

.action-feedback-card.success .action-feedback-icon {
  color: var(--status-ok-text);
  background: var(--status-ok-bg);
}

.action-feedback-card.warning .action-feedback-icon {
  color: var(--status-warn-text);
  background: var(--status-warn-bg);
}

.action-feedback-card.error .action-feedback-icon {
  color: var(--status-stop-text);
  background: var(--status-stop-bg);
}

.action-feedback-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  line-height: 1.35;
}

.action-feedback-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.action-feedback-copy > span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.action-feedback-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--stroke);
  border-radius: 9px;
  font: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.action-feedback-close:hover,
.action-feedback-close:focus-visible {
  color: var(--text);
  background: var(--surface-soft-strong);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.action-feedback-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent-2);
  transform-origin: left center;
  animation: action-feedback-progress var(--action-feedback-duration) linear forwards;
}

.action-feedback-card.success .action-feedback-progress {
  background: var(--status-ok-text);
}

.action-feedback-card.warning .action-feedback-progress {
  background: var(--status-warn-text);
}

.action-feedback-card.error .action-feedback-progress {
  background: var(--status-stop-text);
}

.action-feedback-field-invalid {
  border-color: var(--status-stop-text) !important;
  outline: 2px solid var(--status-stop-bg);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--status-stop-bg);
}

@keyframes action-feedback-enter {
  from {
    opacity: 0;
    transform: translate3d(18px, -4px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes action-feedback-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 720px) {
  .action-feedback-root {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    width: auto;
  }

  .action-feedback-card {
    grid-template-columns: 32px minmax(0, 1fr) 30px;
    min-height: 68px;
    padding: 12px 10px 15px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .action-feedback-card,
  .action-feedback-progress {
    animation: none;
  }
}
