/* Конструктор ботов - Hero. Макет: Figma 8689:93616 (desktop), 9204:30920 (tablet), 9204:31733 (mobile). */
.cgb-bot-hero {
  background-color: #f3f3f3;
  padding: 30px 0 46px;
  box-sizing: border-box;
  font-family: "Inter", Arial, sans-serif;
  color: #131313;
  overflow: hidden;
}
.cgb-bot-hero *,
.cgb-bot-hero *::before,
.cgb-bot-hero *::after {
  box-sizing: border-box;
}
.cgb-bot-hero .cgb-bot-hero__container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ── Заголовок и текст ─────────────────────────────────────────────────── */
.cgb-bot-hero .cgb-bot-hero__title {
  width: 100%;
  margin: 0 0 30px;
  padding: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.08em;
  text-align: center;
  text-transform: none;
  color: #131313;
}
.cgb-bot-hero .cgb-bot-hero__desc {
  display: block;
  width: 100%;
  max-width: 852px;
  margin: 0 auto 30px;
  padding: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.08em;
  text-align: center;
  color: rgba(19, 19, 19, 0.7);
}
.cgb-bot-hero .cgb-bot-hero__desc--wide {
  display: none;
}

/* ── Кнопка с бейджем ──────────────────────────────────────────────────── */
.cgb-bot-hero .cgb-bot-hero__btn-wrap {
  position: relative;
  display: flex;
  width: 100%;
}
.cgb-bot-hero .cgb-bot-hero__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 12px 20px;
  border: 1px solid #0389cb;
  border-radius: 5px;
  background-color: #0389cb;
  font-family: "Inter", Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.05em;
  text-align: center;
  text-decoration: none;
  color: #fff;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}
.cgb-bot-hero .cgb-bot-hero__btn:hover,
.cgb-bot-hero .cgb-bot-hero__btn:focus-visible {
  background-color: #0270a7;
  border-color: #0270a7;
  color: #fff;
}
.cgb-bot-hero .cgb-bot-hero__badge {
  position: absolute;
  top: -10px;
  right: 18px;
  padding: 6px 10px;
  border-radius: 1000px;
  background-color: #7dde92;
  font-family: "Inter", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: #fff;
  pointer-events: none;
  transform: rotate(-8deg);
}

/* ── Чат-виджет ────────────────────────────────────────────────────────── */
.cgb-bot-hero .cgb-bot-hero__widget {
  width: 100%;
  max-width: 665px;
  margin: 30px auto 0;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 9px 28px 8px rgba(0, 0, 0, 0.05), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: left;
  font-family: "Inter", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0;
  color: #121315;
  -webkit-user-select: none;
  user-select: none;
}
.cgb-bot-hero .cgb-bot-hero__w-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px;
  background-color: #0389cb;
  box-shadow: 0 2px 4px rgba(0, 35, 11, 0.2);
}
.cgb-bot-hero .cgb-bot-hero__w-head-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.cgb-bot-hero .cgb-bot-hero__w-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cgb-bot-hero .cgb-bot-hero__w-status {
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cgb-bot-hero .cgb-bot-hero__w-close {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}
.cgb-bot-hero .cgb-bot-hero__w-close svg,
.cgb-bot-hero .cgb-bot-hero__w-attach svg,
.cgb-bot-hero .cgb-bot-hero__w-send svg {
  display: block;
}

.cgb-bot-hero .cgb-bot-hero__w-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 12px 0;
}
.cgb-bot-hero .cgb-bot-hero__w-msg {
  display: flex;
  gap: 8px;
}
.cgb-bot-hero .cgb-bot-hero__w-msg--bot {
  align-items: flex-end;
  width: 100%;
  max-width: 432px;
}
.cgb-bot-hero .cgb-bot-hero__w-avatar {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  max-width: none;
  margin: 0;
  border-radius: 50%;
}
.cgb-bot-hero .cgb-bot-hero__w-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.cgb-bot-hero .cgb-bot-hero__w-sender {
  padding-left: 4px;
  font-size: 12px;
  line-height: 16px;
  color: rgba(18, 19, 21, 0.5);
}
.cgb-bot-hero .cgb-bot-hero__w-bubble {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: #f7f8fa;
  font-size: 14px;
  line-height: 22px;
  color: #121315;
  overflow-wrap: anywhere;
}
.cgb-bot-hero .cgb-bot-hero__w-msg--user {
  justify-content: flex-end;
  padding-left: 40px;
}
.cgb-bot-hero .cgb-bot-hero__w-msg--user .cgb-bot-hero__w-bubble {
  background-color: #0389cb;
  color: #fff;
}
.cgb-bot-hero .cgb-bot-hero__w-time {
  align-self: flex-end;
  font-size: 12px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.5);
}
.cgb-bot-hero .cgb-bot-hero__w-quick {
  display: flex;
  gap: 8px;
}
.cgb-bot-hero .cgb-bot-hero__w-quick-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 11px;
  border: 1px solid #0389cb;
  border-radius: 10px;
  font-size: 14px;
  line-height: 17px;
  letter-spacing: -0.04em;
  text-align: center;
  color: #0389cb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cgb-bot-hero .cgb-bot-hero__w-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px 16px;
}
.cgb-bot-hero .cgb-bot-hero__w-input {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 48px;
  padding: 8px 8px 8px 16px;
  border-radius: 14px;
  background-color: #fff;
  box-shadow: 0 9px 28px 8px rgba(0, 0, 0, 0.05), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.08);
}
.cgb-bot-hero .cgb-bot-hero__w-attach {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}
.cgb-bot-hero .cgb-bot-hero__w-placeholder {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 22px;
  color: rgba(18, 19, 21, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cgb-bot-hero .cgb-bot-hero__w-send {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #0389cb;
}
.cgb-bot-hero .cgb-bot-hero__w-powered {
  display: block;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 99px;
  background-color: #ebedf0;
  font-size: 8px;
  font-weight: 600;
  line-height: 5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(18, 19, 21, 0.5);
}
.cgb-bot-hero .cgb-bot-hero__w-powered b {
  font-weight: 600;
  color: #5a7af4;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .cgb-bot-hero .cgb-bot-hero__w-powered b {
    background-image: linear-gradient(90deg, #5797ef 0%, #5b5df9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* ── Планшет (макет 768) ───────────────────────────────────────────────── */
@media (min-width: 768px) {
  .cgb-bot-hero {
    padding: 50px 0 48px;
  }
  .cgb-bot-hero .cgb-bot-hero__title {
    margin-bottom: 60px;
    font-size: 56px;
  }
  .cgb-bot-hero .cgb-bot-hero__desc {
    font-size: 24px;
    line-height: 1.05;
  }
  .cgb-bot-hero .cgb-bot-hero__desc--wide {
    display: block;
  }
  .cgb-bot-hero .cgb-bot-hero__desc--narrow {
    display: none;
  }
  .cgb-bot-hero .cgb-bot-hero__btn-wrap {
    width: 328px;
    max-width: 100%;
  }
  .cgb-bot-hero .cgb-bot-hero__btn {
    min-height: 64px;
  }
  .cgb-bot-hero .cgb-bot-hero__badge {
    right: -7px;
  }
  .cgb-bot-hero .cgb-bot-hero__widget {
    margin-top: 50px;
    border-radius: 24px;
  }
  .cgb-bot-hero .cgb-bot-hero__w-head {
    padding: 20px 24px;
  }
  .cgb-bot-hero .cgb-bot-hero__w-body {
    padding: 16px 16px 0;
  }
}

/* ── Десктоп (макет 1440) ──────────────────────────────────────────────── */
@media (min-width: 1200px) {
  .cgb-bot-hero {
    padding: 50px 0 68px;
  }
  .cgb-bot-hero .cgb-bot-hero__container {
    padding: 0 50px;
  }
  .cgb-bot-hero .cgb-bot-hero__title {
    margin-bottom: 50px;
    font-size: min(84px, 5.8333vw);
  }
  .cgb-bot-hero .cgb-bot-hero__desc {
    letter-spacing: -0.06em;
  }
  .cgb-bot-hero .cgb-bot-hero__widget {
    margin-top: 30px;
  }
}
