.lab-home__ai-dock {
  --lh-black: #253746;
  --lh-white: #fff;
  --lh-gray: #f6f6f6;
  --ai-bottom: 104px;
  --ai-fab: 64px;
  --ai-gap: 16px;
  --ai-top: 12px;
  position: fixed;
  right: 28px;
  bottom: var(--ai-bottom);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--ai-gap);
  max-width: calc(100vw - 24px);
  color: var(--lh-black);
  font-family: "TT Hoves", sans-serif;
}

.lab-home__ai-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
  width: var(--ai-fab);
  height: var(--ai-fab);
  padding: 0;
  overflow: hidden;
  background: #253746;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 24px rgb(0 0 0 / 0.12);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lab-home__ai-fab img {
  display: block;
  width: 22px;
  height: 22px;
  max-width: none;
  pointer-events: none;
}

.lab-home__ai-widget {
  display: none !important;
  flex-direction: column;
  box-sizing: border-box;
  width: min(495px, 100%);
  max-width: 100%;
  max-height: calc(100vh - var(--ai-bottom) - var(--ai-fab) - var(--ai-gap) - var(--ai-top));
  max-height: calc(100dvh - var(--ai-bottom) - var(--ai-fab) - var(--ai-gap) - var(--ai-top));
  margin: 0;
  padding: 0 0 32px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--lh-white);
  border-radius: 24px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.15);
}

.lab-home__ai-dock.is-open .lab-home__ai-widget {
  display: flex !important;
}

.lab-home__ai-widget-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 32px 40px 0 32px;
  background: var(--lh-white);
  border-radius: 24px 24px 0 0;
}

.lab-home__ai-widget-head p {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.167;
}

.lab-home__ai-widget-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #e9ebed;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.lab-home__ai-widget-close img {
  display: block;
  width: 16px;
  height: 16px;
}

.lab-home__ai-bubble {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px 24px 0;
  padding: 24px;
  background: var(--lh-gray);
  border-radius: 24px;
}

.lab-home__ai-msg {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.lab-home__ai-avatar {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.lab-home__ai-msg p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.222;
}

.lab-home__ai-features {
  display: flex;
  flex-flow: row wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-home__ai-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
}

.lab-home__ai-features li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--lh-black);
  border-radius: 5px;
}

.lab-home__ai-choose {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.222;
}

.lab-home__ai-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lab-home__ai-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  background: var(--lh-black);
  border-radius: 99px;
  color: var(--lh-white);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

@media (max-width: 1312px) {
  .lab-home__ai-dock {
    --ai-bottom: 96px;
    --ai-fab: 56px;
  }

  .lab-home__ai-fab img {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 767.98px) {
  .lab-home__ai-dock {
    --ai-bottom: 84px;
    --ai-gap: 12px;
    --ai-top: 8px;
    right: 8px;
    left: 8px;
    align-items: stretch;
    max-width: none;
  }

  .lab-home__ai-fab {
    align-self: flex-end;
  }

  .lab-home__ai-widget {
    width: 100%;
    max-width: none;
    padding-bottom: 16px;
    border-radius: 20px;
  }

  .lab-home__ai-widget-head {
    padding: 16px 12px 0 16px;
  }

  .lab-home__ai-widget-head p {
    font-size: 18px;
  }

  .lab-home__ai-bubble {
    gap: 12px;
    margin: 12px 12px 0;
    padding: 14px;
    border-radius: 16px;
  }

  .lab-home__ai-avatar {
    width: 44px;
    height: 44px;
  }

  .lab-home__ai-msg {
    gap: 10px;
  }

  .lab-home__ai-msg p,
  .lab-home__ai-choose {
    font-size: 15px;
  }

  .lab-home__ai-features {
    gap: 8px 12px;
  }

  .lab-home__ai-features li {
    font-size: 14px;
  }

  .lab-home__ai-links {
    flex-direction: row;
  }

  .lab-home__ai-links a {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 8px;
    font-size: 14px;
  }
}

@media (max-height: 820px) {
  .lab-home__ai-dock {
    --ai-top: 8px;
  }

  .lab-home__ai-widget {
    padding-bottom: 16px;
  }

  .lab-home__ai-widget-head {
    padding-top: 16px;
  }

  .lab-home__ai-widget-head p {
    font-size: 18px;
  }

  .lab-home__ai-bubble {
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
  }

  .lab-home__ai-links {
    flex-direction: row;
  }

  .lab-home__ai-links a {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 10px;
  }
}
