/* neo.css — Near-Earth Objects lab page
   Extends main.css; reuses .stat-grid, .stat, .update-info, .status-msg, .warn-msg */

/* ── Stat grid (copied from artemis.css for self-contained deploy) ── */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.stat {
    background: var(--bg);
    padding: 1.25rem;
    animation: neo-fade 0.4s ease both;
}

.stat:nth-child(1) { animation-delay: 0.05s; }
.stat:nth-child(2) { animation-delay: 0.10s; }
.stat:nth-child(3) { animation-delay: 0.15s; }
.stat:nth-child(4) { animation-delay: 0.20s; }

@keyframes neo-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    color: var(--fg);
    letter-spacing: -0.02em;
}

.stat-unit {
    font-size: 0.7rem;
    color: var(--muted);
    margin-left: 0.2rem;
}

.update-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--muted);
    margin-bottom: 0;
}

.status-msg {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--muted);
    padding: 1.5rem 0;
}

.warn-msg {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #f59e0b;
    padding: 1rem 0;
}

/* ── NEO list item ── */

.neo {
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    animation: neo-fade 0.35s ease both;
}

.neo:last-child {
    border-bottom: 1px solid var(--border);
}

.neo-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.neo-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68%;
}

.neo-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.70rem;
    color: var(--muted);
    white-space: nowrap;
}

/* ── Distance bar ── */

.neo-bar-wrap {
    position: relative;
    margin: 1rem 0 0.85rem;
}

.neo-bar-track {
    position: relative;
    height: 1px;
    background: var(--border);
}

/* ── Earth dot, moon tick, asteroid dot, labels ── */

.neo-bar-track::before {
    content: '';
    position: absolute;
    left: 0;
    top: -4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateX(-50%);
}

/* Moon tick */
.neo-moon-tick {
    position: absolute;
    top: -8px;
    width: 1px;
    height: 17px;
    background: var(--border);
}

.neo-asteroid-dot {
    position: absolute;
    top: -5px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.6s ease;
}

.neo-asteroid-dot.safe     { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.45); }
.neo-asteroid-dot.caution  { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.45); }
.neo-asteroid-dot.hazard   { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.55); }

/* Label row — all children are absolute, no flex conflict */
.neo-bar-labels {
    position: relative;
    height: 1.3rem;
    margin-top: 0.45rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted);
}

.neo-earth-label {
    position: absolute;
    left: 0;
    top: 0;
}

.neo-moon-label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.neo-scale-label {
    position: absolute;
    right: 0;
    top: 0;
    white-space: nowrap;
    text-align: right;
}

/* ── Metadata row ── */

.neo-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 0.5rem;
}

.neo-meta-item {
    font-family: 'JetBrains Mono', monospace;
}

.neo-meta-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.neo-meta-value {
    font-size: 0.82rem;
    color: var(--fg);
}

.neo-meta-unit {
    font-size: 0.65rem;
    color: var(--muted);
    margin-left: 0.15rem;
}

/* ── Hazard badge ── */

.badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    vertical-align: middle;
    white-space: nowrap;
}

.badge.hazard  { color: #ef4444; border: 1px solid #3a1010; }
.badge.caution { color: #f59e0b; border: 1px solid #3a2e0f; }
.badge.safe    { color: var(--muted); border: 1px solid var(--border); }

@media (max-width: 480px) {
    .stat-grid       { grid-template-columns: 1fr; }
    .stat-value      { font-size: 1.1rem; }
    .neo-meta        { grid-template-columns: repeat(2, 1fr); gap: 0.5rem 0.5rem; }
    .neo-name        { max-width: 100%; }
}