.youanai-website-buddy {
  --ywb-brand: #b5121b;
  --ywb-brand-deep: #870f18;
  --ywb-navy: #102a5c;
  --ywb-border: rgba(16, 42, 92, 0.14);
  --ywb-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: fixed;
  z-index: 2147483000;
}

.youanai-website-buddy--bottom-right {
  right: max(18px, env(safe-area-inset-right));
}

.youanai-website-buddy--bottom-left {
  left: max(18px, env(safe-area-inset-left));
}

.youanai-website-buddy *,
.youanai-website-buddy *::before,
.youanai-website-buddy *::after {
  box-sizing: border-box;
}

.youanai-website-buddy__launcher,
.youanai-website-buddy__close {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.youanai-website-buddy__launcher {
  align-items: center;
  align-self: flex-end;
  background: var(--ywb-brand);
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(181, 18, 27, 0.3);
  color: #fff;
  display: inline-flex;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 750;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px 0 16px;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.youanai-website-buddy__launcher:hover,
.youanai-website-buddy__launcher:focus-visible {
  background: var(--ywb-brand-deep);
  box-shadow: 0 18px 42px rgba(181, 18, 27, 0.36);
  outline: 0;
  transform: translateY(-1px);
}

.youanai-website-buddy__launcher-logo {
  display: block;
  flex: 0 0 auto;
  height: 22px;
  object-fit: contain;
  width: 22px;
}

.youanai-website-buddy__panel {
  background: #fff;
  border: 1px solid var(--ywb-border);
  border-radius: 14px;
  box-shadow: var(--ywb-shadow);
  display: flex;
  flex-direction: column;
  height: min(680px, calc(100vh - 112px));
  overflow: hidden;
  transform-origin: bottom right;
  width: min(420px, calc(100vw - 36px));
}

.youanai-website-buddy--bottom-left .youanai-website-buddy__panel {
  transform-origin: bottom left;
}

.youanai-website-buddy__panel[hidden] {
  display: none;
}

.youanai-website-buddy__header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--ywb-border);
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 12px 10px 16px;
}

.youanai-website-buddy__title-wrap {
  min-width: 0;
}

.youanai-website-buddy__title,
.youanai-website-buddy__subtitle {
  margin: 0;
}

.youanai-website-buddy__title {
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.youanai-website-buddy__subtitle {
  color: #62666f;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 2px;
}

.youanai-website-buddy__close {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ywb-border);
  border-radius: 10px;
  color: var(--ywb-navy);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  margin-left: 12px;
  transition:
    border-color 160ms ease,
    color 160ms ease;
  width: 38px;
}

.youanai-website-buddy__close:hover,
.youanai-website-buddy__close:focus-visible {
  border-color: var(--ywb-brand);
  color: var(--ywb-brand);
  outline: 0;
}

.youanai-website-buddy__close svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.youanai-website-buddy__iframe {
  border: 0;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

@media (max-width: 520px) {
  .youanai-website-buddy {
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
  }

  .youanai-website-buddy__launcher {
    align-self: flex-end;
    min-height: 52px;
  }

  .youanai-website-buddy__panel {
    border-radius: 14px;
    height: min(720px, calc(100vh - 88px));
    width: 100%;
  }

  .youanai-website-buddy-is-open {
    overflow: hidden;
  }
}
