* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  font-family: "Open Sans", Arial, sans-serif;
  color: #202428;
}

.wpb-chat {
  max-width: 980px;
  margin: 60px auto;
  padding: 20px;
}

.wpb-card {
  background: #ffffff;
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.12);
}

.wpb-header {
  background: #202428;
  color: #ffffff;
  border-radius: 22px;
  padding: 28px 36px;
  text-align: left;
  margin-bottom: 28px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
}

.wpb-logo {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wpb-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wpb-header-title {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 7px;
}

.wpb-header-subtitle {
  font-size: 15px;
  opacity: 0.88;
}

.wpb-welcome {
  background: #ffffff;
  border-left: 4px solid #caa24d;
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 25px rgba(0,0,0,.05);
}

.wpb-welcome-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.wpb-welcome-text {
  font-size: 15px;
  line-height: 1.7;
  color: #555;
}

.wpb-welcome ul {
  margin: 16px 0;
  padding-left: 22px;
}

.wpb-welcome li {
  margin: 6px 0;
}

.wpb-content {
  height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 14px;
  margin-bottom: 20px;
  scroll-behavior: smooth;
}

.wpb-content::-webkit-scrollbar {
  width: 10px;
}

.wpb-content::-webkit-scrollbar-track {
  background: #f4f4f4;
  border-radius: 10px;
}

.wpb-content::-webkit-scrollbar-thumb {
  background: #caa24d;
  border-radius: 10px;
}

.wpb-content::-webkit-scrollbar-thumb:hover {
  background: #b58d35;
}

.wpb-messages {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 18px;
}

.wpb-message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  animation: fadeIn 0.22s ease;
}

.wpb-message-row.bot {
  justify-content: flex-start;
}

.wpb-message-row.user {
  justify-content: flex-end;
}

.wpb-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: #202428;
  border: 1px solid rgba(202, 162, 77, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 3px;
}

.wpb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wpb-message-row.user .wpb-avatar {
  display: none;
}

.wpb-message {
  max-width: 82%;
  padding: 16px 19px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: left;
}

.wpb-bot {
  background: #f5efe4;
  color: #202428;
}

.wpb-user {
  background: #caa24d;
  color: #ffffff;
}

.wpb-time {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.55;
}

.wpb-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 44px;
  padding: 0;
  border-radius: 18px;
}

.wpb-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.wpb-dots span {
  width: 7px;
  height: 7px;
  background: #caa24d;
  border-radius: 50%;
  display: block;
  animation: dotPulse 1.2s infinite ease-in-out;
}

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

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

.wpb-form {
  display: flex;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid #ececec;
}

.wpb-form textarea {
  flex: 1;
  min-height: 56px;
  max-height: 140px;
  resize: none;
  border: 1.5px solid #d8b96a;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  line-height: 1.45;
}

.wpb-form textarea:focus {
  border-color: #caa24d;
  box-shadow: 0 0 0 4px rgba(202, 162, 77, 0.14);
}

.wpb-form button {
  height: 56px;
  border: none;
  border-radius: 16px;
  background: #caa24d;
  color: #ffffff;
  padding: 0 26px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wpb-form button:hover {
  background: #b78f3d;
  transform: translateY(-1px);
}

.wpb-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.wpb-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: #777777;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

@keyframes dotPulse {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .wpb-chat {
    margin: 24px auto;
    padding: 12px;
  }

  .wpb-card {
    padding: 20px;
    border-radius: 24px;
  }

  .wpb-header {
    padding: 22px 18px;
    align-items: center;
  }

  .wpb-logo {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  .wpb-header-title {
    font-size: 19px;
  }

  .wpb-header-subtitle {
    font-size: 14px;
  }

  .wpb-welcome {
    padding: 24px 22px;
  }

  .wpb-welcome-title {
    font-size: 21px;
  }

  .wpb-welcome-text {
    font-size: 15px;
  }

  .wpb-content {
    height: 520px;
    padding-right: 10px;
  }

  .wpb-message {
    max-width: 88%;
    font-size: 14px;
  }

  .wpb-form {
    flex-direction: column;
  }

  .wpb-form button {
    width: 100%;
  }
}

.wpb-form textarea,
.wpb-form textarea:focus {
  background: #ffffff !important;
  color: #202428 !important;
}

.wpb-form textarea::placeholder {
  color: #999999 !important;
  opacity: 1;
}

/* Mauszeiger im Eingabefeld */
.wpb-form textarea {
    cursor: text;
}

/* Mauszeiger auf dem Senden Button */
.wpb-form button {
    cursor: pointer;
}

/* Optional: leichter Hover Effekt */
.wpb-form button:hover {
    background: #b9923f;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(202,162,77,0.25);
    transition: all 0.2s ease;
}
