/**
 * Development work by David Lane
 */
/**
 * Genealogy source file.
 * Author: Levi Lane.
 */
body.lane-war-page {
  --history-bg: #0f141b;
  --history-text: #f2ebdf;
  --history-surface: #1a2230;
  --history-border: #2b3647;
  --history-accent: #caa56c;
  --history-link: #6da3d1;
  /* lane-shell themed hooks */
  --lane-qnav-link-bd: #3a4a5f;
  --lane-qnav-link-fg: #cfd9e7;
  --lane-qnav-link-fs: 0.78rem;
  --lane-qnav-link-tracking: 0.04em;
  --lane-qnav-link-case: none;
  --lane-qnav-margin-top: 0.75rem;
  --lane-qnav-link-hover-bd: var(--history-accent);
  --lane-qnav-link-hover-fg: #f6e8cc;
  --lane-qnav-link-hover-bg: rgba(202, 165, 108, 0.12);
  --lane-qnav-focus-color: rgba(240, 228, 200, 0.95);
  --lane-context-note-fg: #c8d3e2;
  --lane-context-note-size: 0.82rem;
  background: var(--history-bg);
  color: var(--history-text);
}

body.lane-war-page .text-muted {
  color: #b8c3d3 !important;
}

.war-wrap {
  max-width: 1320px;
  margin: 2rem auto 4rem;
  padding: 0 1rem;
}

.war-card {
  background: var(--history-surface);
  border: 1px solid var(--history-border);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.war-header {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.war-kicker {
  color: var(--history-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.war-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.war-highlight-card {
  background: #182131;
  border: 1px solid #314159;
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
}

.war-highlight-title {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: #d4b27a;
}

.war-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

#warMap {
  height: 520px;
  border-radius: 12px;
  border: 1px solid #2b3647;
  overflow: hidden;
  background: #111826;
}

#warMap .war-map-fallback {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-align: center;
}

.war-panel {
  padding: 1rem;
}

.war-tabs .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 999px;
}

.war-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.war-tabs .campaign-btn {
  border-color: #3a4a5f;
  color: #cfd9e7;
  background: transparent;
}

.war-tabs .campaign-btn.active,
.war-tabs .campaign-btn[aria-selected="true"] {
  border-color: #caa56c;
  color: #f6e8cc;
  background: rgba(202, 165, 108, 0.18);
}

.war-tabs .campaign-btn:focus-visible {
  outline: 2px solid rgba(202, 165, 108, 0.8);
  outline-offset: 1px;
}

.war-context-host {
  margin-top: 0.4rem;
}

.war-context-card {
  background: #182131;
  border: 1px solid #314159;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}

.war-context-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.55rem;
}

.war-context-year {
  color: #d4b27a;
  font-weight: 700;
  font-size: 0.83rem;
}

.war-context-event {
  color: #cfd9e7;
  font-size: 0.85rem;
  line-height: 1.35;
}

.participant-list {
  max-height: 520px;
  overflow: auto;
}

.participant-item {
  background: #212c3c;
  border: 1px solid #33455d;
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.participant-item-btn {
  width: 100%;
  text-align: left;
  color: inherit;
}

.participant-item:hover {
  border-color: #6da3d1;
}

.participant-item:focus-within,
.participant-item:focus-visible {
  outline: 2px solid rgba(202, 165, 108, 0.8);
  outline-offset: 1px;
}

.confidence-badge {
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.confidence-high {
  background: #1f6d3b;
  color: #e9f8ef;
}

.confidence-medium {
  background: #7a6330;
  color: #fff7e8;
}

.confidence-low {
  background: #5c5050;
  color: #f3ebeb;
}

.timeline-item {
  border-left: 3px solid #caa56c;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.55rem;
  background: #212c3c;
  border-radius: 0 8px 8px 0;
}

.timeline-year {
  color: #caa56c;
  font-weight: 700;
}

.evidence-box {
  background: #212c3c;
  border: 1px solid #33455d;
  border-radius: 10px;
  padding: 0.75rem;
}

.war-map-legend {
  font-size: 0.8rem;
}

.war-legend-star {
  color: #caa56c;
}

.war-legend-dot {
  color: #2db56b;
}

.battle-list-host {
  max-height: 280px;
  overflow: auto;
  font-size: 0.85rem;
}

.battle-lane-book-note {
  border-left: 2px solid #6da3d1;
  padding-left: 0.5rem;
  margin-top: 0.35rem;
  color: #c8d3e2;
  font-size: 0.8rem;
  line-height: 1.35;
}

.battle-lane-book-note--mapPopup {
  color: #222;
  border-left-color: #4a7cab;
}

.battle-external-links__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}

.battle-external-links__list li {
  margin-bottom: 0.15rem;
}

.battle-external-links a {
  color: #6da3d1;
}

.battle-external-links--mapPopup .battle-external-links__label {
  color: #555;
}

.battle-external-links--mapPopup a {
  color: #1a5276;
}

.battle-pin-item {
  border-left: 3px solid #caa56c;
  padding-left: 0.5rem;
}

.battle-pin-title {
  color: #f2ebdf;
}

.battle-catalog-note {
  line-height: 1.35;
}

.war-video-section .war-video-embed {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2b3647;
  max-width: 720px;
}

.war-context-accordion .card {
  border-radius: 0;
}

.war-context-accordion .card:first-of-type {
  border-radius: 10px 10px 0 0;
}

.war-context-accordion .card:last-of-type {
  border-radius: 0 0 10px 10px;
}

.war-context-accordion .btn-link {
  text-decoration: none;
}

.war-context-accordion .btn-link:hover {
  text-decoration: none;
  color: #fff !important;
}

@media (max-width: 992px) {
  .war-highlights {
    grid-template-columns: 1fr;
  }

  .war-grid {
    grid-template-columns: 1fr;
  }
  #warMap {
    height: 380px;
  }

  .war-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .war-tabs .campaign-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .war-context-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}
