/**
 * Oh'One Chatbot 3.0 - Komplett überarbeitetes Design
 * Fokus auf UX, Accessibility und moderne Ästhetik
 * @version 3.0
 * @author Oh'One IT-Service
 */

/* ===============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   =============================================== */

:root {
  /* Farben */
  --chatbot-primary: #667eea;
  --chatbot-primary-dark: #5a67d8;
  --chatbot-secondary: #764ba2;
  --chatbot-accent: #f093fb;
  --chatbot-success: #48bb78;
  --chatbot-warning: #ed8936;
  --chatbot-error: #f56565;

  /* Grautöne */
  --chatbot-gray-50: #f9fafb;
  --chatbot-gray-100: #f3f4f6;
  --chatbot-gray-200: #e5e7eb;
  --chatbot-gray-300: #d1d5db;
  --chatbot-gray-400: #9ca3af;
  --chatbot-gray-500: #6b7280;
  --chatbot-gray-600: #4b5563;
  --chatbot-gray-700: #374151;
  --chatbot-gray-800: #1f2937;
  --chatbot-gray-900: #111827;

  /* Schatten */
  --chatbot-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --chatbot-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --chatbot-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --chatbot-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --chatbot-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Übergänge */
  --chatbot-transition-fast: 0.15s ease-out;
  --chatbot-transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --chatbot-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Abstände */
  --chatbot-spacing-xs: 0.25rem;
  --chatbot-spacing-sm: 0.5rem;
  --chatbot-spacing-md: 1rem;
  --chatbot-spacing-lg: 1.5rem;
  --chatbot-spacing-xl: 2rem;
  --chatbot-spacing-2xl: 3rem;

  /* Border Radius */
  --chatbot-radius-sm: 0.375rem;
  --chatbot-radius-md: 0.5rem;
  --chatbot-radius-lg: 0.75rem;
  --chatbot-radius-xl: 1rem;
  --chatbot-radius-2xl: 1.5rem;
  --chatbot-radius-full: 9999px;

  /* Typografie */
  --chatbot-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --chatbot-font-size-xs: 0.75rem;
  --chatbot-font-size-sm: 0.875rem;
  --chatbot-font-size-base: 1rem;
  --chatbot-font-size-lg: 1.125rem;
  --chatbot-font-size-xl: 1.25rem;
}

/* ===============================================
   BLUR OVERLAY FÜR HINTERGRUND
   =============================================== */

#chatbot-blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--chatbot-transition-normal);
  pointer-events: none;
}

#chatbot-blur-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===============================================
   GRUNDLEGENDES CHATBOT LAYOUT
   =============================================== */

#chatbot-widget {
  position: fixed !important;
  left: 24px !important;
  bottom: 24px !important;
  z-index: 9999 !important;
  font-family: var(--chatbot-font-family);
  font-size: var(--chatbot-font-size-base);
  line-height: 1.5;
  color: var(--chatbot-gray-700);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===============================================
   CHATBOT ICON - Komplett neu designt
   =============================================== */

#chatbot-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: var(--chatbot-radius-full);
  box-shadow:
    0 8px 32px rgba(102, 126, 234, 0.3),
    0 4px 16px rgba(118, 75, 162, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--chatbot-transition-normal);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: chatbotFloat 3s ease-in-out infinite;
}

/* Pulsierender Ring-Effekt mit Glow */
#chatbot-icon::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: var(--chatbot-radius-full);
  z-index: -1;
  animation: chatbotPulse 2.5s infinite;
  opacity: 0;
  filter: blur(2px);
}

@keyframes chatbotPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.15);
    opacity: 0.4;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes chatbotFloat {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-2px) rotate(1deg);
  }

  66% {
    transform: translateY(1px) rotate(-1deg);
  }
}

/* Glanz-Effekt */
#chatbot-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--chatbot-transition-slow);
}

#chatbot-icon:hover::after {
  left: 100%;
}

#chatbot-icon svg {
  width: 32px;
  height: 32px;
  fill: white;
  transition: all var(--chatbot-transition-normal);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

#chatbot-icon:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow:
    0 12px 40px rgba(102, 126, 234, 0.4),
    0 8px 24px rgba(118, 75, 162, 0.3),
    0 0 0 12px rgba(102, 126, 234, 0.1),
    0 0 40px rgba(240, 147, 251, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: chatbotFloat 3s ease-in-out infinite, chatbotGlow 1.5s ease-in-out infinite alternate;
}

#chatbot-icon:hover svg {
  transform: scale(1.15) rotate(8deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)) brightness(1.1);
}

@keyframes chatbotGlow {
  0% {
    filter: brightness(1) saturate(1);
  }

  100% {
    filter: brightness(1.1) saturate(1.2);
  }
}

#chatbot-icon:focus {
  outline: none;
  box-shadow: var(--chatbot-shadow-xl), 0 0 0 4px rgba(102, 126, 234, 0.5);
}

#chatbot-icon:active {
  transform: scale(0.95);
}

/* Deaktivierter Zustand */
#chatbot-icon.chatbot-disabled {
  background: linear-gradient(135deg, var(--chatbot-gray-400) 0%, var(--chatbot-gray-500) 100%);
  cursor: not-allowed;
  opacity: 0.7;
}

#chatbot-icon.chatbot-disabled::before {
  display: none;
}

#chatbot-icon.chatbot-disabled:hover {
  transform: none;
  box-shadow: var(--chatbot-shadow-lg);
}

/* ===============================================
   CHATBOT FENSTER - Komplett überarbeitet
   =============================================== */

#chatbot-window {
  position: fixed;
  left: 24px;
  bottom: 98px;
  /* 24px + 64px Icon + 10px Abstand */
  width: 400px;
  max-width: calc(100vw - 48px);
  height: 70vh;
  max-height: 650px;
  background: white;
  border-radius: var(--chatbot-radius-2xl);
  box-shadow: var(--chatbot-shadow-2xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: all var(--chatbot-transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.chatbot-hidden {
  opacity: 0 !important;
  transform: translateY(20px) scale(0.95) !important;
  pointer-events: none;
  visibility: hidden;
}

/* ===============================================
   CHATBOT HEADER - Modernisiert
   =============================================== */

.chatbot-header {
  background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
  color: white;
  padding: var(--chatbot-spacing-lg) var(--chatbot-spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 70px;
}

.chatbot-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 2s ease-in-out;
}

.chatbot-header:hover::before {
  left: 100%;
}

.chatbot-header-content {
  display: flex;
  flex-direction: column;
  gap: var(--chatbot-spacing-xs);
}

.chatbot-header .brand-script {
  display: inline-block;
  width: 80px;
  height: 24px;
  background-image: url('../IMG/logo_favicon/OhOne_text.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  text-indent: -9999px;
  overflow: hidden;
  vertical-align: middle;
}

.chatbot-title {
  font-size: var(--chatbot-font-size-sm);
  opacity: 0.9;
  font-weight: 500;
}

#chatbot-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: var(--chatbot-radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: white;
  transition: all var(--chatbot-transition-fast);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#chatbot-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

#chatbot-close:active {
  transform: scale(0.95);
}

/* ===============================================
   SUCHFELD ENTFERNT
   =============================================== */

/* ===============================================
   NACHRICHTEN-BEREICH - Verbessert
   =============================================== */

.chatbot-messages {
  flex: 1;
  height: calc(60% - 70px);
  background: rgba(248, 250, 252, 0.1);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: var(--chatbot-spacing-lg);
  overflow-y: auto;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  gap: var(--chatbot-spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  border-right: none;
}

/* Moderne Scrollbar */
.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--chatbot-gray-300);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: var(--chatbot-gray-400);
}

/* ===============================================
   NACHRICHTEN - Komplett neu designt
   =============================================== */

.chatbot-message {
  max-width: 85%;
  animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message-content {
  padding: 14px var(--chatbot-spacing-md);
  border-radius: var(--chatbot-radius-lg);
  font-size: var(--chatbot-font-size-sm);
  line-height: 1.5;
  word-wrap: break-word;
  position: relative;
  box-shadow: var(--chatbot-shadow-sm);
}

.message-time {
  font-size: var(--chatbot-font-size-xs);
  color: var(--chatbot-gray-500);
  margin-top: var(--chatbot-spacing-xs);
  opacity: 0.8;
}

/* User Messages */
.chatbot-message.user {
  align-self: flex-end;
}

.chatbot-message.user .message-content {
  background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
  color: white;
  border-bottom-right-radius: var(--chatbot-radius-sm);
  box-shadow: var(--chatbot-shadow-md);
}

.chatbot-message.user .message-time {
  text-align: right;
  color: rgba(255, 255, 255, 0.8);
}

/* Bot Messages */
.chatbot-message.bot {
  align-self: flex-start;
}

.chatbot-message.bot .message-content {
  background: white;
  color: var(--chatbot-gray-800);
  border: 1px solid var(--chatbot-gray-200);
  border-bottom-left-radius: var(--chatbot-radius-sm);
  box-shadow: var(--chatbot-shadow-md);
}

.chatbot-message.bot .message-time {
  color: var(--chatbot-gray-500);
}

/* Typing Indicator - Überarbeitet */
.chatbot-typing-indicator {
  align-self: flex-start;
  max-width: 85%;
}

.typing-dots {
  background: white;
  border: 1px solid var(--chatbot-gray-200);
  border-radius: var(--chatbot-radius-lg);
  border-bottom-left-radius: var(--chatbot-radius-sm);
  padding: 16px var(--chatbot-spacing-md);
  display: flex;
  gap: 6px;
  align-items: center;
  box-shadow: var(--chatbot-shadow-md);
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--chatbot-gray-400);
  border-radius: var(--chatbot-radius-full);
  animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {

  0%,
  60%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  30% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ===============================================
   FRAGEN-BEREICH - Überarbeitet
   =============================================== */

.chatbot-questions {
  background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%) !important;
  padding: var(--chatbot-spacing-md) var(--chatbot-spacing-lg) var(--chatbot-spacing-lg);
  height: 40% !important;
  min-height: 200px !important;
  max-height: none !important;
  overflow-y: auto;
  border-top: 1px solid var(--chatbot-gray-200);
  flex-shrink: 0 !important;
  flex-basis: 40% !important;
}

.chatbot-questions::-webkit-scrollbar {
  width: 6px;
}

.chatbot-questions::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-questions::-webkit-scrollbar-thumb {
  background: var(--chatbot-gray-300);
  border-radius: 3px;
}

/* Headers */
.chatbot-categories-header,
.chatbot-category-header {
  font-weight: 600;
  color: white;
  margin-bottom: var(--chatbot-spacing-md);
  font-size: var(--chatbot-font-size-sm);
}

.chatbot-category-header {
  display: flex;
  align-items: center;
  gap: var(--chatbot-spacing-sm);
  padding: var(--chatbot-spacing-sm) var(--chatbot-spacing-md);
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--chatbot-radius-md);
  border-left: 4px solid rgba(255, 255, 255, 0.5);
  margin-bottom: var(--chatbot-spacing-lg);
}

.category-title {
  font-weight: 600;
  color: white;
}

/* ===============================================
   BUTTONS - Komplett überarbeitet
   =============================================== */

/* Kategorie-Buttons */
.chatbot-category-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--chatbot-radius-xl);
  padding: var(--chatbot-spacing-sm) var(--chatbot-spacing-md);
  margin-bottom: var(--chatbot-spacing-xs);
  cursor: pointer;
  transition: all var(--chatbot-transition-normal);
  display: flex;
  align-items: center;
  gap: var(--chatbot-spacing-sm);
  text-align: left;
  font-size: var(--chatbot-font-size-sm);
  font-weight: 500;
  color: white;
  position: relative;
  overflow: hidden;
  font-family: var(--chatbot-font-family);
  min-height: 40px;
}

.chatbot-category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left var(--chatbot-transition-normal);
  z-index: 0;
}

.chatbot-category-btn:hover::before {
  left: 0;
}

.chatbot-category-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: var(--chatbot-shadow-lg);
  color: white;
}

.chatbot-category-btn:hover .category-name {
  position: relative;
  z-index: 1;
  color: white;
}

.chatbot-category-btn:active {
  transform: translateY(0);
}



.category-name {
  font-weight: 600;
  transition: color var(--chatbot-transition-fast);
}

/* Fragen-Buttons */
.chatbot-question-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--chatbot-radius-md);
  padding: var(--chatbot-spacing-sm) var(--chatbot-spacing-md);
  margin-bottom: var(--chatbot-spacing-xs);
  cursor: pointer;
  transition: all var(--chatbot-transition-fast);
  text-align: left;
  font-size: var(--chatbot-font-size-sm);
  color: white;
  line-height: 1.4;
  font-family: var(--chatbot-font-family);
  position: relative;
}

.chatbot-question-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
  box-shadow: var(--chatbot-shadow-md);
}

.chatbot-question-btn:active {
  transform: translateX(2px);
}

/* Suchergebnis-Buttons entfernt */

/* Zurück-Button */
.chatbot-back-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--chatbot-radius-md);
  padding: var(--chatbot-spacing-sm) var(--chatbot-spacing-md);
  margin-bottom: var(--chatbot-spacing-md);
  cursor: pointer;
  transition: all var(--chatbot-transition-fast);
  font-size: var(--chatbot-font-size-sm);
  color: white;
  font-weight: 500;
  text-align: center;
  font-family: var(--chatbot-font-family);
}

.chatbot-back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}

/* ===============================================
   SPEZIELLE NACHRICHTEN
   =============================================== */

.chatbot-no-results {
  text-align: center;
  padding: var(--chatbot-spacing-xl);
  color: var(--chatbot-gray-500);
  font-size: var(--chatbot-font-size-sm);
}

.chatbot-no-results p {
  margin: 0 0 var(--chatbot-spacing-sm) 0;
}

/* ===============================================
   CONSENT ALERT - Überarbeitet
   =============================================== */

.chatbot-consent-alert {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  animation: alertSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.consent-alert-content {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid var(--chatbot-warning);
  border-radius: var(--chatbot-radius-xl);
  padding: var(--chatbot-spacing-lg) var(--chatbot-spacing-xl);
  display: flex;
  align-items: center;
  gap: var(--chatbot-spacing-md);
  max-width: 380px;
  box-shadow: var(--chatbot-shadow-xl);
}

.consent-alert-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.consent-alert-text {
  font-size: var(--chatbot-font-size-sm);
  color: #92400e;
  line-height: 1.4;
  font-weight: 500;
}

.consent-alert-close {
  background: rgba(146, 64, 14, 0.1);
  border: none;
  border-radius: var(--chatbot-radius-full);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #92400e;
  font-size: 18px;
  transition: background var(--chatbot-transition-fast);
  flex-shrink: 0;
}

.consent-alert-close:hover {
  background: rgba(146, 64, 14, 0.2);
}

/* ===============================================
   RESPONSIVE DESIGN - Konsistente Positionierung
   =============================================== */

/* Tablets */
@media (max-width: 768px) {
  #chatbot-widget {
    left: 24px !important;
    bottom: 24px !important;
  }

  #chatbot-icon {
    width: 60px;
    height: 60px;
  }

  #chatbot-icon svg {
    width: 28px;
    height: 28px;
  }

  #chatbot-window {
    position: fixed !important;
    left: 16px !important;
    bottom: 16px !important;
    right: 16px !important;
    width: auto !important;
    height: 97vh !important;
    max-height: 826px !important;
    border-radius: var(--chatbot-radius-xl) !important;
  }

  .chatbot-header {
    padding: var(--chatbot-spacing-md) var(--chatbot-spacing-lg);
  }

  .chatbot-messages {
    padding: var(--chatbot-spacing-md);
  }

  .chatbot-questions {
    padding: var(--chatbot-spacing-sm) var(--chatbot-spacing-md) var(--chatbot-spacing-md);
  }

  /* Suchfeld-Container entfernt */
}

/* Smartphones */
@media (max-width: 480px) {
  #chatbot-widget {
    left: 24px !important;
    bottom: 24px !important;
  }

  #chatbot-icon {
    width: 56px;
    height: 56px;
  }

  #chatbot-icon svg {
    width: 24px;
    height: 24px;
  }

  #chatbot-window {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    border-radius: var(--chatbot-radius-lg) !important;
    height: 90vh !important;
    max-height: 750px !important;
  }

  .chatbot-header {
    padding: var(--chatbot-spacing-sm) var(--chatbot-spacing-md);
    min-height: 60px;
  }

  .chatbot-header .brand-script {
    width: 70px;
    height: 20px;
  }

  .chatbot-messages {
    padding: var(--chatbot-spacing-sm);
    gap: var(--chatbot-spacing-sm);
  }

  .message-content {
    padding: 12px var(--chatbot-spacing-sm);
    font-size: var(--chatbot-font-size-sm);
  }

  .chatbot-category-btn {
    padding: var(--chatbot-spacing-xs) var(--chatbot-spacing-sm);
    font-size: var(--chatbot-font-size-sm);
    min-height: 36px;
  }

  .chatbot-question-btn {
    padding: var(--chatbot-spacing-xs) var(--chatbot-spacing-sm);
    font-size: var(--chatbot-font-size-sm);
  }

  .consent-alert-content {
    max-width: calc(100vw - 48px);
    /* 24px links + 24px rechts */
    padding: var(--chatbot-spacing-md) var(--chatbot-spacing-lg);
  }
}

/* Sehr kleine Bildschirme */
@media (max-width: 360px) {
  #chatbot-widget {
    left: 24px !important;
    bottom: 24px !important;
  }

  #chatbot-icon {
    width: 52px;
    height: 52px;
  }

  #chatbot-icon svg {
    width: 22px;
    height: 22px;
  }

  #chatbot-window {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    height: 83vh !important;
    max-height: 676px !important;
  }
}

/* ===============================================
   FALLBACK FÜR BROWSER OHNE BACKDROP-FILTER
   =============================================== */

@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .chatbot-messages {
    background: rgba(248, 250, 252, 0.05);
  }
}

/* ===============================================
   PRINT STYLES
   =============================================== */

@media print {
  #chatbot-widget {
    display: none !important;
  }
}

/* ===============================================
   DARK MODE VORBEREITUNG
   =============================================== */

@media (prefers-color-scheme: dark) {
  /* Dark Mode Styles können hier hinzugefügt werden */
  /* Aktuell nicht implementiert, aber CSS Custom Properties machen es einfach */
}

/* ===============================================
   ACCESSIBILITY VERBESSERUNGEN
   =============================================== */

/* Fokus-Indikatoren für Tastaturnavigation */
.chatbot-category-btn:focus,
.chatbot-question-btn:focus,
.chatbot-back-btn:focus {
  outline: 2px solid var(--chatbot-primary);
  outline-offset: 2px;
}

/* Reduzierte Bewegung für Nutzer mit Präferenzen */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #chatbot-icon::before {
    animation: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  #chatbot-icon {
    border: 3px solid white;
  }

  .chatbot-category-btn,
  .chatbot-question-btn {
    border-width: 3px;
  }
}