/* The face retains the native control's dimensions and checked/focus decoration. */
.sf-collab :is(.sf-collab-panel, .sf-collab-choice-face) {
  position: relative;
  isolation: isolate;
}
.sf-collab-choice > input { z-index: 1; }

@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  .sf-collab :is([data-collab-light], .sf-collab-duty, .sf-collab-panel, .sf-collab-choice) {
    --collab-rim-spread: ellipse 145px 32px;
    --collab-halo-spread: ellipse 115px 18px;
  }

  .sf-collab [data-lit="vertical"] {
    --collab-rim-spread: ellipse 32px 105px;
    --collab-halo-spread: ellipse 18px 84px;
  }

  .sf-collab :is([data-collab-light], .sf-collab-duty, .sf-collab-panel, .sf-collab-choice-face)::before,
  .sf-collab :is([data-collab-light], .sf-collab-duty, .sf-collab-panel, .sf-collab-choice-face)::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    opacity: 0;
    border-radius: inherit;
    pointer-events: none;
    transition: opacity 180ms ease-out;
  }

  .sf-collab :is([data-collab-light], .sf-collab-duty, .sf-collab-panel, .sf-collab-choice-face)::before {
    background:
      radial-gradient(var(--collab-halo-spread) at var(--collab-rim-point, 50% 0%), #ffcb8280, transparent),
      radial-gradient(ellipse 190px 125px at var(--collab-surface-point, 50% 0%), #efbc7536, transparent);
    filter: blur(3px);
  }

  @supports (mask-composite: exclude) {
    .sf-collab :is([data-collab-light], .sf-collab-duty, .sf-collab-panel, .sf-collab-choice-face)::after {
      inset: -1px;
      padding: 0;
      border: 2px solid transparent;
      background: radial-gradient(var(--collab-rim-spread) at var(--collab-rim-point, 50% 0%),
        #fff9ea 0%, #ffe8bd 15%, #ffc77b 35%, #dca274aa 59%, #cd9da341 82%, transparent) border-box;
      mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
      mask-composite: exclude;
    }
  }

  .sf-collab [data-lit]::before,
  .sf-collab [data-lit]::after,
  .sf-collab-choice[data-lit] > .sf-collab-choice-face::before,
  .sf-collab-choice[data-lit] > .sf-collab-choice-face::after { opacity: 1; }
}
