/*
 * Chat button for the Totebot AI assistant: same place, size and colours as Totebot's own launcher
 * (chatBubbleButtonColor #135a5b, icon #e7eeee, 55px, bottom right), so the shop looks the same until it loads.
 */
#bp-chat {
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
}

/* While the cookie banner is open the visitor answers it first; the button appears right after. */
html.bpc-open #bp-chat,
#bp-chat [hidden] {
  display: none !important;
}

#bp-chat .bp-chat-button {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 2147482000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  margin: 0;
  padding: 0;
  color: #e7eeee;
  background: #135a5b;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
  cursor: pointer;
}

/* Two-tone ring: the shop's footer behind the button is the same teal as the button itself. */
#bp-chat .bp-chat-button:focus-visible,
#bp-chat button:focus-visible,
#bp-chat a:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #7a4fa3;
}

#bp-chat .bp-chat-notice .bp-chat-error {
  font-weight: 700;
  color: #9a3412;
}

#bp-chat[data-state='loading'] .bp-chat-button {
  opacity: 0.6;
  cursor: progress;
}

#bp-chat .bp-chat-greeting,
#bp-chat .bp-chat-notice {
  position: fixed;
  right: 20px;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 2147482000;
  color: #1d2a2e;
  background: #ffffff;
  border: 1px solid #e3e9ea;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.15);
}

#bp-chat .bp-chat-greeting {
  display: flex;
  align-items: flex-start;
  max-width: 300px;
}

#bp-chat .bp-chat-greeting-open {
  flex: 1;
  margin: 0;
  padding: 12px 4px 12px 16px;
  font: inherit;
  font-size: 15px;
  text-align: left;
  text-transform: none;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}

#bp-chat .bp-chat-greeting-close {
  flex: none;
  width: 36px;
  height: 36px;
  margin: 4px 4px 0 0;
  padding: 0;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  color: #56666b;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
}

#bp-chat .bp-chat-notice {
  width: min(340px, calc(100vw - 40px));
  padding: 16px;
}

#bp-chat .bp-chat-notice p {
  margin: 0 0 10px;
  padding: 0;
  font-size: 14px;
  color: #1d2a2e;
}

#bp-chat .bp-chat-title {
  font-size: 16px;
  font-weight: 800;
  color: #083f49;
}

#bp-chat .bp-chat-notice a {
  color: #0b5e6e;
  font-weight: 600;
  text-decoration: underline;
}

#bp-chat .bp-chat-start {
  width: 100%;
  min-height: 44px;
  margin: 4px 0 0;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: #ffffff;
  background: #135a5b;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
}

#bp-chat .bp-chat-start:hover {
  background: #083f49;
}

@media print {
  #bp-chat {
    display: none !important;
  }
}
