/**
 * CMC Forex Performance Bars [cmc_forex_perf_bars]
 * Depends on currencies.css for erm-premium-* base styles.
 */

/* ── Timeframe tab buttons ───────────────────────────────────── */
.cmc-pfb-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cmc-pfb-widget .cmc-pfb-tab {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.5;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    box-shadow: none;
    outline: none;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
}

.cmc-pfb-widget .cmc-pfb-tab:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.cmc-pfb-widget .cmc-pfb-tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}

/* ── Chart container ─────────────────────────────────────────── */
.cmc-pfb-chart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.cmc-pfb-bars-area {
    display: flex;
    gap: 5px;
    min-width: max-content;
}

/* ── One column per currency pair ────────────────────────────── */
.cmc-pfb-col {
    flex: 1;
    min-width: 34px;
    max-width: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Positive zone — bar grows upward from zero line ─────────── */
.cmc-pfb-pos-zone {
    width: 100%;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

/* ── Zero line ───────────────────────────────────────────────── */
.cmc-pfb-zero-row {
    width: 100%;
    height: 1px;
    background: #cbd5e1;
    flex-shrink: 0;
}

/* ── Negative zone — bar grows downward from zero line ───────── */
.cmc-pfb-neg-zone {
    width: 100%;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* ── Bar elements ────────────────────────────────────────────── */
.cmc-pfb-bar {
    width: 62%;
    height: 0;
    min-height: 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cmc-pfb-bar--pos {
    background: #16a34a;
    border-radius: 3px 3px 0 0;
}

.cmc-pfb-bar--neg {
    background: #dc2626;
    border-radius: 0 0 3px 3px;
}

/* ── Footer: symbol + % label ────────────────────────────────── */
.cmc-pfb-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding-top: 5px;
    width: 100%;
}

.cmc-pfb-sym {
    font-size: 9px;
    font-weight: 700;
    color: #334155;
    text-align: center;
    letter-spacing: 0.02em;
}

.cmc-pfb-pct {
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    color: #94a3b8;
    line-height: 1.3;
    min-height: 10px;
}

.cmc-pfb-pct--pos { color: #16a34a; }
.cmc-pfb-pct--neg { color: #dc2626; }

/* ── Hover highlight ─────────────────────────────────────────── */
.cmc-pfb-col:hover .cmc-pfb-bar--pos { background: #15803d; }
.cmc-pfb-col:hover .cmc-pfb-bar--neg { background: #b91c1c; }
.cmc-pfb-col:hover .cmc-pfb-sym { color: #2563eb; }
