/* ---------- Toast container ---------- */
#toast-container {
  position: fixed;
  top: 88px;              /* below the navbar */
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;   /* clicks pass through the empty area */
}

/* ---------- Single toast ---------- */
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  padding: 14px 16px;
  background: #1a1a1f;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #888;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 14px;
  line-height: 1.4;

  /* hidden state, animated in by the .show class */
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Types ---------- */
.toast-error   { border-left-color: #ff4d4f; }
.toast-success { border-left-color: #2ecc71; }
.toast-info    { border-left-color: #3498db; }

.toast-error   .toast-icon { color: #ff4d4f; }
.toast-success .toast-icon { color: #2ecc71; }
.toast-info    .toast-icon { color: #3498db; }

/* ---------- Parts ---------- */
.toast-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.toast-text {
  flex: 1;
  word-break: break-word;
}

.toast-action {
  flex-shrink: 0;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: underline;
  white-space: nowrap;
}

.toast-action:hover {
  opacity: 0.8;
}

.toast-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.toast-close:hover {
  color: #ffffff;
}

.toast-close .material-symbols-outlined {
  font-size: 18px;
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  #toast-container {
    top: 72px;
    left: 12px;
    right: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}