/* ── Toast / Snackbar Notifications ──────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

/* ── Individual toast ────────────────────────────────────────── */

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: 'Manrope', 'Jost', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
  background: rgba(30, 30, 30, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.18),
    0 1px 4px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  min-width: 280px;
  max-width: 480px;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--exit {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* ── Type-specific accent ────────────────────────────────────── */

.toast--success {
  border-left: 4px solid var(--staff-success, #2e7d32);
}

.toast--error {
  border-left: 4px solid var(--staff-danger, #c62828);
}

.toast--warning {
  border-left: 4px solid var(--staff-warning, #e65100);
}

.toast--info {
  border-left: 4px solid var(--staff-primary, #2F5FA7);
}

/* ── Icon ────────────────────────────────────────────────────── */

.toast__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast--success .toast__icon { color: var(--staff-success, #2e7d32); }
.toast--error   .toast__icon { color: var(--staff-danger,  #c62828); }
.toast--warning .toast__icon { color: var(--staff-warning, #e65100); }
.toast--info    .toast__icon { color: var(--staff-primary, #2F5FA7); }

/* ── Message ─────────────────────────────────────────────────── */

.toast__message {
  flex: 1 1 auto;
  word-break: break-word;
}

/* ── Action button ───────────────────────────────────────────── */

.toast__action {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #90caf9;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.toast__action:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toast__action:focus-visible {
  outline: 2px solid #90caf9;
  outline-offset: 2px;
}

/* ── Close / dismiss button ──────────────────────────────────── */

.toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

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

.toast__close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* ── Reduced motion ──────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast--exit {
    transition: opacity 0.01ms;
    transform: none;
  }

  .toast--visible {
    transform: none;
  }
}

/* ── Mobile responsive ───────────────────────────────────────── */

@media (max-width: 480px) {
  #toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    transform: none;
    width: auto;
    max-width: none;
  }

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