/**
 * assets/css/activity-toast.css
 *
 * Styles for the bottom-right "live activity" toast (see
 * assets/js/activity-toast.js). Matches the app's own glass-card look
 * (see .small-box in dashboard.css) — light frosted background, teal
 * brand accent (#79b8b9), and the same green/yellow/red semantic colors
 * used elsewhere in the dashboard, rather than an unrelated dark theme.
 *
 * Linked in includes/head.php alongside the other page stylesheets.
 */

#activityToastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  width: 340px;
  max-width: calc(100vw - 24px);
  pointer-events: none;
}

.activity-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #222;
  padding: 13px 14px 15px 16px;
  border-radius: 16px;
  box-shadow: 12px 17px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.84rem;
  line-height: 1.42;
  overflow: hidden;
  opacity: 0;
  transform: translateX(28px) scale(0.96);
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.2s ease;
  pointer-events: auto;
}

.activity-toast:hover {
  box-shadow: 12px 17px 44px rgba(0, 0, 0, 0.24);
}

.activity-toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.activity-toast.hide {
  opacity: 0;
  transform: translateX(28px) scale(0.96);
}

/* Colored left edge, tinted per action category — same idea as the
   colored border on .small-box cards on the dashboard. */
.activity-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--at-color, #79b8b9);
}

.activity-toast .at-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  /* Same low-opacity tint-over-white pattern as .small-box.bg-* */
  background: var(--at-color-soft, rgba(121, 184, 185, 0.25));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.activity-toast .at-body {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.activity-toast .at-actor {
  color: var(--at-color-strong, #3f7576);
  font-weight: 700;
  letter-spacing: 0.1px;
}

.activity-toast .at-details {
  color: #333;
  display: block;
  margin-top: 2px;
  word-break: break-word;
}

.activity-toast .at-time {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #6c757d;
}

.activity-toast .at-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #8a9096;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 3px 5px;
  margin: -3px -4px 0 0;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.activity-toast .at-close:hover {
  color: #222;
  background: rgba(0, 0, 0, 0.06);
}

.activity-toast .at-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
}

.activity-toast .at-progress {
  height: 100%;
  width: 100%;
  background: var(--at-color, #79b8b9);
  transform-origin: left;
  transform: scaleX(1);
  transition: transform linear;
}

@media (max-width: 480px) {
  #activityToastContainer {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .activity-toast {
    border-radius: 14px;
  }
}