/* The islands framework's own stylesheet — loaded on every page that loads the framework
   (framework_script_tags() emits it), and in the <head> of every page built on the base
   template so a placeholder the server renders inside a mount is styled at first paint.

   Skeletons — the shape of content that is still loading.
   `.ff-skeleton` is the shimmering block; size it with width/height (or let a modifier do it).
   Its colours are mixed from `currentColor`, not from a theme variable, so a skeleton reads on
   any surface it lands on — a light theme, a dark theme, the always-dark attendance kiosk —
   without a stylesheet of its own. Islands draw them through `Skeleton` / `SkeletonText` on
   window.fullfinity; a Jinja template writes the classes directly.

   Every rule sits in the `ff-framework` cascade layer, and unlayered rules beat layered ones
   whatever their order: so a module or theme resizes or recolours a skeleton with a plain
   rule, even though this file is linked again at the end of <body> on base-template pages. */

@layer ff-framework {
  @keyframes ff-skeleton-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
  }

  .ff-skeleton {
    display: block;
    height: 1em;
    border-radius: var(--theme-radius-sm, 0.375rem);
    background: linear-gradient(
      90deg,
      color-mix(in srgb, currentColor 8%, transparent) 25%,
      color-mix(in srgb, currentColor 15%, transparent) 50%,
      color-mix(in srgb, currentColor 8%, transparent) 75%
    );
    background-size: 200% 100%;
    animation: ff-skeleton-shimmer 1.5s ease-in-out infinite;
  }

  /* One line of text: a little shorter than the line it stands for, with the gap a paragraph has. */
  .ff-skeleton-text { height: 0.8em; margin-block: 0.35em 0.6em; }

  /* An avatar or icon: give it a width; the height follows. */
  .ff-skeleton-circle { height: auto; aspect-ratio: 1; border-radius: 50%; }

  /* Inside a sentence or a table cell: a value that has not arrived, on the line it will sit on. */
  .ff-skeleton-inline { display: inline-block; width: 4em; vertical-align: middle; }

  /* Lines drawn by SkeletonText. */
  .ff-skeleton-lines { display: block; }
  .ff-skeleton-lines > .ff-skeleton-text:last-child { margin-block-end: 0; }

  @media (prefers-reduced-motion: reduce) {
    .ff-skeleton { animation: none; background: color-mix(in srgb, currentColor 10%, transparent); }
  }
}
