/* ПРОВОДНИК БЛАГОПОЛУЧИЯ: full chat widget v1 */

.wbp-chat-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  border: 1px solid rgba(214,168,79,.38);
  border-radius: 999px;
  padding: 12px 16px;
  background: #6b4f2a;
  color: #fff;
  font: 800 15px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 18px 42px rgba(20, 15, 10, .28);
  cursor: pointer;
}

.wbp-chat-launcher:hover {
  filter: brightness(1.08);
}

.wbp-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(460px, calc(100vw - 28px));
  height: min(720px, calc(100vh - 36px));
  z-index: 99991;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(214,168,79,.26);
  border-radius: 22px;
  background: #fffaf1;
  color: #20242a;
  box-shadow: 0 22px 56px rgba(20, 15, 10, .30);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wbp-chat-panel[hidden] {
  display: none;
}

.wbp-chat-head {
  padding: 13px 14px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  background: #f1e2c8;
  border-bottom: 1px solid rgba(107,79,42,.18);
}

.wbp-chat-title {
  font-weight: 900;
  line-height: 1.15;
}

.wbp-chat-subtitle {
  margin-top: 3px;
  color: #69717d;
  font-size: 12px;
}

.wbp-chat-close {
  border: 0;
  border-radius: 10px;
  padding: 7px 10px;
  background: rgba(255,255,255,.7);
  color: #20242a;
  font-weight: 900;
  cursor: pointer;
}

.wbp-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #fbf3e4, #fffaf1);
}

.wbp-chat-msg {
  max-width: 95%;
  padding: 10px 11px;
  border: 1px solid rgba(107,79,42,.15);
  border-radius: 16px;
  background: rgba(255,255,255,.74);
  line-height: 1.45;
}

.wbp-chat-msg.user {
  align-self: flex-end;
  background: #e8f1ff;
  border-color: #c9d9ed;
}

.wbp-chat-msg.bot {
  align-self: flex-start;
}

.wbp-chat-role {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 900;
  color: #6b4f2a;
}

.wbp-chat-msg.user .wbp-chat-role {
  color: #2c557f;
}

.wbp-chat-content p {
  margin: 0 0 8px;
}

.wbp-chat-content p:last-child {
  margin-bottom: 0;
}

.wbp-chat-content ul {
  margin: 7px 0 0 18px;
  padding: 0;
}

.wbp-chat-content li {
  margin: 4px 0;
}

.wbp-chat-sources {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed rgba(107,79,42,.22);
  color: #56616f;
  font-size: 13px;
}

.wbp-chat-sources a {
  color: #2e684f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wbp-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.wbp-chat-chip {
  border: 1px solid rgba(107,79,42,.20);
  border-radius: 999px;
  padding: 7px 9px;
  background: #fffdf8;
  color: #6b4f2a;
  font: 700 12px system-ui, sans-serif;
  cursor: pointer;
}

.wbp-chat-input {
  border-top: 1px solid rgba(107,79,42,.18);
  padding: 10px;
  background: #fffdf8;
}

.wbp-chat-input textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  max-height: 150px;
  resize: vertical;
  border: 1px solid rgba(107,79,42,.22);
  border-radius: 14px;
  padding: 10px 11px;
  background: #fff;
  color: #20242a;
  font: inherit;
}

.wbp-chat-controls {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.wbp-chat-status {
  font-size: 12px;
  color: #68717d;
}

.wbp-chat-send {
  border: 0;
  border-radius: 12px;
  padding: 9px 14px;
  background: #6b4f2a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.wbp-chat-send:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .wbp-chat-launcher {
    right: 12px;
    bottom: 12px;
    padding: 11px 14px;
    font-size: 14px;
  }

  .wbp-chat-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    height: min(78vh, 680px);
    border-radius: 18px;
  }

  .wbp-chat-body {
    padding: 10px;
  }

  .wbp-chat-msg {
    max-width: 98%;
  }

  .wbp-chat-controls {
    align-items: stretch;
    flex-direction: column;
  }

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