@import url('https://unpkg.com/primeicons/primeicons.css');

:root {
  --pbdoc-footer-bg: #0f2a47;
  --pbdoc-footer-text: #ffffff;
  --pbdoc-primary-lighter: #60a5fa;
  --pbdoc-primary-light: #93c5fd;
}

/* Container do Footer */
.pbdoc-footer {
  background-color: var(--pbdoc-footer-bg);
  color: var(--pbdoc-footer-text);
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 5px 0 var(--pbdoc-footer-bg); /* Preenche qualquer falha milimétrica (subpixel) na parte inferior */
}

@media screen and (min-width: 1200px) {
  .pbdoc-footer {
    min-height: 119.7px;
  }
}

/* Linha Superior em Gradiente (4px) */
.footer__gradient {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #7c3aed 0%, #2670e8 50%, #16a34a 100%);
}

/* Layout Principal */
.footer__main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  padding: 0.5rem 1rem;
  width: 100%;
}

/* Grid de 3 Colunas no Desktop (≥ 1200px) */
@media screen and (min-width: 1200px) {
  .footer__main {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem;
  }
}

/* Seções Internas */
.footer__part {
  min-width: 0;
}

@media screen and (min-width: 1200px) {
  .footer__main {
    padding-left: 3rem;
    padding-right: 3rem;
    height: 115.7px; /* Mantém o tamanho exato que você pediu */
  }

  .footer__part {
    padding: 0.25rem 1.5rem; /* 4px vertical, 24px horizontal conforme especificado */
  }

  .footer__part:not(:first-child) {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  .footer__part:first-child {
    padding-left: 0;
  }

  .footer__part:last-child {
    padding-right: 0;
  }
}

.footer__logo {
  width: auto;
  height: 2.75rem;
}

.footer__subtitle {
  font-size: 0.85rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.70);
  max-width: 20rem;
}

/* Divisores Verticais e Horizontais */
.footer__subdivider {
  width: 1px;
  height: 1.4rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
}

.footer__hdivider {
  width: 100%;
  height: 1px !important;
  min-height: 1px !important;
  flex-shrink: 0; /* Impede esmagamento */
  align-self: stretch; /* Garante que ocupe 100% da largura mesmo com align-items: center no pai */
  background-color: rgba(255, 255, 255, 0.12) !important;
  display: block;
}

/* Ícones e Textos da Coluna Central (Info) */
.footer__info-icon {
  font-size: 1.5rem;
  color: var(--pbdoc-primary-lighter);
  margin-bottom: 0.1rem;
}

.text-purple-500 {
  color: #a855f7 !important;
}

.text-green-500 {
  color: #22c55e !important;
}

.footer__info-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.60);
}

.footer__info-link:hover {
  color: #ffffff;
}

/* Cor especial apenas para o link do Release Notes */
#releaseNotesTrigger {
  color: #2670e8 !important;
}

#releaseNotesTrigger:hover {
  color: #4b8df2 !important; /* Um pouco mais claro no hover */
  text-decoration: underline !important;
}

/* Ensure items share equal width perfectly */
.footer__links > a, .footer__logos > a {
  flex: 1 1 0% !important;
  min-width: 0;
}

.footer__info-item {
  flex: 1 1 auto !important; 
  min-width: 0;
}

.footer__info-item:not(.footer__info-item--versao) {
  flex-shrink: 0 !important; /* Impede que Ambiente e Novidades encolham, forçando apenas a Versão a ser espremida/truncada */
}

.footer__info-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pbdoc-footer-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

.footer__info-link {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pbdoc-primary-light);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.footer__info-link:hover {
  text-decoration: underline;
}

/* Links Úteis (Manual, Suporte, Status) */
.footer__link {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__link .pi {
  font-size: 1rem;
  color: #60a5fa;
}

.footer__link:hover {
  color: #60a5fa;
}

/* Logos CODATA e Governo */
.footer__logo-codata {
  height: 1.5rem;
  max-width: 100%;
}

.footer__logo-governo {
  height: 2.8rem;
  max-width: 100%;
}

/* Balão de Release Notes - Customização baseada no Vue Popover */
#releaseNotesBalloon {
  width: 950px !important;
  max-width: 950px !important;
  height: 490px !important;
  background-color: #EEEEEE !important;
  color: #495057 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
  box-sizing: border-box !important;
  padding: 8px !important;
  overflow-y: hidden;
  text-align: justify;
  margin-bottom: 12px; /* Espaço pro triângulo */
  /* Efeito slide-up ao abrir */
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

#releaseNotesBalloon.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

/* Seta (Caret/Triângulo) apontando para baixo pro botão (Dropup) */
#releaseNotesBalloon::after {
  content: "";
  position: absolute;
  bottom: -8px; /* Fora do balão */
  right: 48px; /* Alinhado ao centro do botão (que fica no canto direito agora) */
  left: auto;
  transform: none;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #EEEEEE transparent transparent transparent;
  display: block;
  width: 0;
}

#releaseNotesBalloon .sticky-top {
  background-color: #EEEEEE !important;
  border-bottom: none;
}

#releaseNotesBalloon h5 {
  font-weight: 700;
  font-size: 1.0rem; /* 16px */
  color: #334155 !important;
  margin-bottom: 0.1rem; /* aproximar conteúdo do header */
}

#releaseNotesBalloon .btn-close {
  margin-top: -0.1rem;
}

/* Formatação do Markdown Injetado no Balão — padrão PBDoc */
#releaseNotesConteudo {
  color: #495057 !important;
  font-size: 1rem;
  line-height: 1.5;
  text-align: justify;
  height: 450px !important;
  overflow-y: auto !important;
}

#releaseNotesConteudo h1,
#releaseNotesConteudo h2,
#releaseNotesConteudo h3,
#releaseNotesConteudo h4 {
  font-size: 1.0rem; /* 16px */
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: #334155 !important;
  margin-top: 0.5rem; /* 8px */
  margin-bottom: 0; /* distância abaixo controlada pela ul/p */
}

#releaseNotesConteudo h1:first-child,
#releaseNotesConteudo h2:first-child,
#releaseNotesConteudo h3:first-child,
#releaseNotesConteudo h4:first-child {
  margin-top: 0.1rem; /* colado ao header do balão */
}

#releaseNotesConteudo ul {
  list-style-type: disc;
  font-size: 0.9rem;
  margin-top: 0.4rem; /* aproximar lista do header */
  margin-right: 0.5rem;
  padding-left: 1.25rem;
}

#releaseNotesConteudo li {
  margin-bottom: 0.35rem; /* ~5.6px */
  line-height: 1.5;
  color: #495057 !important;
}

#releaseNotesConteudo p {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#releaseNotesConteudo strong {
  font-weight: 400;
  color: #495057;
}
