/**
 * The Coded Astrologer — Live Transit Laser Radar Stylesheet
 * ══════════════════════════════════════════════════════════════════════════════
 * Aesthetics: Cyberpunk Dark-Space Glassmorphism, Neon Cyan & Matrix Accents
 */

/* ── Mode Switcher Bar (Tabs inside Planetary Transits) ── */
.transit-mode-switcher-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 6px;
    background: rgba(10, 16, 28, 0.75);
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.transit-mode-btn {
    flex: 1 1 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.transit-mode-btn:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.04);
}

.transit-mode-btn.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-color: rgba(34, 211, 238, 0.55);
    color: #38bdf8;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.transit-mode-btn .mode-pill {
    display: inline-block;
    padding: 2px 7px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #6ee7b7;
}

.transit-mode-btn .mode-pill.pulse {
    animation: radar-pill-pulse 2s infinite;
}

@keyframes radar-pill-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.95); }
}

/* ── Container Shell ── */
.transit-laser-radar-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(34, 211, 238, 0.38);
    background: radial-gradient(ellipse at 50% 0%, #0d1527 0%, #060913 70%, #03050a 100%);
    padding: 24px;
    box-shadow: 0 0 45px rgba(34, 211, 238, 0.18), 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 24px;
}

/* Decorative ambient glow lines */
.transit-laser-radar-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.8), transparent);
    pointer-events: none;
}

/* ── Header ── */
.radar-header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(34, 211, 238, 0.18);
    padding-bottom: 18px;
    margin-bottom: 22px;
}

.radar-title-area {
    flex: 1 1 320px;
}

.radar-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.radar-badge-pulse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.2);
    border: 1px solid rgba(34, 211, 238, 0.5);
    color: #22d3ee;
    font-size: 11px;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.radar-badge-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: #38bdf8;
}

.radar-status-online {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: #34d399;
}

.radar-status-online .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: radar-dot-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radar-dot-ping {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

.radar-title {
    font-family: 'Orbitron', 'Exo 2', sans-serif;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.03em;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.radar-subtitle {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
    max-width: 650px;
}

/* ── Orb Filter Controls ── */
.radar-controls-area {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.radar-orb-filter-group {
    display: inline-flex;
    align-items: center;
    background: rgba(8, 12, 20, 0.85);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
}

.radar-orb-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.radar-orb-btn:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

.radar-orb-btn.active {
    background: #06b6d4;
    color: #030712;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.radar-chart-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #f3d77b;
}

/* ── Grid Layout (Radar vs Feed) ── */
.radar-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

@media (max-width: 960px) {
    .radar-main-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ── Canvas Left Stage ── */
.radar-stage-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.radar-canvas-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #060a14 0%, #020408 100%);
    box-shadow: 0 0 35px rgba(34, 211, 238, 0.15), inset 0 0 25px rgba(0, 0, 0, 0.8);
}

.radar-canvas-container canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    touch-action: none;
}

.radar-canvas-overlay-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.28);
    box-shadow: inset 0 0 30px rgba(34, 211, 238, 0.08);
    pointer-events: none;
}

.radar-legend-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    flex-wrap: wrap;
}

.radar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.radar-legend-item .legend-dot.transit {
    background: #22d3ee;
    box-shadow: 0 0 8px #22d3ee;
}

.radar-legend-item .legend-dot.natal {
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
}

.radar-legend-item .legend-dot.laser {
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
}

/* ── Right Panel: Collision Feed & Inspector ── */
.radar-data-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.radar-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
}

.radar-feed-title {
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f3d77b;
}

.radar-feed-hint {
    color: #64748b;
    font-size: 11px;
}

.radar-collision-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.3) rgba(10, 16, 28, 0.5);
}

.radar-collision-feed::-webkit-scrollbar {
    width: 4px;
}
.radar-collision-feed::-webkit-scrollbar-track {
    background: rgba(10, 16, 28, 0.5);
    border-radius: 4px;
}
.radar-collision-feed::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.3);
    border-radius: 4px;
}

/* Collision Feed Row */
.collision-feed-row {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 16, 26, 0.7);
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.collision-feed-row:hover {
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(15, 23, 42, 0.85);
    transform: translateX(2px);
}

.collision-feed-row.active {
    border-color: #22d3ee;
    background: linear-gradient(90deg, rgba(8, 47, 73, 0.6) 0%, rgba(12, 74, 110, 0.3) 100%);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.collision-row-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.collision-symbol {
    font-size: 1.05rem;
    line-height: 1;
}

.collision-arrow {
    color: #64748b;
    font-size: 10px;
}

.collision-labels {
    min-width: 0;
}

.collision-pair-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collision-aspect-name {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collision-row-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.collision-orb-delta {
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-weight: 700;
    color: #38bdf8;
}

.collision-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ── Inspector HUD Card ── */
.radar-inspector-card {
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: linear-gradient(145deg, rgba(12, 18, 30, 0.95) 0%, rgba(6, 10, 18, 0.98) 100%);
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    min-height: 160px;
}

.inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.inspector-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inspector-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f3d77b;
}

.inspector-orb-pill {
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(34, 211, 238, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.4);
    color: #38bdf8;
}

.inspector-meta-row {
    font-size: 0.76rem;
    font-weight: 600;
    color: #fde047;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inspector-action-narrative {
    font-size: 0.82rem;
    color: #e2e8f0;
    line-height: 1.55;
    margin-bottom: 12px;
}

.inspector-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    color: #94a3b8;
}

.inspector-intensity-val {
    font-weight: 800;
    color: #4ade80;
}
