/* Royality ecosystem — komunikaty flash jako toast (jak panel xonofilius.pl) */

.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  left: auto;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast-stack .toast {
  pointer-events: auto;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.5rem 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(14, 12, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  color: #f2f0eb;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-out {
  opacity: 0;
  transform: translateX(6px);
}

.toast__text {
  flex: 1;
  min-width: 0;
  padding-top: 0.08rem;
}

.toast__close {
  flex: 0 0 auto;
  margin: -0.2rem -0.15rem 0 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.toast__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.toast--success {
  border-color: rgba(120, 200, 140, 0.35);
  background: rgba(12, 22, 16, 0.78);
  color: #c8efd4;
}

.toast--danger {
  border-color: rgba(220, 100, 100, 0.4);
  background: rgba(28, 12, 12, 0.82);
  color: #f0c4c4;
}

.toast--info {
  border-color: rgba(157, 125, 255, 0.35);
  background: rgba(18, 14, 28, 0.82);
  color: #ddd4ff;
}

.toast--warning {
  border-color: rgba(230, 190, 90, 0.42);
  background: rgba(36, 28, 10, 0.88);
  color: #ffe8b0;
}

/* Mocniejsze kolory w panelach (APP Staff/User, panel xonofilius admin) */
.admin-app .toast-stack .toast.toast--success,
.app-body-panel .toast-stack .toast.toast--success {
  border-color: rgba(120, 210, 150, 0.55);
  background: linear-gradient(145deg, rgba(18, 42, 26, 0.96), rgba(10, 24, 16, 0.94));
  color: #c8f2d4;
  box-shadow: 0 14px 42px rgba(0, 50, 28, 0.42), 0 1px 0 rgba(255, 255, 255, 0.07) inset;
}

.admin-app .toast-stack .toast.toast--danger,
.app-body-panel .toast-stack .toast.toast--danger {
  border-color: rgba(230, 100, 100, 0.55);
  background: linear-gradient(145deg, rgba(48, 16, 18, 0.96), rgba(26, 8, 10, 0.94));
  color: #ffc8c8;
  box-shadow: 0 14px 42px rgba(60, 12, 12, 0.45), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.admin-app .toast-stack .toast.toast--info,
.app-body-panel .toast-stack .toast.toast--info {
  border-color: rgba(157, 125, 255, 0.5);
  background: linear-gradient(145deg, rgba(32, 22, 52, 0.96), rgba(14, 10, 28, 0.94));
  color: #e2d8ff;
  box-shadow: 0 14px 42px rgba(40, 20, 80, 0.4), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.admin-app .toast-stack .toast.toast--warning,
.app-body-panel .toast-stack .toast.toast--warning {
  border-color: rgba(230, 180, 80, 0.52);
  background: linear-gradient(145deg, rgba(44, 32, 12, 0.96), rgba(22, 16, 6, 0.94));
  color: #ffe8a8;
  box-shadow: 0 14px 42px rgba(50, 36, 0, 0.38), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.admin-app .toast-stack .toast[class*="toast--"] .toast__close,
.app-body-panel .toast-stack .toast[class*="toast--"] .toast__close {
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
}

.admin-app .toast-stack .toast[class*="toast--"] .toast__close:hover,
.app-body-panel .toast-stack .toast[class*="toast--"] .toast__close:hover {
  background: rgba(0, 0, 0, 0.35);
}
