/* ═══════════════════════════════════════════════════════
   Bíblia Financeira · Shared Components CSS
   Componentes reutilizados entre páginas
   ═══════════════════════════════════════════════════════ */

/* FAQ accordion (default variant) */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer.open,
.faq-item.open .faq-answer {
  max-height: 800px;
}

/* FAQ variant: simple toggle (display none/block + icon rotate) */
body.faq-simple-toggle .faq-answer {
  display: none;
  overflow: hidden;
  max-height: none;
  transition: none;
}

body.faq-simple-toggle .faq-item.open .faq-answer {
  display: block;
  max-height: none;
}

body.faq-simple-toggle .faq-icon {
  transition: transform 0.3s ease;
}

body.faq-simple-toggle .faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* FAQ variant: animated max-height + icon rotate */
body.faq-animated-max .faq-answer {
  display: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

body.faq-animated-max .faq-item.open .faq-answer {
  display: block;
  max-height: 2000px;
  transition: max-height 0.5s ease-in;
}

body.faq-animated-max .faq-icon {
  transition: transform 0.3s ease;
}

body.faq-animated-max .faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Tooltip (fixed-position JS variant) */
.bf-tip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px dashed #94a3b8;
  cursor: help;
}

#bf-tooltip {
  position: fixed;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: normal;
  max-width: 240px;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.15s;
}

#bf-tooltip.visible {
  opacity: 1;
}

#bf-tooltip-arrow {
  position: fixed;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s;
}

/* === Componentes reutilizáveis === */
/* glass-card — credito-habitacao, guia-automovel, guia-corretoras, simulador-reforma */
.glass-card { background: #ffffff; border: 1px solid #e7eef3; }
.dark .glass-card { background: #1e2933; border-color: #334155; }

/* info-card — comprar-arrendar, impostos-trabalho, recibos-verdes, salario-liquido, seguranca-social */
.info-card { background: white; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.25rem 1.5rem; transition: box-shadow 0.2s, border-color 0.2s; }
.dark .info-card { background: #1e293b; border-color: #334155; }
.info-card:hover { box-shadow: 0 4px 16px rgba(25,144,230,0.1); border-color: #93c5fd; }
.dark .info-card:hover { border-color: #1990e6; }

/* sidebar-sticky — credito-habitacao, guia-automovel, simulador-reforma */
@media (min-width: 1024px) {
  .sidebar-sticky { position: sticky; top: 5rem; }
}

#bf-tooltip-arrow.visible {
  opacity: 1;
}
