/* TradeAnalyzer.Pro — Smart Indicator Filter, extends indicator-filter-pro-page.css */

body.rsi-dark-page.smart-indicator-filter-page {
    --rsi-bg: #070b14;
    --rsi-panel: #0d1524;
    --rsi-card: #111a2b;
    --rsi-line: rgba(148, 163, 184, 0.18);
    --rsi-text: #e8eef7;
    --rsi-muted: #94a3b8;
    --rsi-cyan: #38bdf8;
    --rsi-blue: #0ea5e9;
    --rsi-gold: #eab308;
    --rsi-green: #34d399;
    --rsi-red: #f87171;
    --rsi-radius: 16px;
    --rsi-display: "Sora", system-ui, sans-serif;
    --rsi-body: "IBM Plex Sans", system-ui, sans-serif;
}

/* Per-condition timeframe pills (Smart Filter unique UI) */
body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.3rem !important;
    padding: 0.2rem !important;
    margin: 0.25rem 0 0.15rem !important;
    background: rgba(7, 11, 20, 0.55) !important;
    border: 1px solid var(--rsi-line) !important;
    border-radius: 999px !important;
}

body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe .timeframe-btn,
body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe .condition-timeframe-btn {
    background: transparent !important;
    border: none !important;
    border-radius: 999px !important;
    color: var(--rsi-muted) !important;
    font-family: var(--rsi-body) !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    min-height: 28px !important;
    padding: 0.28rem 0.65rem !important;
    box-shadow: none !important;
}

body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe .timeframe-btn:hover,
body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe .condition-timeframe-btn:hover {
    background: rgba(56, 189, 248, 0.1) !important;
    color: var(--rsi-text) !important;
}

body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe .timeframe-btn.active,
body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe .condition-timeframe-btn.active,
body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe .timeframe-btn.active[data-timeframe],
body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe .condition-timeframe-btn.active[data-timeframe] {
    background: rgba(56, 189, 248, 0.18) !important;
    color: #7dd3fc !important;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35) !important;
}

/* Keep condition cards readable with TF row inside */
body.rsi-dark-page.smart-indicator-filter-page .filter-condition {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

body.rsi-dark-page.smart-indicator-filter-page .filter-condition .filter-group {
    width: 100%;
}

body.rsi-dark-page.smart-indicator-filter-page .filter-group {
    align-items: flex-end !important;
}

body.rsi-dark-page.smart-indicator-filter-page .filter-value-container.filter-relation-value {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
}

body.rsi-dark-page.smart-indicator-filter-page .filter-condition .form-text,
body.rsi-dark-page.smart-indicator-filter-page .filter-condition .text-muted,
body.rsi-dark-page.smart-indicator-filter-page .filter-group .form-text,
body.rsi-dark-page.smart-indicator-filter-page .filter-group .text-muted {
    color: #cbd5e1 !important;
    opacity: 1 !important;
}

body.rsi-dark-page.smart-indicator-filter-page .relation-compare-hint {
    margin: 0 0 0.1rem 0 !important;
    line-height: 1.25 !important;
    order: -1;
}

/* RTL: condition chrome mirrors; table sticky stays on physical left via indicator-filter-pro-page.css */
html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page .filter-condition,
html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe,
html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page .filter-group,
html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page .logical-operator-container {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page .condition-timeframe {
    justify-content: flex-start;
}

html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page .if-results-table-wrap,
html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page .screener-table-wrap,
html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page #resultsTable {
    direction: ltr !important;
    unicode-bidi: isolate;
}

html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page #resultsTable th,
html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page #resultsTable td {
    text-align: center !important;
    direction: ltr !important;
}

html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page #resultsTable th:first-child,
html[dir="rtl"] body.rsi-dark-page.smart-indicator-filter-page #resultsTable td:first-child {
    left: 0 !important;
    right: auto !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    text-align: center !important;
}
