/* ── Toast container ─────────────────────────────────────────── */

#toast-container {
  position: fixed;
  top: 56px; /* below chat header */
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100vw - 32px);
}

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

.hub-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid rgba(140, 140, 160, 0.45);
  background: rgba(30, 32, 40, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #e0e0e0;
  font-size: 0.88em;
  line-height: 1.4;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: default;
  max-width: 100%;
  overflow: hidden;
}

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

.hub-toast.toast-exiting {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hub-toast.toast-clickable {
  cursor: pointer;
}

.hub-toast.toast-clickable:hover {
  background: rgba(40, 42, 52, 0.95);
}

/* ── Toast parts ─────────────────────────────────────────────── */

.toast-icon {
  font-size: 1.2em;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  color: #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-text {
  margin-top: 3px;
  opacity: 0.7;
  font-size: 0.92em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toast-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: -2px;
}

.toast-dismiss:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Action buttons ──────────────────────────────────────────── */

.toast-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.toast-action-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #d0d0d0;
  font-size: 0.85em;
  cursor: pointer;
  transition: background 0.15s;
}

.toast-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.toast-action-primary {
  background: rgba(74, 158, 255, 0.2);
  border-color: rgba(74, 158, 255, 0.35);
  color: #7cb8ff;
}

.toast-action-primary:hover {
  background: rgba(74, 158, 255, 0.3);
}

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

@media (max-width: 600px) {
  #toast-container {
    top: 48px;
    right: 8px;
    left: 8px;
    max-width: none;
    width: auto;
  }

  .hub-toast {
    transform: translateY(-20px);
  }

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

  .hub-toast.toast-exiting {
    transform: translateY(-20px);
  }
}
