/* Import Google Font - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  /* Dark theme colors */
  --text-color: #edf3ff;
  --subheading-color: #97a7ca;
  --placeholder-color: #c3cdde;
  --primary-color: #101623;
  --secondary-color: #283045;
  --secondary-hover-color: #333e58;
  --scrollbar-color: #626a7f;
}

body.light-theme {
  /* Light theme colors */
  --text-color: #090c13;
  --subheading-color: #7b8cae;
  --placeholder-color: #606982;
  --primary-color: #f3f7ff;
  --secondary-color: #dce6f9;
  --secondary-hover-color: #d2ddf2;
  --scrollbar-color: #a2aac2;
}

body {
  color: var(--text-color);
  background: var(--primary-color);
}

.logo img {
    height: 50px;
}

.cabeca {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/*===== Ivones soviais =====*/
.social-container {
  gap: 30px;
  background: linear-gradient(to right, #1d7efd, #8f6fff);
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.social-icon {
  color: white;
  font-size: 20px;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.2);
}

/* Individual glowing effects */
.facebook:hover {
  color: #3b5998;
  text-shadow: 0 0 10px #3b5998, 0 0 20px blue, 0 0 30px mediumblue;
}

.instagram:hover {
  color: #e4405f;
  text-shadow: 0 0 10px #e4405f, 0 0 20px #e4405f, 0 0 30px #e4405f;
}

.snapchat:hover {
  color: #fffc00;
  text-shadow: 0 0 10px #fffc00, 0 0 20px #fffc00, 0 0 30px #fffc00;
}

.tiktok:hover {
  color: #69c9d0;
  text-shadow: 0 0 10px #69c9d0, 0 0 20px #69c9d0, 0 0 30px #69c9d0;
}

.whatsapp {
  color: #25d366;
  transition: all 0.5s ease;
}

.whatsapp:hover {
  color: #25d366;
  text-shadow: 0 0 15px #25d366, 0 0 30px #25d366, 0 0 45px #25d366;
  transform: scale(1.3);
}

.container {
  overflow-y: auto;
  padding: 32px 0 60px;
  height: calc(100vh - 127px);
  scrollbar-color: var(--scrollbar-color) transparent;
}

.container :where(.app-header, .suggestions, .message, .prompt-wrapper) {
  position: relative;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  max-width: 990px;
}

.container .app-header {
  margin-top: 3vh;
}

.app-header .heading {
  width: fit-content;
  font-size: 3rem;
  background: linear-gradient(to right, #1d7efd, #8f6fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-header .sub-heading {
  font-size: 2.6rem;
  margin-top: -5px;
  color: var(--subheading-color);
}

.container .suggestions {
  width: 100%;
  list-style: none;
  display: flex;
  gap: 15px;
  margin-top: 9.5vh;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body.chats-active .container :where(.app-header, .suggestions) {
  display: none;
}

.suggestions .suggestions-item {
  cursor: pointer;
  padding: 18px;
  width: 228px;
  flex-shrink: 0;
  display: flex;
  scroll-snap-align: center;
  flex-direction: column;
  align-items: flex-end;
  border-radius: 12px;
  justify-content: space-between;
  background: var(--secondary-color);
  transition: 0.3s ease;
}

.suggestions .suggestions-item:hover {
  background: var(--secondary-hover-color);
}

.suggestions .suggestions-item .text {
  font-size: 1.1rem;
}

.suggestions .suggestions-item .icon {
  width: 45px;
  height: 45px;
  display: flex;
  font-size: 1.4rem;
  margin-top: 35px;
  align-self: flex-end;
  align-items: center;
  border-radius: 50%;
  justify-content: center;
  color: #1d7efd;
  background: var(--primary-color);
}

.suggestions .suggestions-item:nth-child(2) .icon {
  color: #28a745;
}

.suggestions .suggestions-item:nth-child(3) .icon {
  color: #ffc107;
}

.suggestions .suggestions-item:nth-child(4) .icon {
  color: #6f42c1;
}

.container .chats-container {
  display: flex;
  gap: 20px;
  flex-direction: column;
}

.chats-container .message {
  display: flex;
  gap: 11px;
  align-items: center;
}

.chats-container .message .avatar {
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: 50%;
  padding: 6px;
  margin-right: -7px;
  background: var(--secondary-color);
  border: 1px solid var(--secondary-hover-color);
}

.chats-container .message.loading .avatar {
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.chats-container .message .message-text {
  padding: 3px 16px;
  word-wrap: break-word;
  white-space: pre-line;
}

.chats-container .bot-message {
  margin: 9px auto;
}

.chats-container .user-message {
  flex-direction: column;
  align-items: flex-end;
}

.chats-container .user-message .message-text {
  padding: 12px 16px;
  max-width: 75%;
  background: var(--secondary-color);
  border-radius: 13px 13px 3px 13px;
}

.chats-container .user-message .img-attachment {
  margin-top: -7px;
  width: 50%;
  border-radius: 13px 3px 13px 13px;
}

.chats-container .user-message .file-attachment {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px;
  margin-top: -7px;
  border-radius: 13px 3px 13px 13px;
  background: var(--secondary-color);
}

.chats-container .user-message .file-attachment span {
  color: #1d7efd;
}

.container .prompt-container {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 16px 0;
  background: var(--primary-color);
}

.prompt-container :where(.prompt-wrapper, .prompt-form, .prompt-actions) {
  display: flex;
  gap: 12px;
  height: 56px;
  align-items: center;
}

.prompt-container .prompt-form {
  height: 100%;
  width: 100%;
  border-radius: 130px;
  background: var(--secondary-color);
}

.prompt-form .prompt-input {
  width: 100%;
  height: 100%;
  background: none;
  outline: none;
  border: none;
  font-size: 1rem;
  color: var(--text-color);
  padding-left: 24px;
}


.prompt-form .prompt-input::placeholder {
  color: var(--placeholder-color);
}

.prompt-wrapper button {
  width: 56px;
  height: 100%;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1.4rem;
  border: none;
  color: var(--text-color);
  background: var(--secondary-color);
  transition: 0.3s ease;
}

.prompt-wrapper :is(button:hover, #cancel-file-btn, .file-icon) {
  background: var(--secondary-hover-color);
}

.prompt-form .prompt-actions {
  gap: 5px;
  margin-right: 7px;
}

.prompt-wrapper .prompt-form :where(.file-upload-wrapper, button, img) {
  position: relative;
  height: 45px;
  width: 45px;
}

.prompt-form .prompt-actions #send-prompt-btn {
  color: #fff;
  display: none;
  background: #1d7efd;
}

.prompt-form .prompt-input:valid~.prompt-actions #send-prompt-btn {
  display: block;
}

.prompt-form #send-prompt-btn:hover {
  background: #0264e3;
}

.prompt-form .file-upload-wrapper :where(button, img) {
  display: none;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
}

.prompt-form .file-upload-wrapper.active #add-file-btn {
  display: none;
}

.prompt-form .file-upload-wrapper #add-file-btn,
.prompt-form .file-upload-wrapper.active.img-attached img,
.prompt-form .file-upload-wrapper.active.file-attached .file-icon,
.prompt-form .file-upload-wrapper.active:hover #cancel-file-btn {
  display: block;
}

.prompt-form :is(#stop-response-btn:hover, #cancel-file-btn) {
  color: #d62939;
}

.prompt-wrapper .prompt-form .file-icon {
  color: #1d7efd;
}

.prompt-form #stop-response-btn,
body.bot-responding .prompt-form .file-upload-wrapper {
  display: none;
}

body.bot-responding .prompt-form #stop-response-btn {
  display: block;
}

.prompt-container .disclaimer-text {
  font-size: 0.9rem;
  text-align: center;
  padding: 16px 20px 0;
  color: var(--placeholder-color);
}

/* Responsive media query code for small screens */
@media (max-width: 768px) {
  .container {
    padding: 20px 0 100px;
  }
  
  .app-header :is(.heading, .sub-heading) {
    font-size: 2rem;
    line-height: 1.4;
  }
  
  .app-header .sub-heading {
    font-size: 1.7rem;
  }
  
  .container .chats-container {
    gap: 15px;
  }
  
  .chats-container .bot-message {
    margin: 4px auto;
  }
  
  .prompt-container :where(.prompt-wrapper, .prompt-form, .prompt-actions) {
    gap: 8px;
    height: 53px;
  }
  
  .prompt-container button {
    width: 53px;
  }
  
  .prompt-form :is(.file-upload-wrapper, button, img) {
    height: 42px;
    width: 42px;
  }
  
  .prompt-form .prompt-input {
    padding-left: 20px;
  }
  
  .prompt-form .file-upload-wrapper.active #cancel-file-btn {
    opacity: 0;
  }
  
  .prompt-wrapper.hide-controls :where(#theme-toggle-btn, #delete-chats-btn) {
    display: none;
  }
}

.bookmart {
  background: none;
  padding: 20px;
  color: #000;
}

.message-time {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-bottom: 4px;
  display: block;
}

/* Hora do usuário (alinhada à direita) */
.user-message .message-time {
  text-align: right;
  margin-right: 6px;
}

/* Hora do bot (alinhada à esquerda) */
.bot-message .message-time {
  text-align: left;
  margin-left: 15px; /* alinha com o texto, não com o avatar */
}

/* Container do bot */
.bot-content {
  display: flex;
  flex-direction: column;
}

/* ===== Message Actions ===== */
.message-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Mostrar ao passar o mouse (desktop) */
.bot-message:hover .message-actions {
  opacity: 1;
}

/* Sempre visível no mobile */
@media (max-width: 768px) {
  .message-actions {
    opacity: 1;
  }
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--placeholder-color);
  padding: 4px;
  transition: transform 0.2s, color 0.2s;
}

.action-btn:hover {
  transform: scale(1.15);
  color: var(--text-color);
}

/* Feedback visual */
.action-btn.like.active {
  color: #28a745;
}

.action-btn.dislike.active {
  color: #d62939;
    }

/* ===== LOGIN MODAL ===== */
.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-box {
  background: var(--secondary-color);
  padding: 30px 25px;
  width: 90%;
  max-width: 360px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: fadeUp 0.4s ease;
}

.login-logo {
  width: 70px;
  margin-bottom: 10px;
}

.login-box h2 {
  margin-bottom: 5px;
  font-size: 1.4rem;
}

.login-box p {
  font-size: 0.95rem;
  color: var(--placeholder-color);
  margin-bottom: 15px;
}

.login-box input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  outline: none;
  background: var(--primary-color);
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 1rem;
}

.login-box button {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to right, #1d7efd, #8f6fff);
  transition: transform 0.2s ease, opacity 0.2s;
}

.login-box button:hover {
  transform: scale(1.03);
  opacity: 0.95;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BOTÃO SAIR (LOGOUT) ===== */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 5px;
  border: none;
  cursor: pointer;

  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;

  background: linear-gradient(to right, #1d7efd, #8f6fff);

  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}

.logout-btn span.material-symbols-rounded {
  font-size: 1.3rem;
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(214, 41, 57, 0.45);
  opacity: 0.95;
}

.logout-btn:active {
  transform: scale(0.96);
}

/* ===== SIDEBAR DIREITA ===== */
.side-menu {
  position: fixed;
  top: 0;
  right: -100vw;
  width: 100vw;
  height: 100vh;
  background: var(--secondary-color);
  box-shadow: -10px 0 30px rgba(0,0,0,0.35);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: right 0.35s ease;
}

.side-menu.active {
  right: 0;
}

/* Header */
.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, #1d7efd, #8f6fff);
  margin: -20px -20px 20px -20px;
  padding: 16px 20px;
}

.side-menu-header img {
  height: 50px;
  color: #000;
}

.side-menu-header h3 {
  font-size: 1.2rem;
}

.side-menu-header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2.5rem;
  color: white;
}

/* Lista */
.side-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s;
}

.side-item span.material-symbols-rounded {
  font-size: 1.4rem;
  color: #1d7efd;
}

.side-item:hover {
  background: var(--secondary-hover-color);
  transform: translateX(5px);
}

/* Logout 100% */
.side-logout {
  padding: 10px 20px;
  width: 100%;
  justify-content: center;
  margin-top: 20px;
}

/* Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9997;
}

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

/* ===============================
   SIDEBAR – VERSÃO PC / DESKTOP
================================ */
@media (min-width: 728px) {

  .side-menu {
    width: 360px;
    right: -380px;
    padding: 28px;
    border-left: 1px solid var(--secondary-hover-color);
  }

  .side-menu.active {
    right: 0;
  }

  .side-menu-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
  }

  .side-menu-list {
    margin-top: 10px;
  }

  .side-item {
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 1.05rem;
  }

  .side-item span.material-symbols-rounded {
    font-size: 1.6rem;
  }

  .side-item:hover {
    background: linear-gradient(
      to right,
      rgba(29, 126, 253, 0.15),
      transparent
    );
    transform: translateX(6px);
  }

  /* Logout estilo painel */
  .side-logout {
    height: 52px;
    border-radius: 14px;
    font-size: 1rem;
  }

  /* Overlay mais discreto no PC */
  .menu-overlay {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(2px);
  }
}
@media (min-width: 1280px) {
  .side-menu {
    right: 0;
    position: sticky;
    height: 100vh;
  }

  .menu-overlay {
    display: none;
  }
}




