/* =============================================================================
   📊 DRIFT / ENTROPY CROSSPLOT — 45-ball 2D scatter panel CSS.
   ============================================================================= */

.panel-drift-entropy {
    background:
        radial-gradient(ellipse at top right, rgba(176,149,245,0.06), transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(255,157,107,0.05), transparent 60%),
        linear-gradient(180deg, rgba(28,20,55,0.94), rgba(10,8,24,0.97));
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 14px;
    padding: 22px 26px;
    margin-top: 18px;
    box-shadow:
        0 10px 32px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(212,175,55,0.10);
}

.de-stats-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 10px 14px;
    background: rgba(10,8,24,0.45);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 8px;
    margin: 12px 0;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    color: #b095f5;
}
.de-stat b {
    color: #888aa0;
    font-weight: normal;
    font-style: italic;
    margin-right: 4px;
}
.de-stat span {
    color: #ffd86b;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* ── SCATTER CANVAS ─────────────────────────────────────────────────────── */

.de-scatter-wrap {
    position: relative;
    background: rgba(10,8,24,0.55);
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.de-scatter-canvas {
    width: 100%;
    height: 360px;
    display: block;
}

.de-scatter-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(28,20,55,0.95);
    border: 1px solid currentColor;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    color: #ddc88a;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 10;
    transition: opacity 0.15s ease;
}

.de-scatter-tooltip[hidden] { display: none; }

.de-tip-ball {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.de-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 11px;
    color: #888aa0;
}

.de-tip-row span:last-child {
    color: #ddc88a;
    font-variant-numeric: tabular-nums;
}

.de-tip-class {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── LEGEND ─────────────────────────────────────────────────────────────── */

.de-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 12px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #888aa0;
}

.de-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.de-legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    box-shadow: 0 0 4px currentColor;
}

/* ── INTERPRETATION ─────────────────────────────────────────────────────── */

.de-interp {
    background: linear-gradient(90deg, rgba(176,149,245,0.06), transparent 80%);
    border-left: 2px solid rgba(176,149,245,0.50);
    border-radius: 0 6px 6px 0;
    padding: 10px 16px;
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 13px;
    color: #ddc88a;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* ── FOOTER ─────────────────────────────────────────────────────────────── */

.de-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(212,175,55,0.14);
}

.de-refresh-btn {
    background: rgba(176,149,245,0.10);
    color: #b095f5;
    border: 1px solid rgba(176,149,245,0.30);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.de-refresh-btn:hover:not(:disabled) {
    background: rgba(176,149,245,0.18);
    transform: translateY(-1px);
}
.de-refresh-btn:disabled { opacity: 0.55; cursor: progress; }

.de-foot-note {
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 11px;
    color: #888aa0;
}

@media (max-width: 720px) {
    .de-scatter-canvas { height: 280px; }
}
