/* Shared toast component — reusable across pages (VamosToast). */

.custom-toast-container {
  position: fixed;
  top: 20px;
  /* Logical start: top-left in LTR, top-right in RTL */
  inset-inline-start: 20px;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-toast {
  background: #fff;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 0;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-inline-start: 4px solid;
  pointer-events: all;
  opacity: 1;
  transition: all 0.3s ease;
  font-family: var(--font-ltr, 'Red Hat Display', sans-serif);
}

.custom-toast.error {
  border-inline-start-color: #ef4444;
}

.custom-toast.success {
  border-inline-start-color: #22c55e;
}

.custom-toast.warning {
  border-inline-start-color: #f59e0b;
}

.custom-toast.info {
  border-inline-start-color: #0f5a2f;
}

.custom-toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.custom-toast-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.custom-toast-icon img {
  display: block;
  width: 28px;
  height: 28px;
}

.custom-toast-text {
  color: #333;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  text-align: start;
  unicode-bidi: plaintext;
  font-family: inherit;
}

html[dir="rtl"] .custom-toast,
html[dir="rtl"] .custom-toast-text {
  font-family: var(--font-rtl, 'Cairo', sans-serif);
}

.custom-toast-text a {
  color: #2a6e47;
  text-decoration: underline;
}

.custom-toast-close {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  margin-inline-start: 10px;
  line-height: 1;
}

/* Slide from the start edge (left in LTR, right in RTL) */
@keyframes vamosToastSlideIn {
  from {
    transform: translateX(-120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes vamosToastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-120%);
    opacity: 0;
  }
}

html[dir="rtl"] .custom-toast.slide-in {
  animation-name: vamosToastSlideInRtl;
}

html[dir="rtl"] .custom-toast.slide-out {
  animation-name: vamosToastSlideOutRtl;
}

@keyframes vamosToastSlideInRtl {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes vamosToastSlideOutRtl {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.custom-toast.slide-in {
  animation: vamosToastSlideIn 0.3s ease-in-out forwards;
}

.custom-toast.slide-out {
  animation: vamosToastSlideOut 0.3s ease-in-out forwards;
}
