/* ─────────────────────────────────────────────────────────────────────
   Saleability coefficient breakdown

   Styled with the app's --steel-*/semantic CSS variables so it adapts to
   both themes automatically (the [data-theme="light"] block flips the steel
   palette). Avoids bootstrap colour utilities (table-light, table-active,
   bg-secondary/bg-primary), which carry hardcoded light backgrounds.
   ───────────────────────────────────────────────────────────────────── */

/* Self-contained themed surface so the panel never falls back to a bootstrap
   white default, regardless of cascade order. */
.saleability-breakdown {
    background-color: var(--steel-850);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-color);
}

/* Own list markup — avoids bootstrap's .list-group-item, whose default
   background is white and would fill the card in dark mode. */
.saleability-breakdown__item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.saleability-breakdown__item:last-child {
    border-bottom: none;
}

/* The value badge next to each coefficient */
.saleability-breakdown__value {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    background-color: var(--steel-700);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Decision tables inside the expandable explanation */
.saleability-breakdown table {
    --bs-table-bg: transparent;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.saleability-breakdown table th,
.saleability-breakdown table td {
    background-color: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
    vertical-align: middle;
}

.saleability-breakdown table thead th {
    background-color: var(--steel-900);
    color: var(--brass-400);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Repair-type / group sub-header row */
.saleability-breakdown__group th {
    background-color: var(--steel-900);
    color: var(--text-color);
    font-weight: 600;
}

.saleability-breakdown tbody .saleability-breakdown__group:not(:first-child) th {
    border-top: 2px solid var(--border-color);
}

/* The branch that applies to the current inputs */
.saleability-breakdown__active,
.saleability-breakdown__active td {
    background-color: rgba(184, 134, 11, 0.14);
    color: var(--text-color);
}

.saleability-breakdown__active td:first-child {
    box-shadow: inset 3px 0 0 var(--accent-color);
}

/* "aktuálne" pill on the active group */
.saleability-breakdown__pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    background-color: rgba(184, 134, 11, 0.2);
    color: var(--brass-300);
    border: 1px solid var(--brass-500);
}
