﻿/* ── [cmc_btc_etf_tracker] Bitcoin ETF Tracker ───────────────────────────── */

.cmc-betft {
    font-family: inherit!important;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    direction: rtl;
    width: 100%;
}

/* ── Row 1: Flow chart + sidebar ── */
.cmc-betft-row1 {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 340px;
    border-bottom: 1px solid #e2e8f0;
}

/* ── Row 2: AUM% + Total AUM ── */
.cmc-betft-row2 {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 280px;
    border-bottom: 1px solid #e2e8f0;
}

.cmc-betft-row2 .cmc-betft-chart-panel {
    flex: 1 1 0;
    min-width: 0;
    border-right: 1px solid #e2e8f0;
}

.cmc-betft-row2 .cmc-betft-chart-panel:last-child { border-right: none; }

/* ── Flow panel ── */
.cmc-betft-flow-panel {
    flex: 1 1 0;
    min-width: 0;
    padding: 14px 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-right: 1px solid #e2e8f0;
}

/* ── Generic chart panel ── */
.cmc-betft-chart-panel {
    padding: 14px 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Flow header ── */
.cmc-betft-flow-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    direction: rtl;
}

.cmc-betft-flow-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    text-align: right;
}

.cmc-betft-title-date {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
    margin-right: 4px;
    direction: ltr;
}

/* LHS tab groups */
.cmc-betft-lhs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Chart header ── */
.cmc-betft-chart-hd {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    direction: rtl;
    flex-wrap: wrap;
    gap: 6px;
}

.cmc-betft-chart-title-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: right;
}

.cmc-betft-chart-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.cmc-betft-info {
    font-size: 11px;
    color: #94a3b8;
    cursor: help;
}

/* ── Tabs ── */
.cmc-betft-tabs {
    display: flex;
    gap: 3px;
    direction: ltr;
    flex-shrink: 0;
}

.cmc-betft-tab {
    background: transparent!important;
    border: 1px solid #e2e8f0!important;
    cursor: pointer!important;
    font-size: 11px!important;
    font-weight: 600!important;
    color: #64748b!important;
    padding: 3px 10px!important;
    border-radius: 4px!important;
    transition: all 0.12s!important;
    font-family: inherit!important;
    line-height: 1.5!important;
    white-space: nowrap!important;
}

.cmc-betft-tab:hover { background: #f8fafc!important; color: #334155!important; }
.cmc-betft-tab--active { background: #0f172a!important; color: #fff!important; border-color: #0f172a!important; }

/* Filter tabs */
.cmc-betft-filter-tabs {
    display: flex;
    gap: 2px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
    direction: rtl;
}

.cmc-betft-ftab {
    background: transparent!important;
    border: none!important;
    cursor: pointer!important;
    font-size: 11px!important;
    font-weight: 600!important;
    color: #64748b!important;
    padding: 3px 10px!important;
    border-radius: 4px!important;
    transition: all 0.12s!important;
    font-family: inherit!important;
    line-height: 1.5!important;
    white-space: nowrap!important;
}

.cmc-betft-ftab--active {
    background: #fff!important;
    color: #0f172a!important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1)!important;
}

/* ── Flow legend ── */
.cmc-betft-flow-legend {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.cmc-betft-leg {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #64748b;
}

.cmc-betft-leg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cmc-betft-leg-line {
    width: 18px;
    height: 2px;
    background: #94a3b8;
    border-radius: 1px;
    flex-shrink: 0;
}

/* ── Chart canvas ── */
.cmc-betft-chart-wrap {
    flex: 1;
    position: relative;
    min-height: 220px;
}

.cmc-betft-chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* ── AUM legend in row2 ── */
.cmc-betft-aum-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #64748b;
}

.cmc-betft-pl-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cmc-betft-pl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Watermark ── */
.cmc-betft-watermark {
    font-size: 10px;
    color: #cbd5e1;
    text-align: center;
    padding-top: 2px;
    direction: ltr;
}

/* ── Sidebar ── */
.cmc-betft-sidebar {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    order: -1;
}

.cmc-betft-side-hd {
    padding: 14px 16px 4px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 10px;
    color: #64748b;
    line-height: 1.5;
    text-align: right;
    direction: rtl;
}

.cmc-betft-side-date {
    display: block;
    font-size: 9px;
    color: #94a3b8;
    margin-bottom: 1px;
    direction: ltr;
    text-align: left;
}

.cmc-betft-side-big {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    padding: 12px 16px 10px;
    border-bottom: 1px solid #f1f5f9;
    direction: ltr;
    text-align: left;
}

.cmc-betft-side-section {
    padding: 10px 16px 10px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.cmc-betft-side-section:last-child { border-bottom: none; flex: 1; }

.cmc-betft-sec-title {
    font-size: 11px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    text-align: right;
}

.cmc-betft-hist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f8fafc;
    direction: rtl;
    gap: 8px;
}

.cmc-betft-hist-row:last-child { border-bottom: none; }

.cmc-betft-hist-lbl {
    font-size: 10px;
    color: #64748b;
    text-align: right;
    flex: 1;
    white-space: nowrap;
}

.cmc-betft-hist-val {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    direction: ltr;
}

/* ── Colors ── */
.cmc-betft-pos { color: #16c784; }
.cmc-betft-neg { color: #ea3943; }

/* ── Table section ── */
.cmc-betft-table-section {
    background: #fff;
}

.cmc-betft-table-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 16px;
    justify-content: flex-end;
    direction: rtl;
}

.cmc-betft-ttab {
    background: transparent!important;
    border: none!important;
    border-bottom: 2px solid transparent!important;
    cursor: pointer!important;
    font-size: 13px!important;
    font-weight: 600!important;
    color: #64748b!important;
    padding: 12px 16px!important;
    transition: all 0.12s!important;
    font-family: inherit!important;
    line-height: 1.5!important;
    margin-bottom: -1px!important;
}

.cmc-betft-ttab:hover { color: #334155!important; }
.cmc-betft-ttab--active { color: #0f172a!important; border-bottom-color: #f7931a!important; }

.cmc-betft-tview { display: none; }
.cmc-betft-tview--active { display: block; }

.cmc-betft-table-wrap { overflow-x: auto; }

.cmc-betft-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 600px;
}

.cmc-betft-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 11px;
    padding: 10px 14px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.cmc-betft-tc { text-align: right; }
.cmc-betft-tr { text-align: right; }

.cmc-betft-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    white-space: nowrap;
    vertical-align: middle;
}

.cmc-betft-table tr:last-child td { border-bottom: none; }
.cmc-betft-table tr:hover td { background: #f8fafc; }

.cmc-betft-ticker-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

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

.cmc-betft-btc-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: #fff7ed;
    color: #f7931a;
}

.cmc-betft-td-name {
    font-weight: 500;
    color: #475569;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.cmc-betft-type {
    color: #64748b;
    font-size: 11px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .cmc-betft-row1 { flex-direction: column; }
    .cmc-betft-flow-panel { border-right: none; border-bottom: 1px solid #e2e8f0; }
    .cmc-betft-sidebar {
        flex: none;
        flex-direction: row;
        flex-wrap: wrap;
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }
    .cmc-betft-side-hd,
    .cmc-betft-side-big { width: 100%; }
    .cmc-betft-side-section { flex: 1 1 180px; }
}

@media (max-width: 760px) {
    .cmc-betft-row2 { flex-direction: column; }
    .cmc-betft-row2 .cmc-betft-chart-panel { border-right: none; border-bottom: 1px solid #e2e8f0; }
    .cmc-betft-sidebar { flex-direction: column; }
    .cmc-betft-side-section { flex: none; }
}

@media (max-width: 480px) {
    .cmc-betft-chart-wrap { min-height: 180px; }
    .cmc-betft-lhs { flex-direction: column; align-items: flex-start; }
}
