/* Conversion controls sit above the page (25), below the opening (40) and modal menu. */
.conversion-widgets {
  position: relative;
  z-index: 25;
}

.splash-active .conversion-widgets {
  visibility: hidden;
  pointer-events: none;
}

.site-footer {
  padding-bottom: 112px;
}

.whatsapp-button {
  position: fixed;
  right: 25px;
  bottom: max(25px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #7debab;
  border-radius: 50%;
  background: #148c48;
  color: #fff;
  box-shadow: 0 8px 30px #0005;
  transition: transform 180ms ease, background-color 180ms ease;
}

.whatsapp-button > img {
  width: 33px;
  height: 33px;
  filter: brightness(0) invert(1);
}

.whatsapp-button:hover {
  transform: translateY(-3px);
  background: #10743c;
}

.whatsapp-tooltip {
  position: absolute;
  right: 76px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8f5ec;
  color: #262114;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.whatsapp-button:hover .whatsapp-tooltip,
.whatsapp-button:focus-visible .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.assistant-widget {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 24px;
}

.assistant-launcher {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 3px solid #e5ce91;
  border-radius: 50%;
  background: #d8c4a5;
  box-shadow: 0 7px 25px #0005;
  transition: transform 180ms ease;
}

.assistant-launcher:hover {
  transform: translateY(-3px);
}

.assistant-avatar,
.assistant-chat-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.assistant-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 2px solid #fff8e9;
  border-radius: 50%;
  background: #171306;
}

.assistant-badge img {
  width: 13px;
  height: 17px;
}

.assistant-teaser {
  position: absolute;
  bottom: 6px;
  left: 94px;
  width: 286px;
  border-radius: 22px 22px 22px 7px;
  border: 1px solid #ffcc2840;
  background: #19160e;
  color: #f2e8cd;
  box-shadow: 0 12px 36px #0005;
}

.assistant-teaser-open {
  display: block;
  width: 100%;
  min-height: 116px;
  padding: 19px 24px 19px 20px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  text-align: left;
}

.teaser-heading {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.teaser-message {
  display: block;
  min-height: 42px;
  color: #c6bca1;
  font-size: 12px;
  line-height: 1.6;
}

.assistant-teaser-close {
  position: absolute;
  top: -10px;
  right: -9px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid #fff4;
  border-radius: 50%;
  background: #211b0e;
  color: #fff8e8;
  font-size: 23px;
  font-weight: 300;
  line-height: 1;
}

.assistant-teaser.is-waiting {
  width: 82px;
}

.assistant-teaser.is-waiting .assistant-teaser-open {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 16px;
}

.assistant-teaser.is-waiting .teaser-heading,
.assistant-teaser.is-waiting .teaser-message {
  display: none;
}

.teaser-typing {
  display: none;
}

.assistant-teaser.is-waiting .teaser-typing {
  display: inline-flex;
}

.typing-dots {
  align-items: center;
  gap: 5px;
  min-height: 18px;
}

.typing-dots > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b9a36d;
  animation: assistant-typing 950ms ease-in-out infinite;
}

.typing-dots > span:nth-child(2) {
  animation-delay: 150ms;
}

.typing-dots > span:nth-child(3) {
  animation-delay: 300ms;
}

.assistant-chat {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0d0b06;
  color: #eee4cc;
}

.assistant-chat[open] {
  display: flex;
}

.assistant-chat::backdrop {
  background: #0d0b06;
}

.assistant-demo-open {
  overflow: hidden;
}

.assistant-chat-header {
  flex-shrink: 0;
  border-bottom: 1px solid #ffcc2829;
  background: #15120b;
}

.assistant-demo-header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding: 18px 24px;
}

.assistant-chat-avatar {
  flex: none;
  width: 43px;
  height: 43px;
  border: 2px solid #dbc27b;
}

.assistant-chat-heading {
  flex: 1;
  min-width: 0;
}

.assistant-chat-heading h2 {
  color: #f8efda;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.035em;
}

.assistant-chat-heading p {
  margin-top: 3px;
  color: #b7ad91;
  font-size: 11px;
}

.assistant-chat-close {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #b99b4b4d;
  border-radius: 50%;
  background: transparent;
  color: #e4d2a2;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.assistant-chat-close:hover {
  background: #ffcc2810;
}

.assistant-demo-caption {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 26px 20px 0;
  color: #aaa088;
  text-align: center;
}

.assistant-demo-caption > span {
  color: #d5bb78;
  font-size: 12px;
  font-weight: 500;
}

.assistant-demo-caption p {
  font-size: 11px;
  line-height: 1.5;
}

.assistant-messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 840px;
  min-height: 0;
  margin-inline: auto;
  padding: 24px 24px 32px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: #6b5830 transparent;
  scrollbar-width: thin;
}

.assistant-message {
  align-self: flex-start;
  max-width: min(88%, 620px);
  padding: 14px 18px;
  border: 1px solid #3d3420;
  border-radius: 15px 15px 15px 4px;
  background: #1b180f;
  color: #e8dec3;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.assistant-message-user {
  align-self: flex-end;
  border-color: #735d22;
  border-radius: 15px 15px 4px 15px;
  background: #342b13;
  color: #f3d77c;
}

.assistant-message .typing-dots {
  display: inline-flex;
}

.assistant-message-speaker {
  display: block;
  margin-bottom: 5px;
  color: #d0b365;
  font-size: 9px;
  font-weight: 500;
}

.assistant-chat-footer {
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  align-self: center;
  gap: 12px;
  width: 100%;
  max-width: 840px;
  padding: 18px 24px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid #3d3420;
  color: #b3a990;
  font-size: 10px;
  line-height: 1.5;
}

.assistant-chat :focus-visible,
.assistant-teaser :focus-visible {
  outline-color: #ffcc28;
  outline-offset: 3px;
}

.conversion-widgets.has-keyboard .whatsapp-button,
.conversion-widgets.has-keyboard .assistant-launcher,
.conversion-widgets.has-keyboard .assistant-teaser {
  visibility: hidden;
}

@keyframes assistant-typing {
  0%, 65%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 767px) {
  .site-footer {
    padding-bottom: 104px;
  }

  .whatsapp-button {
    right: 16px;
    bottom: max(23px, env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
  }

  .whatsapp-button > img {
    width: 30px;
    height: 30px;
  }

  .whatsapp-tooltip {
    display: none;
  }

  .assistant-widget {
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 15px;
  }

  .assistant-launcher {
    width: 62px;
    height: 62px;
  }

  .assistant-badge {
    width: 23px;
    height: 23px;
  }

  .assistant-teaser {
    bottom: 6px;
    left: 76px;
    width: min(275px, calc(100vw - 115px));
  }

  .assistant-teaser-open {
    min-height: 112px;
    padding: 17px 20px 17px 18px;
  }

  .teaser-heading {
    font-size: 13px;
  }

  .teaser-message {
    font-size: 12px;
  }

  .assistant-demo-header-inner {
    gap: 12px;
    padding: 14px 16px;
  }

  .assistant-chat-heading h2 {
    font-size: 14px;
  }

  .assistant-demo-caption {
    padding: 22px 16px 0;
  }

  .assistant-messages {
    gap: 14px;
    padding: 22px 14px;
  }

  .assistant-message {
    max-width: 92%;
    padding: 12px 14px;
    font-size: 12px;
  }

  .assistant-chat-footer {
    flex-direction: column;
    gap: 5px;
    padding: 14px 16px max(14px, env(safe-area-inset-bottom));
    font-size: 9px;
  }
}

@media (max-height: 500px) {
  .assistant-demo-caption {
    display: none;
  }

  .assistant-demo-header-inner {
    padding-block: 9px;
  }

  .assistant-chat-avatar {
    width: 32px;
    height: 32px;
  }

  .assistant-messages {
    min-height: 0;
    padding-block: 8px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .typing-dots > span {
    animation: none;
    opacity: 0.7;
  }
}
