:host {
  all: initial;
}

.launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #111827;
  box-shadow: 0 14px 38px #11182740;
  color: #fff;
  cursor: pointer;
  font: 700 24px system-ui;
  transition: transform 0.18s ease;
}

.launcher:hover {
  transform: translateY(-2px);
}

.launcher:focus-visible {
  outline: 3px solid #818cf8;
  outline-offset: 3px;
}

.launcher[data-open="true"] {
  transform: scale(0.92);
}

.panel {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 2147482999;
  width: min(390px, calc(100vw - 24px));
  height: min(680px, calc(100dvh - 110px));
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px #11182738;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.panel[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

:host([data-position="left"]) .launcher,
:host([data-position="left"]) .panel {
  right: auto;
  left: 20px;
}

:host([data-mode="full"]) .launcher {
  display: none;
}

:host([data-mode="full"]) .panel {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

@media (max-width: 520px) {
  .panel {
    inset: 8px;
    width: auto;
    height: auto;
    border-radius: 18px;
  }

  .launcher {
    right: 16px;
    bottom: 16px;
  }

  :host([data-position="left"]) .launcher {
    right: auto;
    left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launcher,
  .panel {
    transition: none;
  }
}
