@font-face {
  font-family: 'Roboto';
  src: url('fonts/roboto/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
  font-style: normal;
}

@font-face {
  font-family: 'Roboto';
  src: url('fonts/roboto/Roboto-Italic-VariableFont_wdth,wght.ttf') format('truetype');
  font-style: italic;
}

#ahti-chat-banner,
#ahti-chat-open-button {
  font-family: 'Roboto', sans-serif;
}

#ahti-chat-widget-iframe {
  position: fixed;
  border: none;
  z-index: 1000;
  box-shadow: 0 4px 20px #313E0033;
  bottom: 20px;
  right: 20px;
  width: 400px;
  height: 580px;
  border-radius: 16px;
}

@media (max-width: 768px) {
  #ahti-chat-widget-iframe {
    bottom: 10px;
    right: 10px;
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    border-radius: 12px;
  }
}

#ahti-chat-widget-iframe.ahti-transitioning {
  transition: all 1s cubic-bezier(0.65, 0, 0.35, 1);
}

#ahti-chat-widget-iframe.ahti-maximized {
  width: calc(100vw - 40px);
  height: calc(100vh - 40px);
  height: calc(100dvh - 40px);
}


@media (max-width: 768px) {
  #ahti-chat-widget-iframe.ahti-maximized {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
  }
}

#ahti-chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: #0F0C27CC;
  opacity: 0;
  z-index: 999;
  pointer-events: none;
  transition: opacity 1s linear;
}

#ahti-chat-overlay.ahti-visible {
  opacity: 0.8;
}

#ahti-chat-open-button {
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: 30px;
  background-color: #312783;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  bottom: 10px;
  right: 10px;
}

@media (min-width: 769px) {
  #ahti-chat-open-button {
    bottom: 20px;
    right: 20px;
  }
}

#ahti-chat-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 400px;
}

/* Triangle pointing up toward the iframe */
#ahti-chat-banner::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 24px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #ffffff;
}

/* Triangle pointing down toward the button */
#ahti-chat-banner.ahti-above-button::before {
  top: auto;
  bottom: -10px;
  border-bottom: none;
  border-top: 10px solid #ffffff;
}

/* Above-button positioning: button is 60px tall at bottom: 20px, plus 20px gap */
#ahti-chat-banner.ahti-above-button {
  bottom: 100px;
}

@media (max-width: 768px) {
  #ahti-chat-banner.ahti-above-button {
    bottom: 90px;
    right: 10px;
    width: calc(100vw - 20px);
  }

  /* Triangle aligns with button center (button right: 10px, width: 60px → center 40px from right) */
  #ahti-chat-banner.ahti-above-button::before {
    right: 20px;
  }
}

#ahti-chat-banner-inner {
  display: flex;
  overflow: hidden;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px #313E0033;
}

@media (max-width: 768px) {
  #ahti-chat-banner {
    bottom: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}

#ahti-chat-banner-avatar-container {
  background-color: #647F00;
  display: flex;
  align-items: center;
  padding: 12px;
}

#ahti-chat-banner-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ffff;
}

#ahti-chat-banner-content {
  min-width: 0;
  padding-block: 8px;
  padding-left: 16px;
}

#ahti-chat-banner-name {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #647F00;
}

#ahti-chat-banner-quote {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

#ahti-chat-banner-quote a {
  text-decoration: underline;
  color: #647F00;
}

#ahti-chat-banner-close {
  background-color: #ffff;
  color: #647F00;
  align-self: flex-start;
  border: none;
  font-size: 16px;
  line-height: 1;
  padding-top: 8px;
  padding-right: 8px;
  cursor: pointer;
}
