/* Atlas page — full-width visualization overrides */

body.atlas-page #content {
  max-width: none;
  margin-left: 200px;
  margin-right: 20px;
  padding-right: 0;
}

/* Section anchors */
.atlas-nav {
  margin: 0 0 30px 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 20px;
  font-size: 12px;
}

.atlas-nav a {
  color: #0864c7;
  text-decoration: none;
}

.atlas-nav a:hover {
  text-decoration: underline;
}

/* Visualization sections */
.viz-section {
  position: relative;
  min-height: auto;
  margin-bottom: 30px;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
}

.viz-section.dark {
  background: #f8f9fa;
  border-color: #dde;
}

.viz-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 0;
  gap: 6px 12px;
}

.viz-label {
  font-size: 11px;
  font-weight: bold;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.viz-section.dark .viz-label {
  color: #666;
}

/* SVG fills the section */
.viz-section svg {
  display: block;
  width: 100%;
}

/* Tooltip */
.atlas-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  max-width: 300px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.15s;
}

.atlas-tooltip.visible {
  opacity: 1;
}

.atlas-tooltip .tt-title {
  font-weight: bold;
}

.atlas-tooltip .tt-meta {
  color: #aaa;
  font-size: 11px;
}

/* Legend */
.atlas-legend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  flex-wrap: wrap;
  flex-basis: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  color: #666;
  transition: opacity 0.2s;
}

.viz-section.dark .legend-item {
  color: #555;
}

.legend-item.inactive {
  opacity: 0.3;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Responsive */
@media (max-width: 600px) {
  body.atlas-page #content {
    margin-left: 20px;
    margin-right: 20px;
  }

  .viz-section {
    min-height: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .atlas-nav {
    flex-wrap: wrap;
  }
}

/* Print styles */
@media print {
  #menu, .atlas-nav, .atlas-legend {
    display: none !important;
  }

  body.atlas-page #content {
    margin: 0;
  }

  .viz-section {
    min-height: auto;
    border: none;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .viz-label {
    color: #333;
  }
}
