/* Best Brains — in-house Consent Manager styles (Phase 1, DRAFT for review).
   Neutral, easily re-themed to match the site. Loaded by consent_head_bb.jsp. */

#bb-consent[hidden], #bb-consent-panel[hidden] { display: none !important; }

#bb-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000;
  background: #ffffff; color: #1c2733;
  border-top: 3px solid #1f5bad;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .18);
  font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5;
}
#bb-consent .bb-consent-inner {
  max-width: 1180px; margin: 0 auto; padding: 18px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
}
#bb-consent .bb-consent-copy { flex: 1 1 420px; min-width: 260px; margin: 0; }
#bb-consent .bb-consent-copy a { color: #1f5bad; text-decoration: underline; }
#bb-consent .bb-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }

#bb-consent button {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 6px;
  padding: 10px 18px; border: 1px solid #1f5bad; white-space: nowrap;
}
#bb-consent .bb-btn-primary { background: #1f5bad; color: #fff; }
#bb-consent .bb-btn-secondary { background: #fff; color: #1f5bad; }
#bb-consent .bb-btn-link { background: transparent; border-color: transparent; color: #43506180; text-decoration: underline; padding: 10px 8px; }
#bb-consent button:hover { filter: brightness(0.96); }
#bb-consent button:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }

/* Preferences panel (modal) */
#bb-consent-panel {
  position: fixed; inset: 0; z-index: 2147483001;
  background: rgba(15, 22, 31, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
#bb-consent-panel .bb-panel-card {
  background: #fff; color: #1c2733; border-radius: 12px; max-width: 560px; width: 100%;
  max-height: 88vh; overflow: auto; padding: 24px 26px;
  font-family: Arial, Helvetica, sans-serif; box-shadow: 0 12px 48px rgba(0, 0, 0, .35);
}
#bb-consent-panel h2 { margin: 0 0 6px; font-size: 20px; }
#bb-consent-panel .bb-cat {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid #e6e8ea;
}
#bb-consent-panel .bb-cat input { margin-top: 3px; width: 18px; height: 18px; }
#bb-consent-panel .bb-cat label b { display: block; font-size: 15px; }
#bb-consent-panel .bb-cat label span { color: #566270; font-size: 13px; }
#bb-consent-panel .bb-panel-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
#bb-consent-panel button {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 6px;
  padding: 10px 18px; border: 1px solid #1f5bad;
}
#bb-consent-panel .bb-btn-primary { background: #1f5bad; color: #fff; }
#bb-consent-panel .bb-btn-secondary { background: #fff; color: #1f5bad; }
#bb-consent-panel button:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }

/* Persistent "Your Privacy Choices" re-open control (place in site footer). */
.bb-privacy-choices-link { background: none; border: none; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

@media (max-width: 640px) {
  #bb-consent .bb-consent-inner { flex-direction: column; align-items: stretch; }
  /* In column layout the copy's flex-basis (420px) would become a HEIGHT and
     balloon the bar — reset it so the banner hugs its content. */
  #bb-consent .bb-consent-copy { flex: 0 0 auto; min-width: 0; }
  #bb-consent .bb-consent-actions { width: 100%; }
  #bb-consent .bb-consent-actions button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  #bb-consent { animation: bb-consent-in .28s ease-out; }
  @keyframes bb-consent-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
}
