/* Reusable Django-messages toast notifications.
   Fixed to the right of the viewport; slides in, is dismissible,
   and auto-hides after about 5 seconds.
   The container uses the highest z-index on the page so toasts
   always paint above the sticky header, mobile drawer, and modals. */

.notify-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: calc(100% - 48px);
  max-width: 310px;
}

.notify-toast {
  --accent: #1563df;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 90px;
  padding: 14px 16px 14px 14px;
  border-radius: 2px;
  background: #c5c6d0;
  color: #1f2430;
  border-left: 5px solid var(--accent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  animation: notify-slide-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Circular status icon beside the coloured left-edge strip. */
.notify-toast::before {
  content: "\0069";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.notify-toast.notify-success {
  --accent: #22c55e;
}
.notify-toast.notify-success::before {
  content: "\2713";
}

.notify-toast.notify-error {
  --accent: #f4434a;
}
.notify-toast.notify-error::before {
  content: "!";
}

.notify-toast.notify-warning {
  --accent: #f4c20d;
}
.notify-toast.notify-warning::before {
  content: "!";
  color: #1f2430;
}

.notify-toast.notify-info {
  --accent: #1563df;
}
.notify-toast.notify-info::before {
  content: "\0069";
}

.notify-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

/* Bold title line rendered above the message text. */
.notify-error .notify-text::before {
  content: "Error notification";
}
.notify-success .notify-text::before {
  content: "Success notification";
}
.notify-warning .notify-text::before {
  content: "Warning notification";
}
.notify-info .notify-text::before {
  content: "Info notification";
}
.notify-error .notify-text::before,
.notify-success .notify-text::before,
.notify-warning .notify-text::before,
.notify-info .notify-text::before {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1f2430;
  margin-bottom: 3px;
}

.notify-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1f2430;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.notify-close:hover {
  color: #000000;
}

.notify-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.notify-toast.notify-leaving {
  animation: notify-slide-out 0.3s ease forwards;
}

@keyframes notify-slide-in {
  from {
    transform: translateX(120%) translateY(-8px);
    opacity: 0;
  }
  to {
    transform: translateX(0) translateY(0);
    opacity: 1;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .notify-toast {
    animation: none;
  }
}