/* FounderBrain Cookie Consent styles. Theme-aware (light/dark), brand accent via --fbc-accent. */
.fbc-root { --fbc-accent: #111827; }
.fbc-root, .fbc-root * { box-sizing: border-box; }

.fbc-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000;
  background: #ffffff; color: #1f2937;
  border-top: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.12);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: fbc-up .28s ease;
}
@keyframes fbc-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.fbc-inner {
  max-width: 1200px; margin: 0 auto; padding: 16px 20px;
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.fbc-text { flex: 1 1 420px; min-width: 260px; }
.fbc-text strong { display: block; font-size: 15px; margin-bottom: 4px; }
.fbc-text p { margin: 0; font-size: 13px; line-height: 1.5; color: #4b5563; }
.fbc-text a { color: var(--fbc-accent); text-decoration: underline; }

.fbc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fbc-btn {
  appearance: none; border: 1px solid transparent; border-radius: 8px;
  padding: 10px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; line-height: 1; transition: filter .15s ease, background .15s ease;
}
.fbc-btn:focus-visible { outline: 2px solid var(--fbc-accent); outline-offset: 2px; }
.fbc-primary { background: var(--fbc-accent); color: #fff; }
.fbc-primary:hover { filter: brightness(1.08); }
.fbc-secondary { background: transparent; color: #1f2937; border-color: rgba(0,0,0,0.25); }
.fbc-secondary:hover { background: rgba(0,0,0,0.04); }
.fbc-ghost { background: transparent; color: var(--fbc-accent); border-color: var(--fbc-accent); }
.fbc-ghost:hover { background: rgba(0,0,0,0.04); }

/* preferences modal */
.fbc-overlay {
  position: fixed; inset: 0; z-index: 2147483001;
  background: rgba(15,23,42,0.55); display: flex; align-items: center; justify-content: center;
  padding: 20px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: fbc-fade .2s ease;
}
@keyframes fbc-fade { from { opacity: 0; } to { opacity: 1; } }
.fbc-modal {
  background: #fff; color: #1f2937; width: 100%; max-width: 620px; max-height: 86vh;
  border-radius: 14px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.fbc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 12px; }
.fbc-modal-head h2 { margin: 0; font-size: 18px; }
.fbc-close { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280; padding: 0 4px; }
.fbc-close:hover { color: #111827; }
.fbc-modal-body { padding: 4px 22px 8px; overflow-y: auto; }
.fbc-lead { font-size: 13px; color: #4b5563; line-height: 1.55; margin: 0 0 8px; }

.fbc-cat { border-top: 1px solid rgba(0,0,0,0.08); padding: 14px 0; }
.fbc-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fbc-cat-label { font-size: 14px; font-weight: 700; }
.fbc-always { font-size: 12px; font-weight: 700; color: #16a34a; }
.fbc-cat-desc { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: #4b5563; }

/* toggle switch */
.fbc-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.fbc-switch input { opacity: 0; width: 0; height: 0; }
.fbc-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .18s ease; cursor: pointer; }
.fbc-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s ease; }
.fbc-switch input:checked + .fbc-slider { background: var(--fbc-accent); }
.fbc-switch input:checked + .fbc-slider::before { transform: translateX(18px); }
.fbc-switch input:focus-visible + .fbc-slider { outline: 2px solid var(--fbc-accent); outline-offset: 2px; }

.fbc-modal-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 22px 20px; border-top: 1px solid rgba(0,0,0,0.08); }

/* reopen links */
.fbc-footer-link { font-size: 13px; opacity: .85; text-decoration: underline; cursor: pointer; }
.fbc-corner-link {
  position: fixed; left: 14px; bottom: 14px; z-index: 2147482000;
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  background: rgba(17,24,39,0.82); color: #fff; text-decoration: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.fbc-corner-link:hover { background: rgba(17,24,39,0.95); }

/* dark theme: honor OS preference and common site theme hooks */
@media (prefers-color-scheme: dark) {
  .fbc-banner { background: #0f172a; color: #e5e7eb; border-top-color: rgba(255,255,255,0.10); }
  .fbc-text p { color: #9ca3af; }
  .fbc-secondary { color: #e5e7eb; border-color: rgba(255,255,255,0.28); }
  .fbc-secondary:hover, .fbc-ghost:hover { background: rgba(255,255,255,0.06); }
  .fbc-modal { background: #0f172a; color: #e5e7eb; }
  .fbc-close { color: #9ca3af; } .fbc-close:hover { color: #fff; }
  .fbc-lead, .fbc-cat-desc { color: #9ca3af; }
  .fbc-cat, .fbc-modal-foot { border-color: rgba(255,255,255,0.10); }
  .fbc-slider { background: #475569; }
}
:root[data-theme="dark"] .fbc-banner, html.dark .fbc-banner, .dark .fbc-banner { background: #0f172a; color: #e5e7eb; border-top-color: rgba(255,255,255,0.10); }
:root[data-theme="dark"] .fbc-text p, html.dark .fbc-text p, .dark .fbc-text p { color: #9ca3af; }
:root[data-theme="dark"] .fbc-modal, html.dark .fbc-modal, .dark .fbc-modal { background: #0f172a; color: #e5e7eb; }
:root[data-theme="dark"] .fbc-secondary, html.dark .fbc-secondary, .dark .fbc-secondary { color: #e5e7eb; border-color: rgba(255,255,255,0.28); }
:root[data-theme="dark"] .fbc-lead, :root[data-theme="dark"] .fbc-cat-desc,
html.dark .fbc-lead, html.dark .fbc-cat-desc, .dark .fbc-lead, .dark .fbc-cat-desc { color: #9ca3af; }
:root[data-theme="dark"] .fbc-cat, :root[data-theme="dark"] .fbc-modal-foot,
html.dark .fbc-cat, html.dark .fbc-modal-foot, .dark .fbc-cat, .dark .fbc-modal-foot { border-color: rgba(255,255,255,0.10); }

@media (max-width: 640px) {
  .fbc-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .fbc-actions { justify-content: stretch; }
  .fbc-actions .fbc-btn { flex: 1 1 auto; }
}
