/**
 * assets/css/toast.css
 * ---------------------------------------------------------------
 * সাইটজুড়ে একশনের পর (Save/Delete/Order ইত্যাদি) দেখানো অ্যানিমেটেড
 * নোটিফিকেশন পপআপ। স্ব-নির্ভর ফাইল — কোনো পেইজের নিজস্ব CSS ভ্যারিয়েবলের
 * উপর নির্ভর করে না (তাই অ্যাডমিন/চ্যাট/অ্যাকাউন্ট/পাবলিক — সব জায়গায়
 * একইভাবে কাজ করে)।
 */

.toast-container {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  pointer-events: none;
  max-width: 380px;
}
.toast-container.pos-top-right    { top: 0; right: 0; }
.toast-container.pos-top-center   { top: 0; left: 50%; transform: translateX(-50%); align-items: center; }
.toast-container.pos-bottom-right { bottom: 0; right: 0; flex-direction: column-reverse; }
.toast-container.pos-bottom-center{ bottom: 0; left: 50%; transform: translateX(-50%); align-items: center; flex-direction: column-reverse; }

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 260px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 36, 25, 0.18);
  padding: 14px 16px;
  border-left: 4px solid #1E9E5A;
  position: relative;
  overflow: hidden;
  animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.toast.toast-error { border-left-color: #D14343; }
.toast.toast-leaving { animation: toast-out 0.22s ease forwards; }

.toast-icon { font-size: 17px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.toast-text { font-size: 14px; color: #14241B; line-height: 1.45; flex: 1; word-break: break-word; }
.toast-close {
  background: none; border: none; cursor: pointer; font-size: 15px; color: #647A6F;
  padding: 0; line-height: 1; flex-shrink: 0; margin-top: 1px;
}
.toast-close:hover { color: #14241B; }

.toast-progress {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: #1E9E5A; animation-name: toast-progress; animation-timing-function: linear; animation-fill-mode: forwards;
}
.toast.toast-error .toast-progress { background: #D14343; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}
@keyframes toast-progress {
  from { width: 100%; }
  to   { width: 0%; }
}

@media (max-width: 480px) {
  .toast-container { left: 10px !important; right: 10px !important; transform: none !important; padding: 0; max-width: none; }
  .toast-container.pos-bottom-right, .toast-container.pos-bottom-center { bottom: 10px; }
  .toast-container.pos-top-right, .toast-container.pos-top-center { top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .toast-progress { animation: none !important; }
}
