/* Toast notifications — shared by both admin shells (EC-3503).
 *
 * Extracted from static/site/css/admin/base.css, which only the classic shell
 * loads. The modern shell (templates/modern/base.html) had no toast styles at
 * all, so every background-task and notification toast was unstyled there —
 * which, combined with the missing poller, is why a running job was completely
 * invisible on a modern page.
 *
 * Covers: the spinner, #toast-container, .toast and its variants, and the
 * notification-toast inner structure used by admin/includes/notification_toasts.html.
 */

/* Spinner */
.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #333;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast container */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-toast, 99999);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

/* Toast message styles */
.toast {
  background: #333;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-size: 14px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 420px;
}
.toast .toast-content {
  flex: 1;
  line-height: 1.4;
}
.toast .toast-content a {
  color: #fff;
  text-decoration: underline;
}
.toast .toast-dismiss {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
  padding: 0 0 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.toast .toast-dismiss:hover {
  opacity: 1;
}

/* Color types */
.toast.success {
  background: #4caf50;
}

.toast.error {
  background: #f44336;
}

.toast.info {
  background: #2196f3;
}

.toast.warning {
  background: #ffc107 !important;
  color: #664d03;
}
.toast.warning .toast-dismiss {
  color: #664d03;
}
.toast.warning .toast-content a {
  color: #664d03;
}

/* Spinner animation for running toast */
@keyframes bg-task-spin {
  to { transform: rotate(360deg); }
}

/* Notification toast inner structure */
.notif-toast-header {
  margin-bottom: 4px;
}

.notif-toast-message {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 8px;
  line-height: 1.3;
}

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

.notif-toast-ack,
.notif-toast-snooze,
.notif-toast-delete {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 3px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  transition: background 0.15s ease;
}

.notif-toast-ack:hover,
.notif-toast-snooze:hover,
.notif-toast-delete:hover {
  background: rgba(255, 255, 255, 0.35);
}

.notif-toast-snooze,
.notif-toast-delete {
  opacity: 0.8;
}
