/* The shared "what is happening" pieces from the States board: the empty card, the loading
 * skeleton and the Undo toast. Built by js/ui/states.js (emptyState, skeletonList, undoToast);
 * the sync words and the offline banner are in css/shell.css next to the header they sit in.
 */

/* ------------------------------------------------------------- empty card ---- */

/* One idea: what will fill this, the main action, a second way in, a way to look around first. */
.empty-card {
  text-align: center; padding: var(--space-64) var(--space-32); border-radius: var(--radius-lg); background: var(--surface);
}
.empty-card-icon {
  width: 72px; height: 72px; margin: 0 auto var(--space-16); border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-dark);
}
.empty-card-icon .material-symbols-rounded { font-size: 34px; vertical-align: 0; }
.empty-card-title {
  margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: -.01em; line-height: 1.2;
}
.empty-card-text { margin: var(--space-8) auto var(--space-24); max-width: 380px; line-height: 1.55; color: var(--muted); font-size: 15px; }
.empty-card-actions { display: flex; gap: var(--space-8); justify-content: center; flex-wrap: wrap; }
.empty-card-quiet { margin: var(--space-16) 0 0; }
@media (max-width: 640px) { .empty-card { padding: var(--space-48) var(--space-24); } }

/* A button that reads as a quiet link: bold, accent, no box. 44px to tap on a phone. */
.link-btn {
  border: 0; background: none; padding: 0; font: 700 13.5px var(--font-family); color: var(--accent-dark);
  cursor: pointer; border-radius: 6px;
}
.link-btn:hover { text-decoration: underline; }
@media (max-width: 640px), (pointer: coarse) { .link-btn { min-height: 44px; padding: 0 var(--space-16); } }

/* --------------------------------------------------------------- skeleton ---- */

/* Grey shapes in the layout of the real rows, so nothing jumps when they arrive. The shimmer is a
   soft light sweeping across; with reduced motion it is the flat shape and nothing moves. */
.skeleton-list { display: flex; flex-direction: column; gap: var(--space-16); }
.skeleton-row { display: flex; align-items: center; gap: var(--space-16); }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.skel {
  display: block; height: 14px; border-radius: 8px; background-color: var(--track);
  background-image: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--card) 60%, transparent) 50%, transparent 100%);
  background-size: 200% 100%; background-repeat: no-repeat;
  animation: skel-sweep 1.5s ease-in-out infinite;
}
.skel-dot { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.skel-thin { height: 11px; }
.skel-pill { width: 70px; height: 26px; border-radius: var(--radius-pill); flex: none; }
@keyframes skel-sweep { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; background-image: none; } }

/* -------------------------------------------------------------- undo toast ---- */

/* The dark toast, with the word Undo on it. It joins the column of toasts (#toasts) so a plain
   "Saved" and an Undo can be on screen together. */
.toast.undo-toast {
  border-radius: 16px; padding: var(--space-4) var(--space-4) var(--space-4) var(--space-24); gap: var(--space-8); min-height: 52px;
}
.undo-toast-text { flex: 1 1 auto; min-width: 0; padding: var(--space-8) var(--space-16) var(--space-8) 0; line-height: 1.35; }
.undo-toast .undo-toast-btn {
  min-height: 44px; min-width: 44px; padding: 0 var(--space-16); font-size: 14.5px; font-weight: 700;
  border-radius: var(--radius-pill); text-decoration: underline;
}
.undo-toast .undo-toast-btn:hover, .undo-toast .undo-toast-close:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.undo-toast .undo-toast-close {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  text-decoration: none; opacity: .85;
}
.undo-toast .undo-toast-close .material-symbols-rounded { font-size: 20px; vertical-align: 0; }
