/* TCC Bullion panels — Kitco-style price card + performance + ratio */

.tcc-bullion-pricepanel,
.tcc-bullion-perf,
.tcc-bullion-ratio {
    box-sizing: border-box;
    font-family: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 16px;
    font-variant-numeric: tabular-nums;
}

/* ---------------- shared change colors ---------------- */
.is-up {
    color: #1a7f37;
}
.is-down {
    color: #b32d2e;
}
.is-flat {
    color: #6b7280;
}

/* =========================================================
   [bullion_price_panel]
   ========================================================= */

.tcc-bullion-pricepanel {
    max-width: 360px;
    width: 100%;
}

.tcc-bullion-pricepanel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.tcc-bullion-pricepanel__metal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1d2327;
    font-weight: 600;
}

.tcc-bullion-pricepanel__swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.tcc-bullion-pricepanel__currency {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    background: #f7f8fa;
}

.tcc-bullion-pricepanel__hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 12px;
    line-height: 1.1;
}

.tcc-bullion-pricepanel__ratios {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    text-align: left;
    flex: 0 0 auto;
    padding-bottom: 6px;
}

.tcc-bullion-pricepanel__ratio-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 2px 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: #f7f8fa;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
    cursor: help;
}

.tcc-bullion-pricepanel__ratio-label {
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.03em;
}

.tcc-bullion-pricepanel__ratio-value {
    font-weight: 700;
    color: #1d2327;
    font-variant-numeric: tabular-nums;
}

.tcc-bullion-pricepanel__hero-main {
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
}

.tcc-bullion-pricepanel__price {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1d2327;
}

.tcc-bullion-pricepanel__change {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
    min-height: 1.2em;
}

.tcc-bullion-pricepanel__unit {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.tcc-bullion-pricepanel__units {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 13px;
}

.tcc-bullion-pricepanel__units th,
.tcc-bullion-pricepanel__units td {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: right;
}

.tcc-bullion-pricepanel__units th {
    text-align: left;
    font-weight: 500;
    color: #4b5563;
}

.tcc-bullion-pricepanel__units tr:last-child th,
.tcc-bullion-pricepanel__units tr:last-child td {
    border-bottom: none;
}

.tcc-bullion-pricepanel__upx {
    font-weight: 600;
    color: #1d2327;
}

.tcc-bullion-pricepanel__uchg {
    font-size: 12px;
    padding-left: 12px;
    min-width: 70px;
}

/* day-range bar */
.tcc-bullion-pricepanel__range {
    margin-top: 14px;
}

.tcc-bullion-pricepanel__bar {
    position: relative;
    height: 3px;
    background: #d1d5db;
    border-radius: 2px;
}

.tcc-bullion-pricepanel__marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d4af37;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    transition: left 0.25s ease;
}

.tcc-bullion-pricepanel__bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #4b5563;
}

.tcc-bullion-pricepanel__bar-caption {
    color: #6b7280;
}

.tcc-bullion-pricepanel__status {
    margin-top: 8px;
    font-size: 11px;
    color: #b32d2e;
    min-height: 1em;
}

/* =========================================================
   [bullion_performance]
   ========================================================= */

.tcc-bullion-perf {
    max-width: 420px;
    width: 100%;
}

.tcc-bullion-perf__title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: #1d2327;
}

.tcc-bullion-perf__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tcc-bullion-perf__table th,
.tcc-bullion-perf__table td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: right;
}

.tcc-bullion-perf__table thead th {
    font-weight: 600;
    color: #4b5563;
    background: #f7f8fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tcc-bullion-perf__table thead th:first-child {
    text-align: left;
}

.tcc-bullion-perf__table tbody th {
    text-align: left;
    font-weight: 500;
    color: #1d2327;
}

.tcc-bullion-perf__table tbody tr:last-child th,
.tcc-bullion-perf__table tbody tr:last-child td {
    border-bottom: none;
}

.tcc-bullion-perf__status {
    margin-top: 6px;
    font-size: 11px;
    color: #b32d2e;
    min-height: 1em;
}

/* =========================================================
   [bullion_ratio]
   ========================================================= */

.tcc-bullion-ratio {
    max-width: 360px;
    width: 100%;
    text-align: center;
}

.tcc-bullion-ratio__title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.tcc-bullion-ratio__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.tcc-bullion-ratio__value {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1d2327;
    line-height: 1;
}

.tcc-bullion-ratio__pair {
    font-size: 12px;
    color: #6b7280;
}

.tcc-bullion-ratio__mean {
    margin-top: 8px;
    font-size: 13px;
    color: #4b5563;
}

.tcc-bullion-ratio__mean [data-ratio-mean-delta] {
    margin-left: 4px;
    font-weight: 600;
    font-size: 12px;
}

.tcc-bullion-ratio__caption {
    margin: 8px 0 0;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.4;
    min-height: 1.4em;
}

.tcc-bullion-ratio__extras {
    list-style: none;
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    font-size: 12px;
    text-align: left;
}

.tcc-bullion-ratio__extras li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #6b7280;
}

.tcc-bullion-ratio__extras strong {
    color: #1d2327;
    font-weight: 600;
}

.tcc-bullion-ratio__status {
    margin-top: 6px;
    font-size: 11px;
    color: #b32d2e;
    min-height: 1em;
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 560px) {
    .tcc-bullion-pricepanel,
    .tcc-bullion-perf,
    .tcc-bullion-ratio {
        padding: 12px;
        border-radius: 6px;
    }

    .tcc-bullion-pricepanel__price {
        font-size: 30px;
    }
    .tcc-bullion-ratio__value {
        font-size: 34px;
    }

    .tcc-bullion-pricepanel__units th,
    .tcc-bullion-pricepanel__units td {
        padding: 5px 0;
        font-size: 12px;
    }

    .tcc-bullion-pricepanel__uchg {
        padding-left: 8px;
    }

    .tcc-bullion-perf__table th,
    .tcc-bullion-perf__table td {
        padding: 6px 4px;
        font-size: 12px;
    }
}
