/* TDG Empire theme for BlueMap – mirrors tdgwebsite/assets/style.css.
   Loaded after the BlueMap bundle so it overrides the default theme variables. */

:root,
.theme-dark,
.theme-contrast {
  --tdg-nav-h: 68px;
  --tdg-bg: #0d0c0b;
  --tdg-line: #3a322a;
  --tdg-gold: #c9a24b;
  --tdg-red: #9b2226;

  font-family: 'Crimson Text', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  --theme-bg: #171513;
  --theme-bg-hover: #221f1b;
  --theme-bg-light: #3a322a;
  --theme-fg: #e8e0d2;
  --theme-fg-light: #9a8f7e;
  --theme-switch-button-on: #9b2226;
  --theme-stars-day: #e8e0d2;
  --theme-moon-day: #c9a24b;
  --theme-stars-night: #3a322a;
  --theme-moon-night: #0d0c0b;
}

.theme-contrast {
  --theme-bg: #000;
  --theme-bg-light: #5a4d3d;
  --theme-fg: #fff;
}

/* Parchment variant for the "light" theme option */
.theme-light {
  --tdg-nav-h: 68px;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  --theme-bg: #ece3d0;
  --theme-bg-hover: #ddd2ba;
  --theme-bg-light: #b3a07c;
  --theme-fg: #1c1814;
  --theme-fg-light: #5a4d3d;
  --theme-switch-button-on: #9b2226;
  --theme-stars-day: #5a4d3d;
  --theme-moon-day: #1c1814;
  --theme-stars-night: #ece3d0;
  --theme-moon-night: #c9a24b;
}

body {
  background: var(--tdg-bg);
  font-family: 'Crimson Text', Georgia, serif;
}

/* Headings use the same display face as the main site */
.side-menu h1, .side-menu h2, .side-menu h3, .side-menu .title,
#map-container .bm-marker-popup h1, #map-container .bm-marker-popup h2, #map-container .bm-marker-popup h3 {
  font-family: 'Cinzel', serif;
  letter-spacing: .06em;
}
.side-menu h1, .side-menu h2 { color: var(--tdg-gold); }

/* Gold accents */
.side-menu .menu-button, .side-menu a { transition: color .2s; }
.side-menu a:hover { color: var(--tdg-gold); }
.control-bar, .side-menu, #zoom-buttons { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.side-menu { border-right: 1px solid var(--theme-bg-light); }

/* ---------- Top navbar (same look as tdgempire.com) ---------- */
.tdg-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20000;
  display: flex; align-items: center; justify-content: space-between;
  box-sizing: border-box; height: var(--tdg-nav-h); padding: 0 1.5rem;
  background: rgba(13, 12, 11, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--tdg-line);
  font: 19px/1.6 'Crimson Text', Georgia, serif; color: #e8e0d2;
}
.tdg-nav a { color: inherit; text-decoration: none; }
.tdg-nav a.tdg-brand {
  display: flex; align-items: center; gap: .6rem;
  font: 700 1.1rem 'Cinzel', serif; letter-spacing: .06em; color: var(--tdg-gold);
}
.tdg-brand img { height: 42px; width: 42px; }
.tdg-nav nav { display: flex; align-items: center; gap: 1.5rem; }
.tdg-nav nav a:not(.tdg-btn) { color: #9a8f7e; transition: color .2s; }
.tdg-nav nav a:not(.tdg-btn):hover, .tdg-nav nav a[aria-current=page] { color: var(--tdg-gold); }
.tdg-btn {
  display: inline-block; background: var(--tdg-red); color: #fff !important; border: 1px solid #c0393e;
  padding: .4rem .9rem; font: .8rem 'Cinzel', serif; letter-spacing: .06em;
  transition: background .2s;
}
.tdg-btn:hover { background: #b22d33; }
.tdg-burger { display: none; background: none; border: 0; color: var(--tdg-gold); font-size: 1.6rem; cursor: pointer; }

/* ---------- Shift the BlueMap UI below the navbar ---------- */
#map-container { top: var(--tdg-nav-h); height: calc(100% - var(--tdg-nav-h)); }
/* BlueMap's control bar / side menu are position:fixed (relative to the window), so offset them directly. */
#app { top: var(--tdg-nav-h); height: calc(100% - var(--tdg-nav-h)); }
.control-bar { top: var(--tdg-nav-h); }
.side-menu { top: var(--tdg-nav-h); height: calc(100% - var(--tdg-nav-h)); }

@media (max-width: 760px) {
  .tdg-nav { padding: 0 1rem; }
  .tdg-burger { display: block; }
  /* dropdown overlays the map instead of growing the fixed-height bar */
  .tdg-nav nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: .9rem; padding: 1rem;
    background: rgba(13, 12, 11, .97); border-bottom: 1px solid var(--tdg-line);
  }
  .tdg-nav.open nav { display: flex; }
}
