@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap");

/* =========================================================
   ROBOTO FONT — COMPLETE CHAT WIDGET
   ========================================================= */

.sb-main.sb-chat,
.sb-main.sb-chat * {
  font-family: "Roboto", Arial, sans-serif !important;
}


/* =========================================================
   CHAT LAUNCHER
   Circle: 45px
   Icon: 28px
   ========================================================= */

.sb-main.sb-chat > .sb-chat-btn {
  width: 45px !important;
  height: 45px !important;
}


/* Smaller, centered chat icon */
.sb-main.sb-chat > .sb-chat-btn .sb-icon {
  position: absolute !important;

  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;

  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;

  object-fit: contain !important;

  transform: translate(-50%, -50%) !important;
  transform-origin: center !important;
}


/* Keep the close icon correctly sized */
.sb-main.sb-chat > .sb-chat-btn .sb-close {
  width: 45px !important;
  height: 45px !important;
}


/* =========================================================
   COMPLETE OUTER CHAT POPUP
   ========================================================= */

.sb-main.sb-chat > .sb-body {
  border-radius: 3px !important;
  overflow: hidden !important;
}


/* =========================================================
   GREETING POP-UP — COMPACT NOTIFICATION CARD
   Avatar on the left, message, name line, close X on the right.
   To change the avatar or name line, edit the two marked
   values in the ::before and ::after rules below.
   ========================================================= */

.sb-chat .sb-popup-message {
  position: absolute !important;

  width: 340px !important;
  max-width: calc(100vw - 30px) !important;
  min-height: 68px !important;

  margin: 0 !important;
  padding: 14px 44px 14px 68px !important;

  background: rgb(255, 255, 255) !important;
  color: rgb(17, 17, 17) !important;

  border: 1px solid rgb(17, 17, 17) !important;
  border-radius: 3px !important;
  box-shadow: rgb(17, 17, 17) 2px 2px 0 !important;

  box-sizing: border-box !important;
  overflow: visible !important;
  cursor: pointer !important;

  font-family: "Roboto", Arial, sans-serif !important;
  text-align: left !important;

  animation: clPopupIn 400ms cubic-bezier(0.2, 0.8, 0.2, 1) both !important;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease !important;
}

.sb-chat .sb-popup-message:hover {
  transform: translate(-1px, -1px) !important;
  box-shadow: rgb(17, 17, 17) 3px 3px 0 !important;
}


/* Avatar (replaces the old speech-bubble tail outline) */
.sb-chat .sb-popup-message::before {
  content: "" !important;
  display: block !important;

  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;

  width: 40px !important;
  height: 40px !important;

  /* AVATAR IMAGE — change this URL to use a different picture */
  background: rgb(17, 17, 17) url("https://support.clientility.com/supportboard/uploads/23-09-26/39101657354_SBUID5_robot-2.png") center / 24px 24px no-repeat !important;

  border: 0 !important;
  border-radius: 50% !important;
  filter: none !important;
  clip-path: none !important;

  transform: translateY(-50%) !important;
  z-index: 2 !important;
}


/* Name line under the message (replaces the old white tail) */
.sb-chat .sb-popup-message::after {
  /* NAME LINE — change this text if needed */
  content: "Clientility Assist \00B7  Just now" !important;
  display: block !important;

  position: static !important;
  width: auto !important;
  height: auto !important;

  margin-top: 4px !important;

  background: none !important;
  border: 0 !important;
  filter: none !important;
  clip-path: none !important;
  transform: none !important;

  color: rgb(122, 122, 122) !important;
  font-family: "Roboto", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;

  z-index: 2 !important;
}


/* Title and message sit on one line, like "Hi there! 👋 How can I help you today?" */
.sb-chat .sb-popup-message .sb-top,
.sb-chat .sb-popup-message .sb-text {
  display: inline !important;
  position: relative !important;
  z-index: 2 !important;

  margin: 0 !important;
  padding: 0 !important;

  color: rgb(17, 17, 17) !important;
  font-family: "Roboto", Arial, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}

.sb-chat .sb-popup-message .sb-top {
  font-weight: 500 !important;
}

.sb-chat .sb-popup-message .sb-top::after {
  content: " " !important;
}

.sb-chat .sb-popup-message .sb-text {
  font-weight: 400 !important;
}


/* Close X on the right, vertically centered */
.sb-chat .sb-popup-message .sb-icon-close {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  left: auto !important;
  bottom: auto !important;

  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  margin: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  color: rgb(122, 122, 122) !important;
  font-size: 14px !important;

  transform: translateY(-50%) !important;
  cursor: pointer !important;
  z-index: 3 !important;

  transition: color 200ms ease !important;
}

.sb-chat .sb-popup-message .sb-icon-close:hover {
  color: rgb(17, 17, 17) !important;
}


/* Mobile: full-width card with 15px side margins, above the launcher */
@media (max-width: 767px) {
  .sb-chat .sb-popup-message {
    position: fixed !important;
    left: 15px !important;
    right: 15px !important;
    bottom: 80px !important;
    top: auto !important;

    width: auto !important;
    max-width: none !important;
  }
}


@keyframes clPopupIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   CHAT HEADER
   ========================================================= */

.sb-chat .sb-header.sb-header-main,
.sb-chat .sb-header.sb-header-type-agents {
  border-radius: 3px 3px 0 0 !important;
}


/* =========================================================
   CHAT BODY AND CONVERSATION BACKGROUND
   ========================================================= */

.sb-chat .sb-scroll-area.sb-texture-3 {
  border-radius: 0 0 3px 3px !important;
  background-color: #fffaf3 !important;
}


/* Keep the message list transparent so the cream background shows */
.sb-chat .sb-scroll-area.sb-texture-3 > .sb-list,
.sb-chat .sb-scroll-area.sb-texture-3 .sb-list.sb-active {
  background-color: transparent !important;
}


/* Dashboard background */
.sb-chat .sb-dashboard.sb-active {
  background-color: #fffaf3 !important;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.sb-chat .sb-dashboard.sb-active {
  border-radius: 3px !important;
  overflow: hidden !important;
}

.sb-chat .sb-dashboard.sb-active .sb-dashboard-conversations {
  border-radius: 3px !important;
  overflow: hidden !important;
}

.sb-chat .sb-dashboard.sb-active > div {
  border-radius: 3px !important;
}

.sb-chat .sb-dashboard.sb-active [class*="sb-dashboard-"] {
  border-radius: 3px !important;
}


/* =========================================================
   ARTICLES AND KNOWLEDGE BASE
   ========================================================= */

.sb-chat .sb-dashboard.sb-active .sb-articles,
.sb-chat .sb-dashboard.sb-active .sb-articles-container,
.sb-chat .sb-dashboard.sb-active .sb-articles-box,
.sb-chat .sb-dashboard.sb-active .sb-articles-area {
  border-radius: 3px !important;
  overflow: hidden !important;
}


/* “Find an answer yourself” heading */
.sb-chat .sb-dashboard .sb-dashboard-articles > .sb-title {
  color: rgb(52, 52, 52) !important;
  font-family: "Roboto", Arial, sans-serif !important;
}


/* =========================================================
   DASHBOARD INPUTS AND SEARCH FIELDS
   ========================================================= */

.sb-chat .sb-dashboard input,
.sb-chat .sb-dashboard textarea,
.sb-chat .sb-dashboard select,
.sb-chat .sb-dashboard .sb-input,
.sb-chat .sb-dashboard .sb-search {
  border-radius: 3px !important;
  font-family: "Roboto", Arial, sans-serif !important;
}


/* =========================================================
   SEARCH BUTTON
   ========================================================= */

.sb-chat .sb-dashboard .sb-search-btn {
  border-radius: 0 3px 3px 0 !important;
}


/* =========================================================
   NEW CONVERSATION BUTTON — DEFAULT
   ========================================================= */

.sb-chat .sb-dashboard .sb-btn-new-conversation {
  margin: 20px auto !important;

  background: rgb(252, 82, 29) !important;
  color: rgb(255, 255, 255) !important;

  border: 1px solid rgb(17, 17, 17) !important;
  border-radius: 3px !important;

  box-shadow: rgb(17, 17, 17) 2px 2px 0 !important;

  font-family: "Roboto", Arial, sans-serif !important;
  font-weight: 700 !important;

  transition:
    background-color 300ms,
    color 300ms !important;
}


/* =========================================================
   NEW CONVERSATION BUTTON — HOVER
   ========================================================= */

.sb-chat .sb-dashboard .sb-btn-new-conversation:hover,
.sb-chat .sb-dashboard .sb-btn-new-conversation:focus-visible,
.sb-chat .sb-dashboard .sb-btn-new-conversation:active {
  background: rgb(248, 248, 248) !important;
  color: rgb(17, 17, 17) !important;

  border: 1px solid rgb(17, 17, 17) !important;
  box-shadow: rgb(17, 17, 17) 2px 2px 0 !important;
}


/* =========================================================
   ALL ARTICLES — TEXT ONLY
   ========================================================= */

.sb-chat .sb-dashboard .sb-btn-all-articles {
  display: table !important;
  width: auto !important;

  margin: 13px auto 5px !important;
  padding: 0 !important;

  background: transparent !important;
  color: rgb(52, 52, 52) !important;

  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  font-family: "Roboto", Arial, sans-serif !important;
  font-weight: 400 !important;

  cursor: pointer !important;
  transition: color 200ms ease !important;
}

.sb-chat .sb-dashboard .sb-btn-all-articles:hover,
.sb-chat .sb-dashboard .sb-btn-all-articles:focus-visible,
.sb-chat .sb-dashboard .sb-btn-all-articles:active {
  background: transparent !important;
  color: rgb(252, 82, 29) !important;
  border: 0 !important;
  box-shadow: none !important;
}