@charset "UTF-8";

body.chat-pending #form .bg-form {
  visibility: hidden;
  min-height: 420px;
}

body.chat-ready #form .bg-form {
  visibility: visible;
}

#form .bg-form.chat-embed-ready {
  padding: 18px;
}

.chat-embed-shell {
  display: grid;
  gap: 14px;
}

.chat-embed-hero {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #16356f, #264f9d);
  color: #fff;
}

.chat-embed-hero strong {
  display: block;
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.chat-embed-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.6;
}

.chat-embed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chat-embed-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.chat-embed-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f4f7ff;
  color: #162962;
  font-size: 14px;
  line-height: 1.6;
}

.chat-embed-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  padding-right: 4px;
  overflow-y: auto;
}

.chat-embed-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-embed-row.user {
  align-items: flex-end;
}

.chat-embed-meta {
  color: #5b6474;
  font-size: 11px;
}

.chat-embed-bubble {
  max-width: 86%;
  padding: 13px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-embed-row.bot .chat-embed-bubble {
  background: #eef3ff;
  color: #162962;
  border-bottom-left-radius: 8px;
}

.chat-embed-row.user .chat-embed-bubble {
  background: #162962;
  color: #fff;
  border-bottom-right-radius: 8px;
}

.chat-embed-quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chat-embed-quick::-webkit-scrollbar {
  display: none;
}

.chat-embed-quick button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d7def0;
  border-radius: 999px;
  background: #fff;
  color: #162962;
  font-size: 13px;
  font-weight: 600;
}

.chat-embed-actions {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #f8f8f8;
}

.chat-embed-continue,
.chat-embed-install {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
}

.chat-embed-continue {
  background: #162962;
  color: #fff;
}

.chat-embed-install {
  background: #fbb220;
  color: #162962;
}

.chat-embed-continue:disabled,
.chat-embed-install:disabled {
  opacity: 0.55;
}

.chat-embed-install-note {
  margin: 0;
  color: #636d80;
  font-size: 13px;
  line-height: 1.6;
}

.chat-embed-error {
  min-height: 20px;
  margin: 0;
  color: #da2f1b;
  font-size: 12px;
  font-weight: 600;
}

.chat-embed-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chat-embed-composer input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d7def0;
  border-radius: 14px;
  color: #162962;
  font-size: 14px;
}

.chat-embed-composer input:focus {
  outline: none;
  border-color: #4262ff;
  box-shadow: 0 0 0 4px rgba(66, 98, 255, 0.12);
}

.chat-embed-composer input:disabled {
  background: #f3f5f7;
  color: #8a93a6;
}

.chat-embed-send {
  min-width: 84px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: #fbb220;
  color: #162962;
  font-size: 15px;
  font-weight: 700;
}

.chat-embed-send:disabled {
  opacity: 0.55;
}

@media screen and (max-width: 768px) {
  .chat-embed-composer {
    grid-template-columns: 1fr;
  }

  .chat-embed-send {
    width: 100%;
  }

  .chat-embed-bubble {
    max-width: 92%;
  }
}
