/* Notifications - Toast notifications container */

/* Notifications - Toast notifications container */

#notifications {
  position: fixed;
  z-index: 10000;
  display: flex;
  gap: 12px;
  width: 360px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
  padding: 16px;
  transition: all 0.3s ease;

  /* Default: Bottom Right */
  bottom: 0;
  right: 0;
  flex-direction: column;
}

/* --- Positioning Variants --- */

/* Top Right */
#notifications.top-right {
  top: 0;
  right: 0;
  bottom: auto;
  flex-direction: column-reverse; /* Newest at top */
}

/* Top Left */
#notifications.top-left {
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  flex-direction: column-reverse;
}

/* Bottom Right */
#notifications.bottom-right {
  bottom: 0;
  right: 0;
  top: auto;
  flex-direction: column; /* Newest at bottom */
}

/* Bottom Left */
#notifications.bottom-left {
  bottom: 0;
  left: 0;
  top: auto;
  right: auto;
  flex-direction: column;
}

/* --- Toast Notification Style --- */

.noti {
  background: rgba(22, 22, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.2);
  color: #f2f2f2;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;

  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  position: relative;
  overflow: hidden;

  /* Animations */
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  animation: notiEnter 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes notiEnter {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.noti.leaving {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.2s ease;
  pointer-events: none;
}

/* --- Icons via CSS (Pseudo-elements) --- */
.noti::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 1px; /* visual align */
}

/* Success */
.noti-success {
  border-left: 3px solid #10b981;
}
.noti-success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

/* Error */
.noti-error {
  border-left: 3px solid #ef4444;
}
.noti-error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z'/%3E%3C/svg%3E");
}

/* Info */
.noti-info {
  border-left: 3px solid #3b82f6;
}
.noti-info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233b82f6'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

/* --- Close Button --- */
.noti-close {
  position: relative;
  top: auto;
  right: auto;
  width: 24px;
  height: 24px;
  margin-left: auto;
  margin-top: -2px;

  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.4);

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s;
}

.noti-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
