.ebp-chatbot {
  --ebp-chatbot-bg: #ffffff;
  --ebp-chatbot-text: #1f2933;
  --ebp-chatbot-muted: #627386;
  --ebp-chatbot-primary: #024063;
  --ebp-chatbot-primary-dark: #0f2c40;
  --ebp-chatbot-header-text: #ffffff;
  --ebp-chatbot-bot-bg: #eef3f7;
  --ebp-chatbot-user-text: #ffffff;
  --ebp-chatbot-border: #d8e0e8;
  --ebp-chatbot-error: #b42318;

    bottom: 5.25rem;
    left: 2.9rem;
  position: fixed;
  z-index: 9999;
}
.ebp-chatbot {
    bottom: 5.25rem;
    left: 34px;
}
.ebp-chatbot__toggle {
  align-items: center;
  background: var(--ebp-chatbot-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(15, 44, 64, 0.25);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 1.75rem;
  font-weight: 700;
  height: 3.75rem;
  justify-content: center;
  line-height: 1;
  width: 3.75rem;
  border: 0.5px solid #fff;
}

.ebp-chatbot__toggle-logo {
  display: block;
  height: 2rem;
  max-width: 2.25rem;
  object-fit: contain;
  width: auto;
}

.ebp-chatbot__toggle:hover,
.ebp-chatbot__toggle:focus {
  background: var(--ebp-chatbot-primary-dark);
}

.ebp-chatbot__window {
  background: var(--ebp-chatbot-bg);
  border: 1px solid var(--clr-primary);
  border-radius: 1rem;
  bottom: 4.75rem;
  box-shadow: 0 18px 50px rgba(15, 44, 64, 0.25);
  display: flex;
  flex-direction: column;
  height: min(38rem, calc(100vh - 7rem));
  left: 0;
  max-height: min(38rem, calc(100vh - 7rem));
  overflow: hidden;
  position: absolute;
  width: min(22rem, calc(100vw - 2.5rem));
  padding: 0;
}

.ebp-chatbot__window[hidden] {
  display: none;
}

.ebp-chatbot__header {
  align-items: flex-start;
  background: var(--ebp-chatbot-primary);
  color: var(--ebp-chatbot-header-text);
  display: flex;
  flex-shrink: 0;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.ebp-chatbot__title {
  color: inherit;
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
}

.ebp-chatbot__subtitle {
  color: inherit;
  font-size: 0.8125rem;
  line-height: 1.4;
  margin: 0.25rem 0 0;
  opacity: 0.82;
}

.ebp-chatbot__close {
  background: transparent;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
}

.ebp-chatbot__messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ebp-chatbot__message {
  border-radius: 0.875rem;
  color: var(--ebp-chatbot-text);
  font-size: 0.9375rem;
  line-height: 1.45;
  margin: 0;
  max-width: 85%;
  padding: 0.75rem;
  text-align: left;
  /* white-space: pre-wrap; */
}

.ebp-chatbot__message--bot {
  align-self: flex-start;
  background: var(--ebp-chatbot-bot-bg);
}

.ebp-chatbot__message--user {
  align-self: flex-end;
  background: var(--ebp-chatbot-primary);
  color: var(--ebp-chatbot-user-text);
}

.ebp-chatbot__message--error {
  align-self: flex-start;
  background: #fff1f0;
  color: var(--ebp-chatbot-error);
}

.ebp-chatbot__message--loading {
  color: var(--ebp-chatbot-muted);
  font-style: italic;
}

.ebp-chatbot__sources {
  border-top: 1px solid var(--ebp-chatbot-border);
  font-size: 0.8125rem;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
	display: none;
}

.ebp-chatbot__sources a {
  color: var(--ebp-chatbot-primary);
  font-weight: 700;
  text-decoration: underline;
}

.ebp-chatbot__sources-label {
  color: var(--ebp-chatbot-muted);
}

.ebp-chatbot__form {
  border-top: 1px solid var(--ebp-chatbot-border);
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
  padding: 0.75rem;
}

.ebp-chatbot__input {
  border: 1px solid var(--ebp-chatbot-border);
  border-radius: 0.75rem;
  color: var(--ebp-chatbot-text);
  flex: 1;
  font: inherit;
  max-height: 8rem;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  resize: vertical;
}

.ebp-chatbot__send {
  background: var(--ebp-chatbot-primary);
  border: 0;
  border-radius: 0.75rem;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.625rem 0.875rem;
}

.ebp-chatbot__send:hover,
.ebp-chatbot__send:focus {
  background: var(--ebp-chatbot-primary-dark);
}

.ebp-chatbot__send:disabled,
.ebp-chatbot__input:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .ebp-chatbot {
    bottom: 1rem;
    left: 1rem;
  }

  .ebp-chatbot__window {
    width: calc(100vw - 2rem);
  }
}

/* === WhatsApp Handoff Banner === */
.ebp-chatbot__wa-banner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  /* background: #e7fbe6;
  border-left: 3px solid #25d366;
  border-radius: 0.5rem; */
}
.ebp-chatbot__wa-label {
  font-size: 0.8rem;
  color: #555;
}
.ebp-chatbot__wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  background: #25d366;
  color: #fff;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
  transition: background 0.2s;
}
.ebp-chatbot__wa-btn:hover {
  background: #1da851;
  color: #fff;
}

/* === WhatsApp phone input row === */
.ebp-chatbot__wa-phone-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.ebp-chatbot__wa-phone-input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1.5px solid #ccc;
  border-radius: 0.4rem;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}
.ebp-chatbot__wa-phone-input:focus {
  border-color: #25d366;
}
.ebp-chatbot__wa-connect-btn {
  padding: 0.4rem 0.8rem;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.ebp-chatbot__wa-connect-btn:hover {
  background: #1da851;
}

/* === WhatsApp reply message === */
.ebp-chatbot__message--wa-reply {
  background: #e7fbe6;
  border-left: 3px solid #25d366;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: #1a3a1a;
  margin: 0.25rem 0;
}
.ebp-chatbot__wa-badge {
  display: inline-block;
  background: #25d366;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* === Auto Prompt Buttons === */
.ebp-chatbot__prompts {
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ebp-chatbot__prompts-label {
  font-size: 0.75rem;
  color: var(--ebp-chatbot-text, #666);
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ebp-chatbot__prompts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ebp-chatbot__prompt-btn {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: 1.5px solid var(--ebp-chatbot-primary, #153f5c);
  color: var(--ebp-chatbot-primary, #153f5c);
  border-radius: 2rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  text-align: left;
  line-height: 1.3;
}
.ebp-chatbot__prompt-btn:hover:not(:disabled) {
  background: var(--ebp-chatbot-primary, #153f5c);
  color: #fff;
}
.ebp-chatbot__prompt-btn:disabled {
  cursor: default;
}
/* WhatsApp variant */
.ebp-chatbot__prompt-btn--wa {
  border-color: #25d366;
  color: #1a7a42;
}
.ebp-chatbot__prompt-btn--wa:hover:not(:disabled) {
  background: #25d366;
  color: #fff;
}

/* === Cache hit badge === */
.ebp-chatbot__cache-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75rem;
  opacity: 0.5;
  vertical-align: middle;
  cursor: default;
}
