/* ========================================
   Chat Interface Styles
   Dedicated CSS for chat-specific components
   ======================================== */

/* Chat Container */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--spacing-lg) 0;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-color);
  gap: 4px;

  /* Scrollbar verstecken */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.chat-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* Message Bubbles - Layout & Animation */
.message-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  max-width: 100%;
  animation: fadeInBubble 0.3s ease-out forwards;
  gap: 6px;
}

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

/* Bot Message Alignment */
.message-row.bot {
  justify-content: flex-start;
  align-items: flex-start;
}

/* Bot Message Bubble */
.message-content.bot-content {
  background: var(--bot-bubble-bg);
  color: var(--bot-bubble-text);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
  max-width: 90%;
  box-shadow: var(--shadow-sm);
  font-weight: 400;
}

/* User Message Alignment */
.message-row.user {
  justify-content: flex-end;
  align-items: flex-end;
}

/* User Message Bubble */
.message-content.user-content {
  background: var(--user-bubble-bg);
  color: var(--user-bubble-text);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border-bottom-right-radius: 4px;
  max-width: 90%;
  box-shadow: var(--shadow-sm);
  font-weight: 400;
}

/* Input Area */
.input-area {
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--bg-color);
  display: flex;
  justify-content: center;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 6px var(--spacing-sm);
  width: 100%;
  max-width: 800px;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15), var(--shadow-lg);
}

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  color: var(--primary-text);
  font-family: var(--font-family);
}

.chat-input:focus {
  outline: none;
}

.chat-input::placeholder {
  color: var(--secondary-text);
}

.send-button {
  color: var(--accent-color);
  background: var(--surface-hover);
  width: 40px;
  height: 40px;
}

.send-button.hidden {
  display: none !important;
}

/* Action Cards - Suggestion Buttons */
.action-cards-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  width: calc(100vw - var(--spacing-lg) * 2);
  max-width: 500px;
  align-self: center;
}

.action-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--primary-text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-card:hover {
  background: var(--user-bubble-bg);
  color: var(--user-bubble-text);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.action-card:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: var(--shadow-sm);
}

/* Chat Indicators - Thinking Animation */
.thinking-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding-top: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  background-color: var(--secondary-text);
  border-radius: 50%;
  animation: pulse 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
  animation-delay: -0.32s;
}

.dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes pulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Microphone Button - Recording State */
.mic-button {
  color: var(--secondary-text);
}

.mic-button.recording {
  color: var(--text-white);
  background-color: var(--mic-active-color);
  animation: pulse-recording 1.5s infinite ease-in-out;
}

@keyframes pulse-recording {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}
