.fs-chat {
  /* no unnecessary space */
  margin-bottom: 0px;
  /* hide unnecessary border, cascading from main.css */
}
.fs-chat .portlet-content {
  background: #fff;
  border-width: 0px;
  word-wrap: break-word;
}

/* Separate from #tdWebchat — that node is hidden when empty by talkdesk-embedded.css */
.fs-chat-target-admin-hint {
  min-height: 120px;
  padding: 1rem;
  background-color: #ffc107; /* Bootstrap warning */
}

/*
 * Consent panel + floating launcher. Same look as the talkdesk-chat-consent script
 * (talkdesk-loader project) and the usercentrics-consent-bridge, so that all sites look alike.
 *
 * Override with CSS custom properties on :root (or any ancestor):
 *   --tdcc-accent               launcher color (default: theme color --main-color, else #007aad)
 *   --tdcc-offset-right         distance to the right edge   (default 10px)
 *   --tdcc-offset-bottom        distance to the bottom edge  (default 20px)
 *   --tdcc-z-index              (default 9999)
 *   --tdcc-embedded-background  background of the embedded box (default #eee)
 *   --ucb-accent, --ucb-accent-hover, --ucb-text, --ucb-muted   colors of the panel
 *                               (button default: theme color --main-color, else #007aad;
 *                                hover default: the button color mixed with white)
 */
@keyframes tdcc-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}
/* Consent panel (consent_panel.jsp) */
.fs-chat-consent {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 640px;
  height: 100%;
  margin: 0 auto;
  padding: min(2vmax, 20px);
  color: var(--ucb-text, #3c4859);
  font-family: verdana, sans-serif;
}

.fs-chat-consent .fs-chat-consent__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1.3;
  text-align: center;
}

.fs-chat-consent .fs-chat-consent__description {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.45;
  text-align: center;
}

.fs-chat-consent .fs-chat-consent__link {
  color: var(--ucb-muted, #595959);
  text-decoration: underline;
}

.fs-chat-consent .fs-chat-consent__link:hover {
  color: var(--ucb-text, #3c4859);
}

.fs-chat-consent .fs-chat-consent__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.fs-chat-consent .fs-chat-consent__accept {
  padding: 10px 20px;
  border: 0;
  border-radius: 5px;
  background: var(--ucb-accent, var(--main-color, #007aad));
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: normal;
  text-transform: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.fs-chat-consent .fs-chat-consent__accept:hover,
.fs-chat-consent .fs-chat-consent__accept:focus-visible {
  background: var(--ucb-accent-hover, color-mix(in srgb, var(--ucb-accent, var(--main-color, #007aad)) 80%, #fff));
  color: #fff;
}

/* Embedded chat: box around the panel */
.fs-chat-embedded-consent {
  background-color: var(--tdcc-embedded-background, #eee);
  padding: 1vmin 2vmin;
  border-radius: 5px;
}

/* Floating chat: launcher (blue chat bubble) + popover with the consent panel */
.fs-chat-floating-consent {
  position: fixed;
  right: calc(var(--tdcc-offset-right, 10px) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--tdcc-offset-bottom, 20px) + env(safe-area-inset-bottom, 0px));
  z-index: var(--tdcc-z-index, 9999);
  font-family: inherit;
}

.fs-chat-floating-consent .fs-chat-floating-consent__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: tdcc-pulse 4s ease-in-out infinite;
}

.fs-chat-floating-consent .fs-chat-floating-consent__trigger:hover,
.fs-chat-floating-consent .fs-chat-floating-consent__trigger:focus-visible {
  animation: none;
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  outline: none;
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .fs-chat-floating-consent .fs-chat-floating-consent__trigger {
    animation: none;
  }
}
.fs-chat-floating-consent__icon {
  display: block;
  width: 64px;
  height: 64px;
}

.fs-chat-floating-consent__icon-background,
.fs-chat-floating-consent__icon-dot {
  fill: var(--tdcc-accent, var(--main-color, #007aad));
}

.fs-chat-floating-consent__icon-bubble {
  fill: #fff;
}

/* The panel is a popover (top layer, positioned relative to the viewport): the browser opens / closes it
   with the launcher, on a click outside and on Escape. These rules replace the browser defaults of
   [popover] and place the panel above the launcher. */
.fs-chat-floating-consent .fs-chat-floating-consent__panel {
  position: fixed;
  inset: auto;
  right: calc(var(--tdcc-offset-right, 10px) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--tdcc-offset-bottom, 20px) + 64px + 14px + env(safe-area-inset-bottom, 0px));
  width: min(440px, 100vw - 20px);
  max-height: calc(100vh - 140px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: inherit;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  overflow: auto;
}

.fs-chat-floating-consent .fs-chat-floating-consent__panel .fs-chat-consent {
  height: auto;
  max-width: none;
  margin: 0;
}

/* Floating chat: launcher and chat window. Embedded chats get no shadow (talkdesk-loader embedded.css wins by specificity). */
.tdw-widget-trigger,
.tdw-widget {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}