﻿/* ── CMC Bitcoin Treasuries Widget ──────────────────────────────────────── */

.cmc-btc { font-family: inherit!important; direction: rtl; }

.cmc-btc-widget-hd { margin-bottom: 16px; }
.cmc-btc-widget-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Card base ───────────────────────────────────────────────────────────── */
.cmc-btc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.cmc-btc-card-hd {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}
.cmc-btc-table-hd { white-space: normal; font-size: 14px; font-weight: 800; color: #0f172a; }

.cmc-btc-card-ft {
    padding: 6px 14px;
    border-top: 1px solid #f1f5f9;
}
.cmc-btc-watermark { font-size: 9px; color: #cbd5e1; font-weight: 500; }

/* ── Top row layout ──────────────────────────────────────────────────────── */
.cmc-btc-top {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-start;
}
.cmc-btc-donut-card { flex: 1; min-width: 0; }
.cmc-btc-right {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Donut inner ─────────────────────────────────────────────────────────── */
.cmc-btc-donut-inner {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
}
.cmc-btc-donut-canvas-wrap {
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
}
.cmc-btc-donut-canvas-wrap canvas { width: 100% !important; height: 100% !important; }

.cmc-btc-donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 230px;
    overflow-y: auto;
}
.cmc-btc-leg-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}
.cmc-btc-leg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cmc-btc-leg-name {
    flex: 1;
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cmc-btc-leg-pct {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

/* ── Supply card ─────────────────────────────────────────────────────────── */
.cmc-btc-supply-big {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    padding: 12px 16px 2px;
}
.cmc-btc-supply-sub {
    font-size: 11px;
    color: #64748b;
    padding: 0 16px 12px;
}
.cmc-btc-supply-track {
    margin: 0 16px 12px;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}
.cmc-btc-supply-fill {
    height: 100%;
    background: #f7931a;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ── Countries card ──────────────────────────────────────────────────────── */
.cmc-btc-countries-body { padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; }
.cmc-btc-country-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}
.cmc-btc-country-flag { font-size: 14px; line-height: 1; }
.cmc-btc-country-code { font-weight: 700; color: #334155; width: 28px; flex-shrink: 0; }
.cmc-btc-cbar-wrap {
    flex: 1;
    height: 5px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}
.cmc-btc-cbar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.cmc-btc-cpct { font-size: 10px; font-weight: 700; color: #64748b; width: 36px; text-align: left; flex-shrink: 0; }

/* ── Table card ──────────────────────────────────────────────────────────── */
.cmc-btc-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.cmc-btc-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: 12px;
}
.cmc-btc-table thead th {
    background: #fff;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    padding: 9px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    text-align: right;
}
.cmc-btc-table tbody tr:nth-child(even) { background: #fff; }
.cmc-btc-table tbody td {
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    padding: 9px 12px;
    white-space: nowrap;
    text-align: right;
}
.cmc-btc-table tbody tr:hover {
    background: #fdf6f7;
    box-shadow: inset -3px 0 0 0 #f7931a;
}

.cmc-btc-sortable { cursor: pointer; user-select: none; }
.cmc-btc-sortable:hover { color: #0f172a; }
.cmc-btc-sort-active { color: #0f172a; }
.cmc-btc-arrow { font-size: 9px; color: #8B3D47; }

.cmc-btc-th-num { width: 36px; }
.cmc-btc-rownum { color: #94a3b8; font-size: 11px; text-align: center; }
.cmc-btc-td-name { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.cmc-btc-ticker {
    display: inline-block;
    background: #f1f5f9;
    color: #3b82f6;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}
.cmc-btc-flag-inline { font-size: 13px; vertical-align: middle; margin-left: 3px; }
.cmc-btc-td-btc strong { font-weight: 700; }
.cmc-btc-td-pct {
    display: inline-block;
    font-size: 9px;
    color: #94a3b8;
    margin-right: 4px;
}
.cmc-btc-td-cost { color: #64748b; }
.cmc-btc-td-src, .cmc-btc-td-acq, .cmc-btc-td-upd { color: #94a3b8; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .cmc-btc-top { flex-direction: column; }
    .cmc-btc-right { width: 100%; flex-direction: row; }
    .cmc-btc-supply-card, .cmc-btc-countries-card { flex: 1; }
}
@media (max-width: 600px) {
    .cmc-btc-donut-inner { flex-direction: column; }
    .cmc-btc-donut-canvas-wrap { width: 180px; height: 180px; margin: 0 auto; }
    .cmc-btc-right { flex-direction: column; }
}
