.chatbot-container{
    display: flex;
    flex-direction: row;
    height: 80dvh;
    margin-top: 48px;
    gap: 48px;
}
.history-sidebar{
    display: flex;
    flex-direction: column;
    width: 25%;
    max-height: calc(48px * 10);
    overflow-y: auto;
}
.history-sidebar h3{
    color: black;
    font-size: 14px;
    font-weight: 550;
}
.history-sidebar p{
    font-size: 16px;
}
.chatbot{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 75%;
    height: 100%;
}
.chatbot-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.chatbot-header h1{
    font-size: 24px;
    color: black;
    font-weight: 550;
}
.chatbot-header button {
    color: white;
    background-color: #006EAB;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 550;
    border: none;
    padding: 12px;
    transition: 0.3s ease;
}
.chatbot-header button:hover {
    background-color: #00365C;
}
.chatbot-header button.disabled {
    pointer-events: none;
    opacity: 0.6;
}
.chatbot-chat {
    display: flex;
    flex-direction: column;
    margin-top: 48px;
    height: 100%;
    border: 1px solid #CCE2EE;
    border-radius: 5px;
    position: relative; 
    padding-bottom: 85px;
}
.chatbot-chat::after {
    content: "";
    position: absolute;
    bottom: 85px;
    left: 0;
    width: 100%;
    height: 70px; 
    pointer-events: none; 
}
.input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: row;
}
.chatbot-input {
  width: 100%;
  min-height: 48px;
  padding: 8px 42px 8px 16px;
  border: 1px solid #aebac0;
  border-radius: 4px;
  color: black;
  line-height: 1.5;
  font-size: 16px;
  box-sizing: border-box;
}

.chatbot-input::placeholder {
  line-height: 1.5;
  font-size: 16px;
  color: #888;
}

.chatbot-input:focus {
    outline: none;
    border-color: #006EAB;
}

.input-container i {
    position: absolute;
    right: 40px; 
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
}
.input-container i.enabled{
    color: #006EAB;
    cursor: pointer;
    opacity: 1;
}
.chat-content{
    position: relative;
    height: 100%;
    max-height: 580px; 
    overflow-y: auto;       
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.crab-img, .chat-avatar{
    width: 32px;
    height: 32px;
    object-fit: cover; 
    display: block; 
}
.chat-avatar{
    border-radius: 50%;
}
.start-conversation{
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: center;
    gap: 12px;
}
.error-msg{
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.spinner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 600;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #006EAB;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

#chatbot-offline {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 120px;
}

.chatbot-offline-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 48px;
}

.chatbot-offline-container img {
  max-width: 150px;
  height: auto;
}

.chatbot-offline-title {
  margin-top: 56px;
  font-size: 24px;
  font-weight: 600;
  color: #000;
}

.chatbot-offline-message {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  margin-top: 12px;
  line-height: 1.6;
}

.chatbot-offline-home-link {
  background-color: #006EAB;
  color: #fff;
  border-radius: 5px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 550;
  transition: 0.3s ease;
  margin-top: 48px;
  text-decoration: none;
}

.chatbot-offline-home-link:hover {
  background-color: #00365C;
  color: #fff;
}

@media (max-width: 768px) {
  .chatbot-offline-container {
    margin-bottom: 0;
    padding: 0 16px;
  }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.user-message{
    background-color: #EBF3F8CC;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 15px;
    gap: 15px;
}
.chat-response-container{
    display: flex;
    flex-direction: column;
    padding-right: 20px;
    padding-left: 20px;
    padding-bottom: 40px;
    gap: 24px;
}
.chat-response{
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
}
.previous-chat.chat-response{
    padding: 0 15px;
}
.chat-response-content{
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.user-message p{
    flex: 1;
    word-break: break-word;
    overflow-wrap: anywhere; 
    margin: 0;
}

.chat-response p, .user-message p {
    color: black;
    font-size: 16px;
}
.style-evaluate{
    background-color: transparent;
    border: none;
}
.evaluate-buttons-container{
    display: flex;
    flex-direction: row;
}
.ph-fill.ph-thumbs-up, .ph-fill.ph-thumbs-down{
    color: black;
}
.citations{
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.citations p{
    color: black;
    margin: 0;
    font-size: 16px;
    font-weight: 450;
}
.citation a{
    color: black;
}
.citation a:hover{
    color: #006EAB;
    text-decoration: underline;
}
.chat-response-footer{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: end;
}
.conversation-list{
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
    display: flex;
    flex-direction: column;
}

.conversation-list li{
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #B9CAD4;
    border-radius: 5px;
    height: 40px;
    display: flex;
}
.conversation-list li a{
    width: 100%;
    height: 100%;
    padding-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
    color: black;
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: space-between;
}
.conversation-list li a:hover{
    background-color: #f1f4f7 !important;
    color: black;
}
.conversation-list li a.active{
    background-color: #5CFFCD !important;
}
.preview-msg{
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    white-space: nowrap;
}
.preview-date{
    color: #454E56;
    min-width: fit-content;
}

.hamburger {
  all: unset; /* limpa tudo o que herda */
  display: none;
  font-size: 2rem;
  cursor: pointer;
  margin-right: 8px;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: unset;
  z-index: 999;
}

/* Mostrar overlay quando ativo */
.overlay.active {
  display: block;
  background-color: unset;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4); /* escurece o fundo */
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* No mobile: esconder sidebar inicialmente */
@media (max-width: 768px) {
  .chatbot-container {
    flex-direction: column;
  }

  .hamburger {
    display: block;
    color: black !important;
    background-color: white !important;
    border-radius: 5px;
    font-size: 18px !important;
  }

  .history-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    height: 100vh;
    max-height: none;
    background-color: white;
    transform: translateX(-100%);
    z-index: 1000;
    padding: 48px 12px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .history-sidebar.open {
    transform: translateX(0);
  }

  .chatbot {
    margin-left: 0;
    width: 100%;
  }
  .chatbot-header {
    justify-content: space-between;
  }
}

  