.action-feedback-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100000;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  width: min(420px, calc(100vw - 36px));
  min-height: 58px;
  padding: 12px 12px 12px 15px;
  color: #162033;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #d8e0ec;
  border-left: 5px solid #315efb;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.action-feedback-toast[hidden] {
  display: none;
}

.action-feedback-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.action-feedback-toast[data-state="loading"] { border-left-color: #315efb; }
.action-feedback-toast[data-state="success"] { border-left-color: #0f9f6e; }
.action-feedback-toast[data-state="warning"] { border-left-color: #d97706; }
.action-feedback-toast[data-state="error"] { border-left-color: #dc2626; }

.action-feedback-indicator {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #315efb;
  box-shadow: 0 0 0 4px rgba(49, 94, 251, 0.12);
}

.action-feedback-toast[data-state="loading"] .action-feedback-indicator {
  animation: action-feedback-pulse 900ms ease-in-out infinite alternate;
}

.action-feedback-toast[data-state="success"] .action-feedback-indicator {
  background: #0f9f6e;
  box-shadow: 0 0 0 4px rgba(15, 159, 110, 0.12);
}

.action-feedback-toast[data-state="warning"] .action-feedback-indicator {
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.action-feedback-toast[data-state="error"] .action-feedback-indicator {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.action-feedback-copy {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.action-feedback-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #64748b;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.action-feedback-close:hover,
.action-feedback-close:focus-visible {
  color: #111827;
  background: #eef2f7;
  outline: none;
}

button.is-action-acknowledged,
a.is-action-acknowledged {
  box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.2) !important;
  transform: translateY(1px);
}

button.is-action-result[data-action-result="success"],
a.is-action-result[data-action-result="success"] {
  box-shadow: 0 0 0 3px rgba(15, 159, 110, 0.2) !important;
}

button.is-action-result[data-action-result="warning"],
a.is-action-result[data-action-result="warning"],
button.is-action-result[data-action-result="error"],
a.is-action-result[data-action-result="error"] {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16) !important;
}

@keyframes action-feedback-pulse {
  from { opacity: 0.55; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
  .action-feedback-toast {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .action-feedback-toast,
  .action-feedback-indicator,
  button.is-action-acknowledged,
  a.is-action-acknowledged {
    animation: none !important;
    transition: none !important;
  }
}
