/* chatbot.css – Styles für den PI-Technik Chatbot */
body {
  font-family: sans-serif;
  margin: 0;
  background: #f2f2f2;
}

.pi-chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 340px;
  height: 500px;
  background: #fff;
  border: 2px solid #dc2626;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

.pi-chat-container.minimized {
  height: 48px !important;
  border-radius: 12px;
  background: #dc2626;
}

.pi-chat-container.minimized .pi-chat-messages,
.pi-chat-container.minimized #piQuickReplies,
.pi-chat-container.minimized #piInputWrapper,
.pi-chat-container.minimized #piRestart {
  display: none !important;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pi-chat-header {
  background: #dc2626;
  color: white;
  font-weight: bold;
  cursor: pointer;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border-radius: 0;
  transition: background-color 0.3s ease;
}

.pi-chat-header:hover {
  background-color: #b91c1c;
}

.pi-chat-container:not(.minimized) {
  border-radius: 12px;
  background: #fff;
}

.pi-chat-container.minimized .pi-chat-header {
  background-color: #dc2626;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.pi-chat-container.minimized .pi-chat-header:hover {
  background-color: #b91c1c;
}

.pi-chat-messages {
  flex-grow: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
  text-align: left;
}

.pi-bot,
.pi-user {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 16px;
  margin: 8px 0;
  display: block;
  animation: fadeIn 0.3s ease-in;
  clear: both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pi-bot {
  background: #ffe5e5;
  color: #dc2626;
  text-align: left;
  border-bottom-left-radius: 0;
}

.pi-user {
  background: #eee;
  color: #333;
  text-align: left;
  float: right;
  clear: both;
  border-bottom-right-radius: 0;
  word-break: break-word;
  white-space: pre-wrap;
}

.pi-button {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 14px;
  margin: 4px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
}

.pi-button:hover {
  background: #b91c1c;
}

#piInputWrapper {
  display: none;
  margin: 10px;
  position: relative;
}

#piChatInput {
  width: 100%;
  font-size: 14px;
  padding: 10px 36px 10px 14px;
  border: 1px solid #ccc;
  border-radius: 20px;
  box-sizing: border-box;
}

#piSendButton {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  line-height: 22px;
  padding: 0;
}

#piSendButton:hover {
  background: #b91c1c;
}

#piMicButton,
#piSpeakButton {
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  cursor: pointer;
  font-size: 16px;
}

#piMicButton:hover,
#piSpeakButton:hover {
  background: #b91c1c;
}

#piQuickReplies {
  padding: 10px;
  text-align: center;
}

#piRestart {
  display: none;
  text-align: center;
  padding: 20px;
  margin-top: auto;
}

/* Gemeinsames Layout für alle Seiten */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

h1, h2 {
  color: #dc2626;
  margin-bottom: 12px;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
  margin-top: 32px;
}

p, li {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

a {
  color: #dc2626;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  margin-left: 20px;
}

footer {
  text-align: center;
  font-size: 14px;
  color: #666;
  padding: 20px;
  margin-top: 40px;
}

footer a {
  color: #dc2626;
}

section {
  margin-bottom: 40px;
}

/* Logo-Optimierung mobil */
@media (max-width: 768px) {
  .pi-chat-container.minimized {
    position: fixed;
    width: 340px; /* deine tatsächliche Button-Breite */
    left: calc(50% - 170px); /* Hälfte der Breite */
    bottom: 20px;
    right: auto;
    transform: none; /* nicht mehr nötig */
  }

  .logo-full {
    max-width: 90% !important;
  }
}