.toast-container{
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 440px;
}

/* toast base */
.toast{
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 18px 20px;
  background: #fff;
  color: #212529;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 15, 15, 0.12);
  border-left: 6px solid var(--toast-border-color, #e53935);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: 18px;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(-6px);
  transition: transform 280ms cubic-bezier(.2,.9,.3,1), opacity 220ms ease;
  word-break: break-word;
  overflow: hidden;
  max-width: 440px;
}

/* entrance / exit */
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.hide {
  opacity: 0;
  transform: translateY(-8px);
}

/* body (texto) */
.toast .toast-body{
  flex: 1 1 auto;
  padding-right: 8px;
  margin-top: -2px; /* alinha visualmente */
}

/* close button (estilo "card" do demo) */
.toast .toast-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: #555;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
  box-shadow: none;
}

.toast .toast-close:hover {
  opacity: 0.6;
  transform: none;
}

/* se texto de warning for escuro, ajustar close */
.toast.warning .toast-close,
.toast.info .toast-close { color: #212529; }

/* tipos (cores das bordas) */
.toast.success { --toast-border-color: #43a047; }
.toast.error   { --toast-border-color: #e53935; }
.toast.danger  { --toast-border-color: #e53935; } /* alias */
.toast.info    { --toast-border-color: #1e88e5; }
.toast.warning { --toast-border-color: #fb8c00; }
.toast.primary { --toast-border-color: #0d6efd; }
.toast.secondary { --toast-border-color: #6c757d; }

/* progress bar inferior (animação baseada em --toast-duration) */
.toast .toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 6px;
  width: 100%;
  background: rgba(0,0,0,0.04);
}
.toast .toast-progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,0.12), rgba(0,0,0,0.06));
  background-color: var(--toast-border-color, #e53935);
  transform-origin: left center;
  animation: toast-progress linear var(--toast-duration, 4000ms) forwards;
}
@keyframes toast-progress {
  from { transform: translateX(0%); }
  to   { transform: translateX(-100%); }
}

/* When paused (hover/focus) */
.toast.paused .toast-progress > i {
  animation-play-state: paused;
}

/* responsive */
@media (max-width: 480px){
  .toast-container { left: 12px; right: 12px; top: 12px; }
  .toast { font-size: 16px; padding: 14px; max-width: calc(100% - 24px); }
}
