/* ============================================================
   INDICATORS — Panel + Modal
   Modal design matches the screenshot: clean white/black dialog.
   ============================================================ */

/* ============================================================
   CHART INDICATOR LEGEND  (.chart-ind-legend)
   DOM overlay at top-left of the chart canvas.
   • Scrollable when more indicators than fit in 45% of chart height
   • Each row shows: dot · name · value
   • On hover: eye-toggle · settings · remove buttons appear
   ============================================================ */
/* ── Legend container — sits below the SELL/BUY widget ── */
.chart-ind-legend {
    position: absolute;
    top: 96px;          /* below the buy/sell widget (38px top + ~50px height + gap) */
    left: 44px;         /* right of the buy/sell toggle button (7px + 28px + 9px gap) */
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: 40%;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: none;
}
/* When buy/sell panel is NOT open, move legend to top */
.chart-pane:not(:has(.tv-bs-panel.open)) .chart-ind-legend,
.chart-pane-main:not(:has(.tv-bs-panel.open)) .chart-ind-legend {
    top: 8px;
}
.chart-ind-legend:hover { pointer-events: auto; }
.chart-ind-legend::-webkit-scrollbar        { width: 3px; }
.chart-ind-legend::-webkit-scrollbar-track  { background: transparent; }
.chart-ind-legend::-webkit-scrollbar-thumb  { background: rgba(120,120,120,.4); border-radius: 2px; }

/* ── Individual indicator row — no background, just clean text ── */
.cil-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 5px 1px 2px;
    border-radius: 3px;
    background: transparent;
    min-height: 18px;
    pointer-events: auto;
    cursor: default;
    user-select: none;
    white-space: nowrap;
    transition: background 0.1s;
}
.cil-row:hover {
    background: rgba(120, 120, 140, 0.12);
}

/* Colored dot matching the indicator line */
.cil-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Indicator name — light on dark chart, dark on light chart */
.cil-label {
    color: rgba(210, 214, 220, 0.95);
    font-size: 13px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    min-width: 0;
}
.cil-label {
    color: var(--ui-fg);
}

/* Current value — uses indicator line color */
.cil-val {
    font-size: 13px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    min-width: 36px;
}

/* Action buttons — hidden until row hover */
.cil-actions {
    display: none;
    align-items: center;
    gap: 1px;
    margin-left: 2px;
    flex-shrink: 0;
}
.cil-row:hover .cil-actions { display: flex; }

.cil-btn {
    background: none;
    border: none;
    color: rgba(160, 160, 175, 0.7);
    cursor: pointer;
    font-size: 10px;
    padding: 1px 3px;
    border-radius: 3px;
    line-height: 1.2;
    transition: color 0.1s, background 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
}
.cil-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}
.cil-btn { color: var(--ui-muted); }
.cil-btn:hover { color: var(--ui-fg); background: var(--ui-button); }

.cil-btn-remove:hover {
    color: #ff5252 !important;
    background: rgba(255, 82, 82, 0.12) !important;
}
