/* musicians-timelines-styles.css */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0a0f;
  color: #e0e0e0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  height: 100vh;
}

/* ── Header ── */
#header {
  padding: 10px 20px;
  background: #111118;
  border-bottom: 1px solid #2a2a3a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  position: relative;
}
#header h1 { font-size: 16px; font-weight: 600; color: #c0c0d0; white-space: nowrap; }

/* ── Search ── */
#search-wrap { position: relative; margin: 0 20px; flex: 1; max-width: 400px; }
#search-input {
  width: 100%;
  padding: 7px 14px 7px 32px;
  background: #1a1a2a;
  border: 1px solid #3a3a50;
  border-radius: 6px;
  color: #e0e0f0;
  font-size: 13px;
  outline: none;
}
#search-input:focus { border-color: #5580c0; }
#search-input::placeholder { color: #555568; }
#search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #555568;
  font-size: 14px;
  pointer-events: none;
}
#search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a2a;
  border: 1px solid #3a3a50;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 260px;
  overflow-y: auto;
  display: none;
  z-index: 30;
}
.search-item {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-item:hover { background: #252538; }
.search-item .si-type {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.si-type-band { background: #1a2a3a; color: #55a0e0; }
.si-type-musician { background: #2a1a3a; color: #a070d0; }
.search-item .si-name { color: #d0d0e0; }
.search-item .si-detail { color: #666680; font-size: 11px; margin-left: auto; }

/* ── Controls ── */
#controls { display: flex; gap: 6px; align-items: center; }
#controls button {
  background: #1e1e2e;
  border: 1px solid #3a3a50;
  color: #a0a0b8;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}
#controls button:hover { background: #2a2a3e; color: #d0d0e0; }

/* ── Breadcrumb ── */
#breadcrumb {
  padding: 6px 20px;
  background: #0d0d14;
  border-bottom: 1px solid #1a1a2a;
  font-size: 12px;
  color: #555568;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}
#breadcrumb .bc-item { color: #7090c0; cursor: pointer; }
#breadcrumb .bc-item:hover { text-decoration: underline; color: #90b0e0; }
#breadcrumb .bc-current { color: #b0b0c8; cursor: default; }
#breadcrumb .bc-sep { color: #333348; }
#breadcrumb .bc-hint { color: #444458; font-style: italic; }

/* ── Chart ── */
#chart { width: 100%; height: calc(100vh - 82px); cursor: grab; }
#chart.grabbing { cursor: grabbing; }

/* ── SVG Elements ── */
.band-label { font-size: 13px; font-weight: 600; cursor: pointer; }
.band-label:hover { fill: #b0b0d0 !important; }
.band-label.focus-entity { fill: #e0e0f0 !important; }
.band-sublabel { font-size: 10px; fill: #666680; }
.year-label { font-size: 11px; fill: #666680; }
.year-line { stroke: #1a1a28; stroke-width: 1; }
.band-sep { stroke: #2a2a3a; stroke-width: 1; }

.membership-bar {
  rx: 3; ry: 3;
  cursor: pointer;
  transition: opacity 0.15s;
}
.membership-bar:hover { opacity: 1 !important; filter: brightness(1.3); }
.membership-bar.focus-entity { stroke: #ffffff; stroke-width: 1.5; }

.event-marker { cursor: pointer; }
.event-marker circle { transition: r 0.15s; }
.event-marker:hover circle { r: 7; }

.transition-path {
  fill: none;
  stroke-width: 1.5;
  opacity: 0.35;
  stroke-dasharray: 4,3;
}
.transition-path.focus-entity {
  opacity: 0.7;
  stroke-width: 2.5;
  stroke-dasharray: none;
}

.band-bg { fill: #15152a; stroke: #2d2d45; stroke-width: 1; rx: 4; ry: 4; }

/* ── Event Tooltip ── */
#tooltip {
  position: fixed;
  display: none;
  background: #1a1a2a;
  border: 1px solid #3a3a50;
  border-radius: 8px;
  padding: 0;
  max-width: 340px;
  min-width: 240px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
}
#tooltip .tt-header { padding: 10px 14px; border-bottom: 1px solid #2a2a3a; }
#tooltip .tt-header h3 { font-size: 14px; color: #e0e0f0; margin-bottom: 2px; }
#tooltip .tt-header .tt-date { font-size: 11px; color: #6a6a80; }
#tooltip .tt-body { padding: 10px 14px; }
#tooltip .tt-body p { font-size: 12px; color: #a0a0b8; line-height: 1.5; }

.tt-type {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.type-formed    { background: #1a3a2a; color: #4eca8b; }
.type-disbanded { background: #3a1a1a; color: #e05555; }
.type-joined    { background: #1a2a3a; color: #55a0e0; }
.type-left      { background: #3a2a1a; color: #e0a040; }
.type-album     { background: #2a1a3a; color: #a070d0; }

/* ── Member Popup ── */
#member-popup {
  position: fixed;
  display: none;
  background: #1a1a2a;
  border: 1px solid #3a3a50;
  border-radius: 8px;
  padding: 16px;
  max-width: 300px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
#member-popup h3 { font-size: 15px; color: #e0e0f0; margin-bottom: 8px; }
#member-popup .mp-role { font-size: 11px; color: #6a6a80; margin-bottom: 10px; }
#member-popup .mp-band {
  font-size: 12px;
  color: #a0a0b8;
  padding: 4px 0;
  border-top: 1px solid #2a2a3a;
  cursor: pointer;
}
#member-popup .mp-band:hover { color: #d0d0f0; }
#member-popup .mp-band span { color: #7090c0; }
#member-popup .mp-explore {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #2a2a3a;
  font-size: 11px;
  color: #5580c0;
  cursor: pointer;
}
#member-popup .mp-explore:hover { color: #80b0f0; }

/* ── Zoom Hint ── */
.zoom-info {
  position: fixed;
  bottom: 12px;
  right: 12px;
  background: #1a1a2a;
  border: 1px solid #2a2a3a;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 10px;
  color: #8888a0;
  z-index: 10;
  cursor: default;
  white-space: nowrap;
}
.zoom-info-text {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  opacity: 1;
  margin-left: 5px;
  vertical-align: middle;
  transition: max-width 0.3s ease, opacity 0.3s ease, margin-left 0.3s ease;
}
/* Text collapses when the 'collapsed' class is added via JS after 5 seconds. */
.zoom-info.collapsed .zoom-info-text {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
}
/* Hovering the icon restores the full text. Declared after .collapsed so it wins. */
.zoom-info:hover .zoom-info-text {
  max-width: 360px;
  opacity: 1;
  margin-left: 5px;
}

/* ── Welcome Screen ── */
#welcome {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #444458;
  z-index: 5;
}
#welcome h2 { font-size: 22px; color: #555568; margin-bottom: 10px; font-weight: 400; }
#welcome p { font-size: 13px; line-height: 1.8; }
#welcome .try-links {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
#welcome .try-link {
  color: #5580c0;
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid #2a2a3a;
  border-radius: 4px;
  font-size: 12px;
}
#welcome .try-link:hover { background: #1a1a2a; color: #80b0f0; }
