/* The edge and underglow share one seamless sweep through the signet colours. */
:root {
  --sonder-rainbow-duration: 6s;
  --sonder-rainbow-gradient: linear-gradient(90deg, #82cce0 0%, #66dfbd 15%,
    #def3d4 26%, #e4bf70 39%, #f9d7a1 46%, #e38f8b 58%, #ffd5c5 67%,
    #9cb9de 81%, #aeece5 93%, #82cce0 100%);
}

@property --sonder-foil-glint-at {
  syntax: "<percentage>";
  inherits: false;
  initial-value: -28%;
}

@keyframes sonder-rainbow-travel {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

/* Keep the smoked glass fixed while the foil travels around the rim. */
:root body .sonder-foil-cta,
:root body .sonder-foil-cta:is(:hover, :active, :focus-visible),
:root .agency-footer-invitation:is(:hover, :focus-visible) .sonder-foil-cta,
body.sp-contact #contactShell :is(#contactBooking, #quickSubmit).sonder-foil-cta {
  --foil-ink: #f8fbfa;
  --foil-shadow: inset 0 1px 0 #ffffff48, inset 0 -1px 0 #0009,
    0 0 0 1px #0c1a214a, 0 3px 7px -3px #0b141a59;
  --foil-sweep: linear-gradient(110deg, transparent calc(var(--sonder-foil-glint-at) - 12%),
    #e7fffa25 var(--sonder-foil-glint-at), transparent calc(var(--sonder-foil-glint-at) + 10%));
  --foil-polish: linear-gradient(173deg, #ffffff22, #ffffff0d 39%, transparent 40%);
  --foil-glass: linear-gradient(162deg, #2b3f41 0%, #1d282d 29%,
    #14191d 59%, #1c2025 84%, #2b2d30 100%);
  position: relative;
  isolation: isolate;
  background-color: #161e22;
  background-image: var(--foil-sweep), var(--foil-polish), var(--foil-glass), var(--sonder-rainbow-gradient);
  background-size: 100% 100%, 100% 100%, 100% 100%, 200% 100%;
  background-position: 0% 50%;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat-x;
  background-origin: padding-box, padding-box, padding-box, border-box;
  background-clip: padding-box, padding-box, padding-box, border-box;
  border: 2px solid transparent;
  border-radius: 12px;
  box-shadow: var(--foil-shadow);
  color: var(--foil-ink);
  text-decoration: none;
  text-shadow: none;
}

.sonder-foil-cta::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 7% -5px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--sonder-rainbow-gradient) 0% 50% / 200% 100% repeat-x;
  filter: blur(4px);
  opacity: .66;
}

:root body .sonder-foil-cta:focus-visible,
:root .agency-footer-invitation:focus-visible .sonder-foil-cta,
body.sp-contact #contactShell :is(#contactBooking, #quickSubmit).sonder-foil-cta:focus-visible {
  outline: 2px solid #152728;
  outline-offset: 3px;
  box-shadow: var(--foil-shadow), 0 0 0 6px #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .sonder-foil-cta,
  .sonder-foil-cta::after {
    animation: sonder-rainbow-travel var(--sonder-rainbow-duration) linear infinite;
  }
  :root body .sonder-foil-cta:focus-visible,
  :root .agency-footer-invitation:focus-visible .sonder-foil-cta {
    --sonder-foil-glint-at: 128%;
    transition: --sonder-foil-glint-at .66s ease-out;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :root body .sonder-foil-cta:not(:disabled, [aria-disabled="true"]):hover,
  :root .agency-footer-invitation:hover .sonder-foil-cta {
    --sonder-foil-glint-at: 128%;
    transition: --sonder-foil-glint-at .66s ease-out;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root body .sonder-foil-cta,
  :root body .sonder-foil-cta:is(:hover, :focus-visible),
  :root .agency-footer-invitation .sonder-foil-cta,
  .sonder-foil-cta::after {
    animation: none;
    transition: none;
    transform: none;
  }
}

:root body .sonder-foil-cta:is(:disabled, [aria-disabled="true"]),
body.sp-contact #contactShell :is(#contactBooking, #quickSubmit).sonder-foil-cta:is(:disabled, [aria-disabled="true"]) {
  background: #31393d;
  color: #d4dcdd;
  border-color: #76858a;
  box-shadow: none;
  opacity: 1;
  transform: none;
  animation: none;
}
.sonder-foil-cta:is(:disabled, [aria-disabled="true"])::after { display: none; }

@media (forced-colors: active) {
  :root body .sonder-foil-cta,
  :root body .sonder-foil-cta:is(:hover, :active, :focus-visible),
  :root .agency-footer-invitation:is(:hover, :focus-visible) .sonder-foil-cta,
  body.sp-contact #contactShell :is(#contactBooking, #quickSubmit).sonder-foil-cta {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
    box-shadow: none;
    animation: none;
    transition: none;
  }
  .sonder-foil-cta::after { display: none; }
  :root body .sonder-foil-cta:focus-visible,
  :root .agency-footer-invitation:focus-visible .sonder-foil-cta,
  body.sp-contact #contactShell :is(#contactBooking, #quickSubmit).sonder-foil-cta:focus-visible {
    outline-color: Highlight;
  }
  :root body .sonder-foil-cta:is(:disabled, [aria-disabled="true"]),
  body.sp-contact #contactShell :is(#contactBooking, #quickSubmit).sonder-foil-cta:is(:disabled, [aria-disabled="true"]) {
    color: GrayText;
    border-color: GrayText;
  }
}
