/**
 * dev-diagnostics.css — Development Runtime Diagnostics Panel (DEV/ADMIN ONLY).
 *
 * Enqueued ONLY when LBAI_Dev_Diagnostics::is_enabled() is true
 * (WP_DEBUG || administrator || LBAI_DEV_MODE). Never shipped to production visitors.
 * Purely additive, self-contained, high z-index; does not touch any production selectors.
 */

#lbai-diag-fab {
    position: fixed; right: 16px; bottom: 96px; z-index: 2147483000;
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    background: #0f172a; color: #fff; font-size: 20px; line-height: 46px; text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.35); font-family: inherit; padding: 0;
}
#lbai-diag-fab .lbai-diag-fab__score {
    position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; line-height: 22px;
    border-radius: 11px; font-size: 11px; font-weight: 800; color: #fff; background: #6b7280; padding: 0 5px;
}
#lbai-diag-fab .lbai-diag-fab__score.is-pass { background: #16a34a; }
#lbai-diag-fab .lbai-diag-fab__score.is-warn { background: #d97706; }
#lbai-diag-fab .lbai-diag-fab__score.is-fail { background: #dc2626; }

#lbai-diag-panel {
    position: fixed; right: 16px; bottom: 150px; z-index: 2147483000;
    width: min(420px, calc(100vw - 32px)); max-height: min(72vh, 720px);
    background: #0b1220; color: #e2e8f0; border: 1px solid #1e293b; border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5); overflow: hidden; display: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
}
#lbai-diag-panel.is-open { display: flex; flex-direction: column; }

.lbai-diag__head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 12px 14px; background: #111a2e; border-bottom: 1px solid #1e293b; flex: 0 0 auto;
}
.lbai-diag__title { font-weight: 800; font-size: 13px; color: #fff; display: flex; align-items: center; gap: 8px; }
.lbai-diag__title small { font-weight: 600; color: #64748b; }
.lbai-diag__health {
    font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #6b7280; color: #fff;
}
.lbai-diag__health.is-pass { background: #16a34a; }
.lbai-diag__health.is-warn { background: #d97706; }
.lbai-diag__health.is-fail { background: #dc2626; }
.lbai-diag__close { background: transparent; border: none; color: #94a3b8; font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1; }

.lbai-diag__body { padding: 10px 14px 16px; overflow-y: auto; flex: 1 1 auto; }

.lbai-diag__section { margin: 14px 0 0; }
.lbai-diag__section:first-child { margin-top: 4px; }
.lbai-diag__section h4 {
    margin: 0 0 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
    color: #7dd3fc; border-bottom: 1px dashed #1e293b; padding-bottom: 5px;
}

.lbai-diag__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 3px 0; }
.lbai-diag__row .k { color: #94a3b8; flex: 0 0 auto; }
.lbai-diag__row .v { color: #e2e8f0; text-align: right; word-break: break-all; }
.lbai-diag__row .v.ok { color: #4ade80; }
.lbai-diag__row .v.bad { color: #f87171; }
.lbai-diag__row .v.warn { color: #fbbf24; }

.lbai-diag__badge {
    display: inline-block; min-width: 58px; text-align: center; font-weight: 800; font-size: 10px;
    padding: 2px 8px; border-radius: 999px; letter-spacing: .5px; background: #334155; color: #cbd5e1;
}
.lbai-diag__badge.is-pass { background: #14532d; color: #86efac; }
.lbai-diag__badge.is-warn { background: #78350f; color: #fcd34d; }
.lbai-diag__badge.is-fail { background: #7f1d1d; color: #fca5a5; }
.lbai-diag__badge.is-pending { background: #334155; color: #cbd5e1; }

.lbai-diag__tests { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lbai-diag__test {
    display: flex; flex-direction: column; gap: 6px; background: #0f1a30; border: 1px solid #1e293b;
    border-radius: 10px; padding: 9px 10px;
}
.lbai-diag__test-btn {
    background: #1d4ed8; color: #fff; border: none; border-radius: 8px; padding: 7px 8px; font-size: 11px;
    font-weight: 700; cursor: pointer; font-family: inherit;
}
.lbai-diag__test-btn:hover { background: #2563eb; }
.lbai-diag__test-btn:disabled { opacity: .6; cursor: default; }
.lbai-diag__test-result { font-size: 10.5px; color: #94a3b8; min-height: 14px; line-height: 1.35; }

.lbai-diag__actions { display: flex; gap: 8px; margin-top: 12px; }
.lbai-diag__runall {
    flex: 1 1 auto; background: #0f766e; color: #fff; border: none; border-radius: 9px; padding: 9px;
    font-weight: 800; cursor: pointer; font-family: inherit; font-size: 12px;
}
.lbai-diag__runall:hover { background: #0d9488; }

.lbai-diag__recs { margin-top: 12px; }
.lbai-diag__recs ul { margin: 6px 0 0; padding-left: 16px; }
.lbai-diag__recs li { margin: 4px 0; color: #fcd34d; }
.lbai-diag__recs li.ok { color: #86efac; }

@media (prefers-reduced-motion: reduce) {
    #lbai-diag-panel, #lbai-diag-fab { transition: none; }
}
