/* ========================================================================== */
/*                                TOAST FX                                   */
/* ========================================================================== */

#panel-toast-container {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 12000;
  display: flex;
  width: min(calc(100vw - 24px), 32rem);
  max-width: calc(100vw - 24px);
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  overflow: visible;
  pointer-events: none;
}

#panel-toast-container .tw-toast-item {
  transform-origin: right top;
  will-change: transform, opacity, filter;
}

#panel-toast-container .tw-toast-shell {
  position: relative;
  pointer-events: auto;
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  min-height: 46px;
  width: fit-content;
  max-width: min(100%, 32rem);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 6px 14px 6px 16px;
  text-align: left;
  font-size: 0.89rem;
  font-weight: 400;
  line-height: 1.2;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

#panel-toast-container .tw-toast-shell.tw-toast-shell-undo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
}

#panel-toast-container .tw-toast-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 14px 0 0 14px;
}

#panel-toast-container .tw-toast-message {
  min-width: 0;
  overflow-wrap: anywhere;
}

#panel-toast-container .tw-toast-enter {
  opacity: 0;
  filter: blur(1px);
  transform: translate3d(72px, 0, 0) scale(0.975);
}

#panel-toast-container .tw-toast-enter-active {
  animation: tw-toast-slide-in 520ms cubic-bezier(0.18, 0.88, 0.28, 1) both;
}

#panel-toast-container .tw-toast-leave {
  animation: tw-toast-slide-out 320ms cubic-bezier(0.4, 0, 1, 1) both;
}

@keyframes tw-toast-slide-in {
  from {
    opacity: 0;
    filter: blur(1px);
    transform: translate3d(72px, 0, 0) scale(0.975);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes tw-toast-slide-out {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    opacity: 0;
    filter: blur(1px);
    transform: translate3d(48px, 0, 0) scale(0.985);
  }
}

#panel-toast-container .tw-toast-icon-wrap {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

#panel-toast-container .tw-toast-icon-svg {
  width: 17px;
  height: 17px;
  overflow: visible;
}

#panel-toast-container .tw-toast-icon-symbol {
  stroke: currentColor;
  opacity: 1;
}

#panel-toast-container .tw-toast-icon-animate .tw-toast-icon-wrap {
  animation: tw-toast-icon-pop 420ms cubic-bezier(0.18, 0.9, 0.26, 1) both;
}

#panel-toast-container .tw-toast-icon-dot {
  opacity: 1;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes tw-toast-icon-pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

#panel-toast-container .tw-toast-loader {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  animation: tw-toast-loader-spin 0.9s linear infinite;
}

#panel-toast-container .tw-toast-undo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#panel-toast-container .tw-toast-undo-btn:hover {
  transform: translateY(-1px);
  border-color: #94a3b8;
  color: #0f172a;
}

@keyframes tw-toast-loader-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #panel-toast-container .tw-toast-enter-active,
  #panel-toast-container .tw-toast-leave {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
