/* style/analu.css */

/* === LAYOUT GERAL === */
.landing-container.refined {
  margin-top: 40px;
  padding: 0px 5%;
}

/* === GRID PRINCIPAL === */
.button-area {
  display: grid;
  grid-template-columns: 260px 1fr;             /* avatar fixo + coluna fluida */
  grid-template-rows: auto auto;                /* 1ª linha: avatar+mensagem; 2ª: botões */
  grid-template-areas:
    "avatar message"
    "avatar buttons";
  gap: 32px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* === AVATAR === */
.analu-column.refined-avatar {
  grid-area: avatar;
  max-width: 260px;
  width: 100%;
  justify-self: center;  /* centra horizontalmente */
  align-self: start;     /* alinha ao topo */
}

/* === BALÃO DA ANALU (mensagem) === */
.interaction-column.refined-interaction {
  grid-area: message;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-wrap: break-word;
}
.analu-message {
  border-left: 5px solid #007bff;
  padding: 20px;
  border-radius: 10px;
  font-size: 1.05em;
  line-height: 1.5;
  max-height: 240px;      /* opcional, evita esticar demais */
  overflow-wrap: anywhere;
  word-break: break-word; /* força o browser a quebrar onde for preciso */
  overflow: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* === BOTÕES DE AÇÃO === */
.refined-buttons {
  grid-area: buttons;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* === PORTE DA IMAGEM DO AVATAR === */
.analu-portrait {
  width: 280px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

/* Tema claro */
html:not(.dark) .analu-message {
  background-color: #f0f8ff;
  color: #002244;
}

/* Tema escuro */
html.dark .analu-message {
  background-color: #002244;
  color: #f8f9fa;
}

/* === BOTÕES DE AÇÃO PRINCIPAIS === */

.refined-buttons {
    display: flex;
  flex-direction: column;
  gap: 16px;
}

.refined-button {
  padding: 14px 20px;
  background-color: #0069d9;
  color: white;
  text-decoration: none;
  border-radius: 999px; /* estilo (_) */
  font-size: 1em;
  font-weight: 500;
  transition: background-color 0.3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.refined-button:hover {
  background-color: #0056b3;
}

/* === LINK ESTILO BOTÃO: "Ver todas as ferramentas" === */
.refined-button.secondary {
  background-color: #ffffff;
  color: #0069d9;
  border: 2px solid #0069d9;
}

.refined-button.secondary:hover {
  background-color: #e6f0ff;
}

/* Container geral */
#allToolsSection {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 20px;
}

/* Linhas de botões */
.tools-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* Estilo base dos botões */
a.button {
  padding: 12px 18px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.95em;
  font-weight: 500;
  transition: background-color 0.3s;
  text-align: center;
  min-width: 180px;
}

a.button:hover {
  background-color: #0056b3;
}

/* Botões inativos */
a.button.button-inactive {
  background-color: #00438c;
  color: #e0e0e0;
  cursor: not-allowed;
  position: relative;
  pointer-events: auto;
}

/* Tooltip */
a.button.button-inactive::after {
  content: "Em desenvolvimento";
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  z-index: 10;
}

a.button.button-inactive:hover::after {
  opacity: 1;
}

/* === BOTÃO FLUTUANTE + JANELA DE CHAT (Analu Assistente) === */
.analu-float {
  position: fixed;
  bottom: 20px;
  right: max(calc((100vw - 960px)/2 - 10px), 20px);
  z-index: 9999;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.analu-float img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.analu-float:hover img {
  transform: scale(1.05);
}

/* === JANELA DE CHAT === */
#analu-chat {
  display: none;
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  max-height: 400px;
  background: #ffffff;
  border: 2px solid #ccc;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 9998;
  overflow: hidden;
  font-family: Arial, sans-serif;
  flex-direction: column;
}

#analu-chat.open {
  display: flex;
}

.chat-header {
  background: #0066cc;
  color: white;
  padding: 10px;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
}

.chat-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
  color: #333;
  margin-bottom: 12px;
}

#analu-input {
  border: none;
  border-top: 1px solid #ddd;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
}

/* === BOLHAS DE MENSAGEM === */
.user-msg,
.analu-msg {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  max-width: 90%;
}

.user-msg {
  background: #e0f7fa;
  align-self: flex-end;
  text-align: right;
}

.analu-msg {
  background: #f1f1f1;
  align-self: flex-start;
}

.analu-msg a,
.analu-msg a:visited,
.user-msg a,
.user-msg a:visited {
  color: inherit;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.analu-msg a:hover,
.user-msg a:hover {
  color: #111;
  text-decoration: underline;
  opacity: 0.85;
}

#allToolsSection {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
}

#allToolsSection.visible {
  display: flex;
  opacity: 1;
  max-height: 800px; /* ou ajuste conforme o número de botões */
}

/* Estilo base da animação */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.8);
  }
  40% {
    transform: scale(1.1);
    box-shadow: 0 0 0 25px rgba(0, 123, 255, 0);
  }
  50% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

.highlight-pulse {
  animation: pulse 1.4s ease-out 1;
}

.highlight-pulse-infinite {
  animation: pulse 2.5s ease-out infinite;
}

/* Somente ajuste de cor de borda no dark mode */
@media (prefers-color-scheme: dark) {
  .highlight-pulse,
  .highlight-pulse-infinite {
    border-color: #00aeff;
  }
}

.register-subnote {
    font-size: 14px;
  color: var(--text-secondary);
  font-weight: normal;
  display: block;
  margin-top: 4px;
}

/* === SMARTPHONES: ≤600px e pointer coarse === */
@media (max-width: 1024px) and (pointer: coarse) {
  .landing-container.refined .button-area {
    display: grid;
    grid-template-areas:
      "avatar message"
      "buttons buttons";
    grid-template-columns: 140px 1fr;
    grid-template-rows: auto 1fr;
    gap: 16px;
    padding: 0 12px;
  }

  .landing-container.refined .analu-column.refined-avatar {
    grid-area: avatar;
    width: 140px !important;            /* fixa 50% do tamanho de desktop */
    max-width: none !important;
    margin: 0;                          /* já centraliza pela grid */
  }
  .landing-container.refined .analu-portrait {
    width: 100% !important;             /* preenche a coluna do avatar */
    height: auto !important;
  }

  .landing-container.refined .interaction-column.refined-interaction {
    grid-area: message;
    padding: 0 8px;
  }

  .landing-container.refined .refined-buttons {
    grid-area: buttons !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  .landing-container.refined .social-login-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .landing-container.refined .social-login-btn,
  .landing-container.refined .refined-button {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  
  .landing-container.refined .button-area > .refined-buttons {
    grid-area: buttons !important;
  }
}

.landing-privacy-hint {
  text-align: center;
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 12px;
  max-width: 420px;
  align-self: center;
}

.info-section.faq-section ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  text-align: left; /* garante o alinhamento à esquerda */
}

.info-section.faq-section li {
  margin-bottom: 1em;
  text-align: left; /* reforça o alinhamento em cada item */
}

.info-section.faq-section strong,
.info-section.faq-section span {
  display: inline-block;
  text-align: left;
}
