/**
 * Central de Ajuda - Sidebar de suporte
 */

/* ===== Botão flutuante lateral (ícone de ajuda) ===== */
.ajuda-toggle {
  position: fixed;
  right: 0;
  top: calc(50% - 70px);
  z-index: 9996;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 8px 0 0 8px;
  background: var(--cor-primaria, #1E90FF);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: -2px 0 12px rgba(63, 69, 145, 0.4);
  transition: background 0.2s, transform 0.2s;
}
.ajuda-toggle:hover {
  background: var(--cor-primaria-escura, #003366);
  transform: translateX(-4px);
}
.ajuda-toggle:focus {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.ajuda-toggle[aria-expanded="true"] {
  background: var(--cor-primaria-escura, #003366);
}

/* Ajuste quando menu de acessibilidade está visível - empilhar ícones */
body:has(.acessibilidade-toggle) .ajuda-toggle {
  top: calc(50% - 110px);
}

/* ===== Sidebar da Central de Ajuda ===== */
.ajuda-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: var(--cor-primaria, #1E90FF);
  color: #fff;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
}
.ajuda-sidebar[aria-hidden="false"] {
  transform: translateX(0);
}

.ajuda-sidebar-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
}

.ajuda-sidebar-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.ajuda-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.35);
}
.ajuda-sidebar-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ajuda-sidebar-titulo {
  font-family: var(--fonte-display, Georgia, 'Times New Roman', serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding-right: 0.5rem;
}

.ajuda-sidebar-conteudo {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.ajuda-sidebar-subtitulo {
  font-size: 0.9375rem;
  opacity: 0.95;
  margin: 0 0 1.5rem 0;
}

.ajuda-sidebar-botoes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ajuda-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-align: left;
  width: 100%;
}
.ajuda-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}
.ajuda-btn:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.ajuda-btn i {
  font-size: 1.25rem;
  width: 1.5em;
  text-align: center;
  flex-shrink: 0;
}

/* Overlay quando sidebar aberta */
.ajuda-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9996;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.ajuda-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

/* Link no footer */
.rodape-ajuda-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #fff;
  font-size: var(--fonte-pequena);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.rodape-ajuda-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.rodape-ajuda-link i {
  font-size: 1.125rem;
}
.rodape-desenvolvido-sep {
  opacity: 0.6;
  margin: 0 0.25em;
}
