/**
 * CMC Liquidity Flow Widget  [cmc_liquidity_flow]
 * Compact sidebar design — long/short trader & lot flow bars.
 */

/* ── Admin-only error notice ────────────────────────────────── */

.cmc-lf-admin-notice {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-size: 11px;
    padding: 7px 10px;
    border-radius: 2px;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ── Widget shell ───────────────────────────────────────────── */

.cmc-lf-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 11px;
    color: #1e293b;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.cmc-lf-widget * { box-sizing: border-box; }

/* ── Widget header ──────────────────────────────────────────── */

.cmc-lf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px 6px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.cmc-lf-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.cmc-lf-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 2px;
}

.cmc-lf-badge--demo {
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fde047;
}

.cmc-lf-badge--cot {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* ── Column labels sub-header ───────────────────────────────── */

.cmc-lf-sub-header {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e9ecef;
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .3px;
    gap: 4px;
}

.cmc-lf-sh-instrument { flex: 0 0 46px; }
.cmc-lf-sh-long       { flex: 1; }
.cmc-lf-sh-short      { flex: 0 0 auto; text-align: right; }

/* ── Row (one currency pair) ────────────────────────────────── */

.cmc-lf-row {
    padding: 6px 10px 5px;
    border-bottom: 1px solid #f1f5f9;
}

.cmc-lf-row:last-of-type { border-bottom: none; }

/* Pair name ────────────────────────────────────────────────── */

.cmc-lf-pair-name {
    font-size: 10px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 3px;
    letter-spacing: .2px;
}

/* Bar row ──────────────────────────────────────────────────── */

.cmc-lf-bar-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.cmc-lf-bar-row--lots { margin-bottom: 0; }

/* Side labels ──────────────────────────────────────────────── */

.cmc-lf-side-long,
.cmc-lf-side-short {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    min-width: 50px;
}

.cmc-lf-side-long  { justify-content: flex-start; }
.cmc-lf-side-short { justify-content: flex-end; }

.cmc-lf-pct {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
}

.cmc-lf-count,
.cmc-lf-vol {
    font-size: 9px;
    color: #94a3b8;
    font-weight: 500;
}

/* ── Split bar ──────────────────────────────────────────────── */

.cmc-lf-bar {
    flex: 1;
    height: 5px;
    display: flex;
    overflow: hidden;
    border-radius: 2px;
    gap: 1px;
}

.cmc-lf-bar__long {
    height: 100%;
    background: #2962ff;
    border-radius: 2px 0 0 2px;
    min-width: 2px;
}

.cmc-lf-bar__short {
    height: 100%;
    background: #f6465d;
    border-radius: 0 2px 2px 0;
    min-width: 2px;
    flex: 1;
}

/* Lots bar — slightly different tone ───────────────────────── */

.cmc-lf-bar-row--lots .cmc-lf-bar__long  { background: #3d85c8; }
.cmc-lf-bar-row--lots .cmc-lf-bar__short { background: #e67e22; }

/* ── Footer ─────────────────────────────────────────────────── */

.cmc-lf-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.cmc-lf-source {
    font-size: 9px;
    color: #cbd5e1;
}

.cmc-lf-updated {
    font-size: 9px;
    color: #22c55e;
    font-weight: 600;
}
