/*
 * LUMi Chatbot Styles
 * v1.0.0
 */

/* Corporate Design Variablen */
:root {
  --lumi-teal: #008387;
  --lumi-teal-light: #99d6d6;
  --lumi-teal-dark: #006669;
  --lumi-yellow: #f2e61a;
  --lumi-green: #007d3e;
  --lumi-green-light: #83c06f;
  --lumi-black: #000000;
  --lumi-white: #ffffff;
  --lumi-gray-50: #f9fafb;
  --lumi-gray-100: #f3f4f6;
  --lumi-gray-200: #e5e7eb;
  --lumi-gray-300: #d1d5db;
  --lumi-gray-400: #9ca3af;
  --lumi-gray-500: #6b7280;
  --lumi-gray-700: #374151;
  --lumi-gray-900: #111827;
  --font-family: 'Nunito', sans-serif;
  --border-radius: 1.5rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, var(--lumi-teal) 0%, var(--lumi-teal-dark) 100%);
  min-height: 100vh;
  color: var(--lumi-gray-900);
  line-height: 1.6;
}

/* Demo-Seite */
.demo-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.demo-logo {
  margin-bottom: 3rem;
}

.demo-logo img {
  height: 80px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.demo-placeholder {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  padding: 3rem 4rem;
  max-width: 600px;
}

.demo-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--lumi-white);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.demo-description {
  font-size: 1rem;
  color: var(--lumi-teal-light);
  line-height: 1.7;
}

/* Chat Widget Button */
.chat-widget-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lumi-teal) 0%, var(--lumi-teal-dark) 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 131, 135, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 9998;
}

.chat-widget-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 131, 135, 0.5);
}

.chat-widget-button svg {
  width: 32px;
  height: 32px;
  color: var(--lumi-white);
  transition: transform 0.3s ease;
}

.chat-widget-button.open svg {
  transform: rotate(180deg);
}

.chat-widget-button .notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--lumi-yellow);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lumi-black);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-widget-button .notification-badge.show {
  opacity: 1;
}

/* Chat Window */
.chat-widget-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  height: 620px;
  max-height: calc(100vh - 140px);
  background: var(--lumi-white);
  border-radius: var(--border-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.chat-widget-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, var(--lumi-teal) 0%, var(--lumi-teal-dark) 100%);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.chat-header-avatar {
  width: 48px;
  height: 48px;
  background: var(--lumi-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-header-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--lumi-white);
  margin-bottom: 0.125rem;
}

.chat-header-status {
  font-size: 0.8125rem;
  color: var(--lumi-teal-light);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.chat-header-actions {
  display: flex;
  gap: 0.5rem;
}

.chat-header-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-header-btn svg {
  width: 18px;
  height: 18px;
  color: var(--lumi-white);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lumi-green-light);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Chat Nachrichten */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--lumi-gray-50);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

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

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

.message {
  display: flex;
  gap: 0.75rem;
  max-width: 85%;
  animation: messageIn 0.3s ease;
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.message.bot .message-avatar {
  background: var(--lumi-white);
  padding: 4px;
  box-shadow: var(--shadow-sm);
}

.message.user .message-avatar {
  background: var(--lumi-gray-200);
  color: var(--lumi-gray-700);
}

.message-content {
  background: var(--lumi-white);
  padding: 0.875rem 1.125rem;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-sm);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.message.bot .message-content {
  border-bottom-left-radius: 0.375rem;
}

.message.user .message-content {
  background: linear-gradient(135deg, var(--lumi-teal) 0%, var(--lumi-teal-dark) 100%);
  color: var(--lumi-white);
  border-bottom-right-radius: 0.375rem;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.quick-action {
  background: var(--lumi-gray-100);
  border: 1px solid var(--lumi-gray-200);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lumi-teal);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-action:hover {
  background: var(--lumi-teal);
  border-color: var(--lumi-teal);
  color: var(--lumi-white);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--lumi-gray-400);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Fehlermeldungen */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
}

/* Chat Eingabe */
.chat-input-container {
  padding: 1rem 1.5rem;
  background: var(--lumi-white);
  border-top: 1px solid var(--lumi-gray-200);
  flex-shrink: 0;
}

.chat-input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  border: 2px solid var(--lumi-gray-200);
  border-radius: 1.25rem;
  padding: 0.75rem 1.125rem;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease;
  min-height: 44px;
  max-height: 120px;
}

.chat-input:focus {
  border-color: var(--lumi-teal);
}

.chat-input::placeholder {
  color: var(--lumi-gray-400);
}

.chat-send-button {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--lumi-teal) 0%, var(--lumi-teal-dark) 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.chat-send-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 131, 135, 0.3);
}

.chat-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-send-button svg {
  width: 20px;
  height: 20px;
  color: var(--lumi-white);
}

/* Mobile Anpassungen */
@media (max-width: 480px) {
  .chat-widget-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .chat-widget-button {
    bottom: 16px;
    right: 16px;
  }

  .demo-placeholder {
    padding: 2rem;
    margin: 0 1rem;
  }

  .demo-title {
    font-size: 1.5rem;
  }
}
