/**
 * FAB (Floating Action Button) styles for the adesso AI Chatbot.
 *
 * Breakpoints:
 *   Mobile  < 480px  : volle Breite, vom unteren Rand
 *   Tablet  480–768px: 90vw / 70vh, FAB etwas kleiner
 *   Desktop > 768px  : feste 400×620px, floating über FAB
 */

/* =========================================================================
   FAB button
   ========================================================================= */

.adesso-chatbot-fab {
  position: fixed;
  z-index: 1259;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  background-color: var(--color-primary, #003d69);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  color: #fff;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.adesso-chatbot-fab:hover,
.adesso-chatbot-fab:focus-visible {
  background-color: var(--color-secondary, #005a9e);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.adesso-chatbot-fab:focus-visible {
  outline: 3px solid var(--color-secondary, #005a9e);
  outline-offset: 3px;
}

.adesso-chatbot-fab:active {
  transform: scale(0.93);
}

.adesso-chatbot-fab__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  transition: opacity 0.15s ease, transform 0.2s ease;
}

.adesso-chatbot-fab__icon--open {
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
}

.adesso-chatbot-fab__icon--closed {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.adesso-chatbot-fab[aria-expanded="true"] .adesso-chatbot-fab__icon--open {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.adesso-chatbot-fab[aria-expanded="true"] .adesso-chatbot-fab__icon--closed {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}

/* =========================================================================
   Chat panel
   ========================================================================= */

.chat-container {
  border-radius: 8px;
  overflow: hidden;
  /* Desktop default: floating above FAB */
  position: fixed;
  right: 20px;
  bottom: 96px !important; /* FAB (56px) + gap (16px) + buffer (24px) */
  width: 400px;
  height: 620px;
}

.chat-container.bottom-left {
  right: auto;
  left: 20px;
}

/* Collapsed: completely hidden */
.chat-container.chat-collapsed {
  display: none !important;
}

/* Open: visible */
.chat-container.chat-open {
  display: block !important;
  margin-bottom: 0;
}

/* chat-element and deep-chat fill the entire panel */
.chat-container .chat-element {
  height: 100%;
}

.chat-container deep-chat {
  width: 100% !important;
  height: 100% !important;
}

/* =========================================================================
   Hide the contrib header bar
   ========================================================================= */

.adesso-chatbot-header--hidden {
  display: none !important;
}

/* =========================================================================
   Tablet  480px – 768px
   ========================================================================= */

@media (min-width: 480px) and (max-width: 768px) {
  .adesso-chatbot-fab {
    right: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
  }

  .chat-container {
    right: 16px;
    bottom: 88px !important;
    width: min(90vw, 400px);
    height: 70vh;
    border-radius: 8px;
  }

  .chat-container.bottom-left {
    right: auto;
    left: 16px;
  }
}

/* =========================================================================
   Mobile  < 480px  – volle Breite vom unteren Rand
   ========================================================================= */

@media (max-width: 479px) {
  .adesso-chatbot-fab {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .chat-container {
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 80vh !important;
    border-radius: 8px 8px 0 0;
  }
}
