/* Shared by the installation script, the home page and the merchant preview. */
.ys-launch[data-color='ocean'],
[data-ys-color='ocean'] {
  --ys-accent: #205bd6;
}
.ys-launch[data-color='jade'],
[data-ys-color='jade'] {
  --ys-accent: #116755;
}
.ys-launch[data-color='plum'],
[data-ys-color='plum'] {
  --ys-accent: #70439c;
}
.ys-launch[data-color='clay'],
[data-ys-color='clay'] {
  --ys-accent: #a14a33;
}
button.ys-launch {
  position: relative;
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 0;
  border-radius: 99px;
  padding: 0 17px;
  margin: 0;
  background: var(--ys-accent, #205bd6);
  color: #fff;
  font:
    600 14px/1.25 system-ui,
    'Microsoft YaHei',
    sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 17px #1b355f30;
  text-align: start;
  user-select: none;
}
.ys-badge {
  box-sizing: border-box;
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  background: #b92242;
  color: white;
  border: 2px solid white;
  border-radius: 12px;
  font:
    700 10px/15px system-ui,
    sans-serif;
  text-align: center;
  pointer-events: none;
}
button.ys-launch:focus-visible {
  outline: 3px solid #72a4ff;
  outline-offset: 3px;
}
button.ys-launch:hover {
  filter: brightness(1.08);
}
.ys-launch svg {
  width: 21px;
  height: 21px;
  flex: none;
}
.ys-launch small {
  display: none;
}
.ys-launch[data-kind='orb'] {
  width: 49px;
  height: 49px;
  min-height: 49px;
  border-radius: 50%;
  padding: 0;
}
.ys-launch[data-kind='orb'] .ys-label {
  display: none;
}
.ys-launch[data-kind='card'] {
  border-radius: 13px;
  padding: 9px 17px 9px 11px;
  background: light-dark(#fff, #202124);
  color: light-dark(var(--ys-accent), #f1f2f4);
  border: 1px solid color-mix(in srgb, var(--ys-accent) 27%, white);
}
.ys-launch[data-kind='card'] svg {
  box-sizing: content-box;
  padding: 7px;
  background: light-dark(color-mix(in srgb, var(--ys-accent) 9%, white), #303434);
  border-radius: 9px;
}
.ys-launch[data-kind='card'] small {
  display: block;
  font: 600 9px/1.7 system-ui;
  letter-spacing: 0.12em;
  color: light-dark(#5f6977, #a5acb7);
}
.ys-launch[data-kind='tab'] {
  flex-direction: column;
  gap: 7px;
  width: 36px;
  border-radius: 12px;
  padding: 11px 4px;
}
.ys-launch[data-kind='tab'] .ys-label {
  writing-mode: vertical-rl;
  font-size: 12px;
  letter-spacing: 0.13em;
}
.ys-launch[data-kind='tab'] svg {
  width: 17px;
  height: 17px;
}

.ys-launch[data-layout='midnight'][aria-expanded='true'] {
  width: 49px;
  height: 49px;
  min-height: 49px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #d5d6d8;
  color: #17191d;
  background: #fff;
}
.ys-launch[data-layout='midnight'][aria-expanded='true'] .ys-label {
  display: none;
}
.ys-launch[data-layout='midnight'][aria-expanded='true'] svg {
  width: 23px;
  height: 23px;
  padding: 0;
  background: none;
}
.ys-frame {
  width: min(400px, calc(100vw - 40px));
  height: min(590px, calc(100dvh - 155px));
  border: 1px solid light-dark(#bbc3bd, #505552);
  border-radius: 15px;
  background: light-dark(#fff, #202124);
  box-shadow: 0 12px 40px #21468126;
}
.ys-frame[data-layout='midnight'] {
  box-sizing: border-box;
  width: min(400px, calc(100vw - 28px));
  height: min(704px, calc(100dvh - 92px - env(safe-area-inset-bottom)));
  border: 1px solid #383a3e;
  border-radius: 24px;
  background: #141519;
  color-scheme: dark;
}

/* Animate only idle, collapsed launchers on devices that allow motion. */
@media (prefers-reduced-motion: no-preference) {
  .ys-launch[aria-expanded='false']:not(:hover, :focus-visible)[data-motion='pulse'] {
    animation: ys-pulse 3.6s ease-out infinite;
  }
  .ys-launch[aria-expanded='false']:not(:hover, :focus-visible)[data-motion='float'] {
    animation: ys-float 3.8s ease-in-out infinite;
  }
  .ys-launch[aria-expanded='false']:not(:hover, :focus-visible)[data-motion='sway'] svg {
    animation: ys-sway 4.2s ease-in-out infinite;
  }
}
@keyframes ys-pulse {
  0%,
  65%,
  100% {
    box-shadow:
      0 4px 17px #1b355f30,
      0 0 0 0 transparent;
  }
  15% {
    box-shadow:
      0 4px 17px #1b355f30,
      0 0 0 1px color-mix(in srgb, var(--ys-accent) 27%, transparent);
  }
  55% {
    box-shadow:
      0 4px 17px #1b355f30,
      0 0 0 8px transparent;
  }
}
@keyframes ys-float {
  0%,
  65%,
  100% {
    translate: 0 0;
  }
  32% {
    translate: 0 -3px;
  }
}
@keyframes ys-sway {
  0%,
  30%,
  100% {
    rotate: 0deg;
  }
  9% {
    rotate: -9deg;
  }
  20% {
    rotate: 7deg;
  }
}
