/* ── DCOSMOS-TOOLTIPS: orrery hover/long-press info tooltip ──────
   Single class prefix so the whole feature yanks cleanly.
   The tooltip sits inside .reveal-container (position: relative). */
.cosmos-tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  max-width: 220px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: rgba(8, 14, 26, 0.92);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  transition: opacity 0.12s ease;
}
.cosmos-tooltip[hidden] {
  display: block !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.cosmos-tooltip-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}
.cosmos-tooltip-kind {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 4px;
}
.cosmos-tooltip-stat {
  color: var(--text-secondary);
  font-size: 11px;
}
.cosmos-tooltip-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

/* ── DCOSMOS-ACHIEVE: achievement badges & toast ─────────────── */
.achieve-counter {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-data);
}
.achieve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}
.achieve-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  cursor: default;
  transition: border-color 0.2s ease;
}
.achieve-badge.achieve-unlocked {
  border-color: var(--accent-dim);
}
.achieve-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.achieve-unlocked .achieve-icon {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent-dim);
}
.achieve-name {
  font-size: 9px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Toast notification */
.achieve-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-card);
  border-bottom: 1px solid var(--accent-dim);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-100%);
}
.achieve-toast-enter {
  animation: achieveSlideIn 0.3s ease forwards;
}
.achieve-toast-exit {
  animation: achieveSlideOut 0.4s ease forwards;
}
@keyframes achieveSlideIn {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes achieveSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-100%); }
}

/* ── DCOSMOS-DEEPSCAN2: deep scan results in the reveal data sheet ── */
.deepscan-section h4 {
  color: #4ade80;
}
.deepscan-hint {
  font-size: 10px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 6px;
}
.deepscan-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(10, 30, 20, 0.8);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 4px;
  color: #4ade80;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}
.deepscan-btn:hover {
  background: rgba(10, 40, 25, 0.9);
  border-color: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.2);
}
.deepscan-btn:disabled {
  cursor: default;
  opacity: 0.7;
}
.deepscan-btn.deepscan-active {
  animation: deepscanPulse 0.6s ease-in-out infinite;
}
@keyframes deepscanPulse {
  0%, 100% { border-color: rgba(74, 222, 128, 0.25); box-shadow: none; }
  50% { border-color: #4ade80; box-shadow: 0 0 14px rgba(74, 222, 128, 0.3); }
}

.deepscan-results {
  border: 1px solid rgba(74, 222, 128, 0.15);
  border-radius: 6px;
  padding: 12px;
  background: rgba(10, 30, 20, 0.35);
}

.deepscan-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}
.deepscan-item:last-child {
  border-bottom: none;
}
.deepscan-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.deepscan-icon {
  font-size: 13px;
  color: #4ade80;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.deepscan-name {
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.deepscan-badge {
  font-family: var(--font-data);
  font-size: 9px;
  padding: 1px 6px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 3px;
  color: #4ade80;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  margin-left: auto;
}
.deepscan-desc {
  font-family: var(--font-data);
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.5;
  font-style: italic;
  padding-left: 24px;
}
.deepscan-chance {
  font-family: var(--font-data);
  font-size: 9px;
  color: rgba(74, 222, 128, 0.6);
  padding-left: 24px;
  margin-top: 2px;
}

/* DCOSMOS-ATLASSORT: sort dropdown in atlas list view */
.atlas-sort {
  padding: 7px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.atlas-sort:focus {
  outline: none;
  border-color: var(--accent);
}

/* DCOSMOS-SPECBADGE: star class color dot on atlas cards */
.spec-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;
}

/* DCOSMOS-RELDATE: relative time on atlas cards */
.entry-age {
  color: var(--text-dim);
  font-size: 0.75em;
  margin-left: 0.5em;
}
