html, body {
	overflow-x: hidden;
	height: 100%;
	margin: 0;
}

a {
	color: var(--bs-gray);
}

.container-fluid, .row {
	height: 100%;
}

#sidebarMenu {
	height: 100vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

#chatSessionsList {
	flex-grow: 1;
	overflow-y: auto;
}

.chat-window {
	display: flex;
	flex-direction: column;
	padding: 1rem;
	overflow-y: auto;
	flex: 1 1 auto;
}

/* Estilo base das mensagens */
.message {
	max-width: 75%;
	margin-bottom: 12px;
	padding: 12px 16px;
	border-radius: 18px;
	position: relative;
	white-space: pre-wrap;
	word-wrap: break-word;
	display: inline-block;
}

/* Mensagem do assistente */
.message.assistant {
	background-color: var(--bs-red);
	color: white;
	align-self: flex-start;
	border-top-left-radius: 0;
	text-align: left;
}

/* Mensagem do usuário */
.message.user {
	background-color: var(--bs-gray);
	color: white;
	align-self: flex-end;
	border-top-right-radius: 0;
	text-align: right;
}

/* Timestamp da mensagem */
.timestamp {
	display: block;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.75);
	margin-top: 6px;
}

.chat-sidebar-header {
	z-index: 1020;
}

/* Loader com 3 pontinhos animados */
#typingIndicator {
	background-color: var(--bs-red);
	color: white;
	align-self: flex-start;
	text-align: left;
	display: flex;
	gap: 5px;
	width: auto;
	padding: 10px 15px;
	border-radius: 18px;
	border-top-left-radius: 0;
	margin-bottom: 12px;
}

#typingIndicator .dot {
	width: 8px;
	height: 8px;
	background-color: white;
	border-radius: 50%;
	animation: blink 1.4s infinite both;
}

#typingIndicator .dot:nth-child(2) {
	animation-delay: 0.2s;
}

#typingIndicator .dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes blink {
	0%, 80%, 100% { opacity: 0; }
	40% { opacity: 1; }
}

#chatInput {
	resize: none;
}

.sendContainer {
	background-color: var(--bs-gray-100);
}

.form-check-input:focus {
  border-color: var(--bs-danger);
  box-shadow: 0 0 0 .25rem rgba(220, 53, 69, .25);
}

.form-control:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: var(--bs-danger);
  box-shadow: 0 0 0 .25rem rgba(220, 53, 69, .25);
}

.list-group-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
	cursor: pointer;
}

.list-group-item.active {
  z-index: 2;
  color: var(--bs-list-group-active-color);
  background-color: var(--bs-gray);
  border-color: var(--bs-gray);
}

/* Ajustes para mobile */
@media (max-width: 767.98px) {
  #sendButton {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  #chatInput {
    font-size: 0.9rem;
  }

  /* Sidebar sempre oculta em mobile inicialmente */
  #sidebarMenu {
    display: none;
  }

  /* Quando o offcanvas estiver aberto */
  .offcanvas.show {
   display: block !important;
  }
}

/* Ajustes para desktop */
@media (min-width: 768px) {
  #sidebarMenu {
    display: block !important;
  }

  .menu-toggle {
   display: none !important;
  }
}