/*
 * B@kkel-thema voor fr24.bakkel.com (adsb-portal) en space.bakkel.com (space-tracker).
 *
 * Het derde thema in de themaswitcher van de portals ("custom"). Geladen via
 * THEME_CSS_URL (systemd drop-in op de Pi, met THEME_NAME=B@kkel,
 * THEME_BASE=light, DEFAULT_THEME=custom). Alles hieronder geldt alleen als
 * html[data-theme="custom"] actief is; de lichte kaart/overlays komen uit de
 * portals' eigen themes.css (data-mode="light").
 * Kleuren als 6-cijferige hex: stats.html plakt er alpha-suffixen achter.
 */

@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://bakkel.com/assets/fonts/courier-prime-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://bakkel.com/assets/fonts/courier-prime-bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Courier Prime';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('https://bakkel.com/assets/fonts/courier-prime-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Courier Prime';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('https://bakkel.com/assets/fonts/courier-prime-bold-italic.woff2') format('woff2');
}

/* Merk-link uit portal-brand.js: alleen zichtbaar in het B@kkel-thema */
.bk-brand { display: none; }

html[data-theme="custom"] {
  /* B@kkel-tokens (zelfde als bakkel.com/style.css) */
  --color-text: #111111;
  --color-text-muted: #555555;
  --color-text-faint: #999999;
  --color-accent: #dc3545;
  --color-bg: #f8f8f8;
  --color-surface: #ebebeb;
  --color-surface-hover: #e2e2e2;
  --font-family-mono: 'Courier Prime', monospace;

  /* Portal-tokens, gemapt op de B@kkel-tokens */
  --bg:     #f8f8f8;
  --bg2:    #ffffff;
  --bg3:    #ebebeb;
  --border: #dddddd;
  --text:   #111111;
  --muted:  #555555;
  --accent: #dc3545;

  /* Statuskleuren, donkerder zodat ze op wit leesbaar blijven */
  --green:  #1a7f37;
  --yellow: #9a6700;
  --orange: #bc4c00;
  --red:    #cf222e;
  --emerg:  #d00000;
  --gold:   #a87b00;
  --purple: #8250df;
}

html[data-theme="custom"],
html[data-theme="custom"] body,
html[data-theme="custom"] button,
html[data-theme="custom"] input,
html[data-theme="custom"] select,
html[data-theme="custom"] textarea,
html[data-theme="custom"] td,
html[data-theme="custom"] th,
html[data-theme="custom"] [style*="monospace"],
html[data-theme="custom"] .leaflet-container,
html[data-theme="custom"] .leaflet-control-attribution {
  font-family: var(--font-family-mono) !important;
}

/* ── Header in blog.bakkel.com-stijl ── */
html[data-theme="custom"] header {
  background: var(--bg2);
  border-bottom-color: var(--color-surface);
}
html[data-theme="custom"] header h1 {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}
html[data-theme="custom"] header h1 span { color: var(--accent) !important; }
html[data-theme="custom"] header a:hover,
html[data-theme="custom"] .nav-link:hover,
html[data-theme="custom"] .theme-toggle:hover {
  color: var(--text) !important;
  border-color: var(--accent) !important;
}

html[data-theme="custom"] .bk-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 !important;
  border: none !important;
  text-decoration: none !important;
  color: var(--text) !important;
  font-size: 18px !important;
  line-height: 1;
}
html[data-theme="custom"] .bk-brand:hover { border: none !important; opacity: .8; }
.bk-brand img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.bk-brand .brand-bold { font-weight: 700; }
.bk-brand .brand-italic {
  font-style: italic;
  font-size: 0.8em;
  color: var(--color-accent);
  margin-left: 0.15em;
}

/* ── Accentrood i.p.v. blauw ── */
html[data-theme="custom"] tbody tr.selected { background: rgba(220, 53, 69, .10) !important; }
html[data-theme="custom"] .leaflet-popup-content b { color: var(--accent); }
html[data-theme="custom"] .legend-tg { color: var(--accent); }

/* ── Mobiel ── */
@media (max-width: 768px) {
  html[data-theme="custom"] .bk-brand { font-size: 15px !important; }
  .bk-brand img { width: 24px; height: 24px; }
  html[data-theme="custom"] header h1 { font-size: 11px; }
}
