/* Official internal animated border beam.
   Visual copy of home .card-beam. Do not load this file on /.
   Usage:
     <section class="rh-ibeam rounded-2xl border border-white/10 bg-muted p-5">
       ...
     </section>
   One beam per visual block. Nested .rh-ibeam is ignored by scripts/rh-ibeam.js.
   Stagger: --beam-delay: -2s; (or nth-child defaults).
*/
.rh-ibeam,
.rh-dialog-panel {
  --beam-delay: 0s;
  position: relative;
  isolation: isolate;
  min-width: 0;
  max-width: 100%;
}

.rh-ibeam > *,
.rh-dialog-panel > * {
  position: relative;
  z-index: 3;
}

.rh-ibeam::before,
.rh-dialog-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  z-index: 2;
  background: conic-gradient(
    from var(--beam-angle),
    var(--rh-beam-a) 0deg,
    var(--rh-beam-a) 14deg,
    var(--rh-beam-b) 32deg,
    var(--rh-beam-b) 52deg,
    transparent 105deg
  ) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  -webkit-mask-composite: source-out;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: card-beam-spin 6s linear infinite;
  animation-delay: var(--beam-delay);
}

.rh-ibeam:nth-child(2),
.rh-dialog-panel:nth-child(2) { --beam-delay: -2s; }
.rh-ibeam:nth-child(3),
.rh-dialog-panel:nth-child(3) { --beam-delay: -4s; }
.rh-ibeam:nth-child(4),
.rh-dialog-panel:nth-child(4) { --beam-delay: -1s; }
.rh-ibeam:nth-child(5),
.rh-dialog-panel:nth-child(5) { --beam-delay: -3s; }
.rh-ibeam:nth-child(6),
.rh-dialog-panel:nth-child(6) { --beam-delay: -5s; }

.rh-ibeam.is-off::before,
.rh-dialog-panel.is-off::before,
.card-beam.is-off::before {
  animation-play-state: paused;
}

body.rh-ibeam-hidden .rh-ibeam::before,
body.rh-ibeam-hidden .rh-dialog-panel::before,
body.rh-ibeam-hidden .card-beam::before {
  animation-play-state: paused;
}

.faq-item.rh-ibeam::before {
  content: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .rh-ibeam::before,
  .rh-dialog-panel::before {
    animation: none !important;
    background: linear-gradient(135deg, var(--rh-beam-b), var(--rh-beam-a)) !important;
  }
}
