/* ══════════════════════════════════════════════════════════
   Nexus V3 — Data Panel Styles
   Renders below the Leaflet map on single posts
   ══════════════════════════════════════════════════════════ */

.nexus-data-panel {
    position: relative;
    margin: 24px 0 32px;
    padding: 24px;
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Anti-Screenshot Watermark ───────────────────────── */
.nexus-data-panel__watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 48px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

/* ── Header ──────────────────────────────────────────── */
.nexus-data-panel__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nexus-data-panel__icon {
    font-size: 24px;
    line-height: 1;
}

.nexus-data-panel__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    flex: 1;
    min-width: 200px;
}

.nexus-data-panel__badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Charts ──────────────────────────────────────────── */
.nexus-data-panel__chart {
    min-height: 200px;
    position: relative;
    z-index: 2;
}

.nexus-data-panel__chart-public {
    margin-bottom: 16px;
}

.nexus-data-panel__source {
    margin: 8px 0 0;
    font-size: 11px;
    color: #718096;
    font-style: italic;
}

/* ── Gated / Blurred Layer ───────────────────────────── */
.nexus-data-panel__gated {
    position: relative;
    margin-top: 8px;
}

.nexus-data-panel__blur-overlay {
    filter: blur(8px);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.nexus-data-panel__chart--blurred {
    min-height: 160px;
}

.nexus-data-panel__cta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 24px 32px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    max-width: 400px;
    width: 90%;
}

.nexus-data-panel__cta-text {
    margin: 0 0 16px;
    font-size: 16px;
    color: #2d3748;
    line-height: 1.5;
}

.nexus-data-panel__cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: #4285F4;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.nexus-data-panel__cta-button:hover {
    background: #3367D6;
    transform: translateY(-1px);
}

.nexus-data-panel__cta-button:active {
    transform: translateY(0);
}

.nexus-data-panel__cta-sub {
    margin: 12px 0 0;
    font-size: 12px;
    color: #a0aec0;
}

/* ── Full Layer (logged in) ──────────────────────────── */
.nexus-data-panel__full {
    margin-top: 8px;
}

/* ── Footer ──────────────────────────────────────────── */
.nexus-data-panel__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 8px;
}

.nexus-data-panel__more {
    font-size: 14px;
    font-weight: 600;
    color: var(--nexus-topic-color, #155EEF);
    text-decoration: none;
    transition: opacity 0.2s;
}

.nexus-data-panel__more:hover {
    opacity: 0.8;
}

.nexus-data-panel__tag {
    font-size: 10px;
    color: #a0aec0;
    font-style: italic;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
    .nexus-data-panel {
        padding: 16px;
        margin: 16px 0 24px;
    }

    .nexus-data-panel__title {
        font-size: 15px;
    }

    .nexus-data-panel__watermark {
        font-size: 32px;
    }

    .nexus-data-panel__cta {
        padding: 16px 20px;
    }

    .nexus-data-panel__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Animated Counter Entrance ───────────────────────── */
@keyframes nexus-count-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nexus-data-panel__stat-animated {
    animation: nexus-count-up 0.6s ease-out forwards;
}
