html,
body {
  width: 100%;
  height: 100%;
}

:host {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

#cl-shadow-root {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
}

#cl-shadow-root > :not(style):has(#chainlit-copilot-chat) {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

[data-radix-popper-content-wrapper]:has(#chainlit-copilot-chat) {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
}

[data-radix-popper-content-wrapper]:has(#chainlit-copilot-chat)
  > div[data-state="open"] {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#chainlit-copilot-chat {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

/* #chainlit-copilot-chat > .flex.flex-grow.overflow-y-auto {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
} */

/* #chainlit-copilot-chat .flex.flex-col.mx-auto.w-full.flex-grow {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
} */

#chainlit-copilot-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Cacher le bouton plein écran dans l'en-tête du copilot */
#chainlit-copilot-chat .lucide-maximize,
#chainlit-copilot-chat .lucide-minimize {
  display: none !important;
  pointer-events: none !important;
}
/* Désactiver le curseur pointer sur le bouton parent */
#chainlit-copilot-chat button:has(.lucide-maximize),
#chainlit-copilot-chat button:has(.lucide-minimize) {
  pointer-events: none !important;
  cursor: default !important;
}

/* Masquer les boutons de feedback dans le copilot (shadow DOM) */
#chainlit-copilot-chat .positive-feedback-off,
#chainlit-copilot-chat .positive-feedback-on,
#chainlit-copilot-chat .negative-feedback-off,
#chainlit-copilot-chat .negative-feedback-on {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Masquer le bouton d'édition de commentaire dans le copilot */
#chainlit-copilot-chat button:has(.lucide-message-circle) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Masquer le bouton d'envoi de feedback */
#submit-feedback {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Masquer les boutons de feedback dans la webapp */
.positive-feedback-off,
.positive-feedback-on,
.negative-feedback-off,
.negative-feedback-on {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
