#chat-container {
  position: relative;
  z-index: 10;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
}

#chat-container .prompt-text {
  font-size: 1em;
  font-weight: 800;
  color: #555;
  padding: 0 0 4px 0;
  flex: 0 0 auto;
  transition: opacity 0.4s ease;
}

#chat-container .prompt-text.fade-out {
  opacity: 0;
}

.chat-startpage {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  flex: 1 1 0;
  min-height: 0;
}

.chat-startpage#chat-container {
  padding-top: 0;
}

.chat-startpage#chat-container #chat-window {
  width: 100%;
  height: 100%;
  max-height: none !important;
  background-color: #fff !important;
  border: 4px solid rgba(30, 60, 140, 0.40) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.10) !important;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chat-startpage#chat-container #chat-interface {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chat-startpage#chat-container #chat-messages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
}

.chat-startpage#chat-container #chat-window .card-footer {
  background-color: #f5f6f8 !important;
  border-top: 1px solid rgba(16, 24, 40, 0.06) !important;
  border-radius: 0 0 18px 18px;
  flex: 0 0 auto;
  padding: 14px 16px !important;
  width: 100%;
  margin: 0;
}

.chat-startpage#chat-container #chat-window .card-footer .d-flex {
  align-items: center;
  gap: 0;
}

.chat-sidebar#chat-container {
  position: fixed;
  right: 0;
  bottom: 0;
  top: auto;
  width: 690px;
  height: 600px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  border-radius: 18px 0 0 0;
  transform: translateX(0);
  transition: none;
}

.chat-sidebar#chat-container.ready {
  transition: transform 0.4s ease;
  visibility: visible;
}

.chat-sidebar#chat-container.collapsed {
  transform: translateX(100%);
}

.chat-sidebar#chat-container .chat-navbar {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  background: linear-gradient(180deg, #EEF3FF, #F7F9FF);
  border-radius: 18px 0 0 0;
  border-left: 1.5px solid rgba(30, 60, 140, 0.25);
  border-top: 1.5px solid rgba(30, 60, 140, 0.25);
  border-bottom: 1px solid rgba(16, 24, 40, 0.06);
  flex: 0 0 auto;
}

#chat-container .chat-navbar-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.01em;
}

.chat-sidebar#chat-container #chat-window {
  width: 100%;
  height: 100%;
  max-height: none;
  background-color: #fff;
  border: none;
  border-left: 1.5px solid rgba(30, 60, 140, 0.25);
  border-radius: 0;
  box-shadow: -4px -4px 20px rgba(16, 24, 40, 0.10);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chat-sidebar#chat-container #chat-interface {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chat-sidebar#chat-container #chat-messages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
}

.chat-sidebar#chat-container #chat-window .card-footer {
  background-color: #f5f6f8;
  border-top: 1px solid rgba(16, 24, 40, 0.06);
  flex: 0 0 auto;
  padding: 14px 16px;
  width: 100%;
  margin: 0;
}

.chat-sidebar#chat-container #chat-window .card-footer .d-flex {
  align-items: center;
}

.chat-sidebar#chat-container .chat-toggle-btn {
  position: absolute;
  top: 50%;
  left: -75px;
  transform: translateY(-50%);
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1051;
  cursor: pointer;
  color: var(--bs-primary);
  background: #fff;
  border: 1.5px solid rgba(30, 60, 140, 0.25);
  border-right: none;
  border-radius: 0.75rem 0 0 0.75rem;
  box-shadow: -4px 0 12px rgba(16, 24, 40, 0.06);
  transition: background 0.2s ease;
}

.chat-sidebar#chat-container .chat-toggle-btn:hover {
  background: #f5f6f8;
}

.chat-toggle-btn .toggle-icon-open,
.chat-toggle-btn .toggle-icon-close {
  transition: opacity 0.2s ease;
}

.chat-toggle-btn .toggle-icon-open {
  display: none;
}

.chat-toggle-btn .toggle-icon-close {
  display: block;
}

.chat-sidebar.collapsed .chat-toggle-btn .toggle-icon-open {
  display: block;
}

.chat-sidebar.collapsed .chat-toggle-btn .toggle-icon-close {
  display: none;
}

.chat-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1.5px solid rgba(16, 24, 40, 0.12);
  border-radius: 10px;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.chat-close-btn:hover {
  background: rgba(16, 24, 40, 0.06);
  color: #0f172a;
}

.chat-fab {
  display: none;
  position: fixed;
  bottom: 95px;
  right: 24px;
  z-index: 1049;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  background: var(--bs-primary, #0d6efd);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.20);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.28);
}

.chat-fab:active {
  transform: scale(0.95);
}

.chat-fab.hidden {
  display: none !important;
}

#consent-screen,
#chat-interface {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background-color: transparent;
}

#consent-screen {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  padding: 15px;
  margin-bottom: 15px;
  min-height: 150px;
  justify-content: center;
}

#chat-messages {
  background-image: url('https://www.arzt-auskunft.de/static/images/chatbot_robot.png');
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  position: relative;
}

#chat-messages::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.65);
  pointer-events: none;
  z-index: 0;
}

#chat-messages > * {
  position: relative;
  z-index: 1;
}

#consent-screen .overflow-auto,
#chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 5px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

#chat-container .consent-title {
  font-size: 20px;
  font-weight: 700;
  color: #0d6efd;
}

#chat-container .bg-primary,
#chat-container .bg-primary p {
  color: #ffffff;
}

#chat-input {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 15px;
  flex-grow: 1;
  min-width: 0;
}

#chat-input:focus {
  outline: none;
  border-color: var(--bs-primary);
}

#chat-send-btn {
  width: 45px;
  height: 45px;
  margin-left: 10px;
  margin-right: 10px;
  border-radius: 50%;
  border: none;
  flex-shrink: 0;
}

#chat-container .form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

#chat-container .form-check-input:focus {
  box-shadow: none;
}

#chat-window .form-check-label {
  user-select: none;
  white-space: nowrap;
  color: #6c757d;
}

#chat-window sup.text-primary {
  color: #0d6efd;
  font-weight: 800;
}

#chat-messages .btn-outline-primary.btn-sm {
  font-size: 14px;
  border-radius: 20px;
  padding: 4px 12px;
}

#chat-messages .btn-outline-primary.btn-sm:disabled {
  opacity: 0.5;
  cursor: default;
}

#chat-messages .btn-outline-success.btn-sm,
#chat-messages .btn-outline-danger.btn-sm {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 50%;
}

#chat-messages .btn-outline-success.btn-sm:disabled,
#chat-messages .btn-outline-danger.btn-sm:disabled {
  opacity: 0.4;
  cursor: default;
}

.filter-divider {
  width: 1px;
  height: 24px;
  background-color: rgba(0, 0, 0, 0.15);
  display: inline-block;
  margin: 0 4px;
  align-self: center;
}

#new-search-btn {
  background-color: #2a40ad;
  border-color: #2a40ad;
  color: #fff;
  flex-shrink: 0;
}

#new-search-btn:hover,
#new-search-btn:focus,
#new-search-btn:active {
  background-color: #203185;
  border-color: #2a40ad;
  color: #fff !important;
  box-shadow: none;
}

.chatconsent-header {
  border-bottom: none;
}

.chatconsent-footer {
  border-top: none;
}

@media (max-width: 1023.98px) {
  .chat-sidebar#chat-container:not(.ready) {
    transform: translateY(100%);
    visibility: hidden;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .chat-startpage#chat-container {
    min-height: 400px;
  }

  .chat-startpage#chat-container #chat-window {
    min-height: 380px;
  }
}

@media (max-width: 1023.98px) {
  .chat-fab {
    display: flex;
  }

  .chat-sidebar#chat-container {
    width: 100% !important;
    height: 100dvh;
    border-radius: 0 !important;
    overflow: hidden;
  }

  .chat-sidebar#chat-container.collapsed {
    transform: translateY(100%);
  }

  .chat-sidebar#chat-container .chat-navbar {
    border-radius: 0 !important;
    border-left: none;
    border-top: none;
    border-right: none;
    border-bottom: 1px solid rgba(16, 24, 40, 0.06);
  }

  .chat-sidebar#chat-container #chat-window {
    border-radius: 0 !important;
    border: none;
    box-shadow: none;
  }

  .chat-sidebar#chat-container .chat-toggle-btn {
    display: none;
  }

  .chat-close-btn {
    display: flex;
  }
}

@media (max-width: 767.98px) {
  .chat-startpage#chat-container {
    min-height: 420px;
    max-height: none !important;
  }

  .chat-startpage#chat-container #chat-window {
    min-height: 400px;
  }
}
