/*
 * styles-notifications.css — notification / survey tier (epic #11 C2, #174).
 *
 * The shared top banner rendered by src/guidance/notification-queue.js — a
 * one-at-a-time toast carrying a tip (message + optional CTA) or a survey
 * (message + choice buttons). Themed entirely via design tokens so it inherits
 * light/dark automatically, matching the coachmark/demo surfaces. JS owns the
 * DOM + lifecycle; this owns look.
 */

.ori-notification {
  position: fixed;
  top: var(--space-3, 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4200; /* above the coachmark (4000), below the demo panel (4100)?
                    the demo + a notification never co-exist, so top-most toast */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2, 8px);
  box-sizing: border-box;
  max-width: min(560px, calc(100vw - var(--space-5, 24px)));
  padding: var(--space-3, 12px) var(--space-4, 16px);
  padding-right: calc(var(--space-4, 16px) + 22px); /* room for the close button */
  background: var(--surface-hi, var(--surface));
  border: 1px solid var(--purple);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: var(--fs-sm, 13px);
  line-height: 1.4;
  transition: opacity 0.25s ease;
  animation: ori-notification-in 180ms ease-out;
}

@keyframes ori-notification-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.ori-notification-text {
  flex: 1 1 auto;
  min-width: 12ch;
  color: var(--text);
}

.ori-notification-action {
  flex: 0 0 auto;
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--purple);
  color: #fff;
  font-size: var(--fs-sm, 13px);
  font-weight: 600;
  cursor: pointer;
}

.ori-notification-action:hover {
  filter: brightness(1.08);
}

.ori-notification-choices {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-2, 8px);
}

.ori-notification-choice {
  padding: var(--space-2, 8px) var(--space-4, 16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm, 13px);
  font-weight: 600;
  cursor: pointer;
}

.ori-notification-choice:hover {
  border-color: var(--purple);
  background: var(--surface-lo, var(--surface));
}

.ori-notification-close {
  position: absolute;
  top: var(--space-1, 4px);
  right: var(--space-1, 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-3, var(--text-hint));
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.ori-notification-close:hover {
  color: var(--text);
  background: var(--surface-lo, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .ori-notification { animation: none; }
}
