/* Cleaner — feature styles (cleaner-) layered on mds.css.
   The Cleaner view is one mds-accordion row per cleaner (summary: name · manufacturer ·
   cleanertype · zinc verdict; body: the full record) built from generic mds- primitives (mds-data
   properties, mds-cardtext prose). Feature-specific bits: the summary meta, the interactive
   required-cleaner calculator, the contact "Copy" buttons and the PDF teaser buttons.
   Tokens come from mds.css. */

/* Accordion summary row: the muted "Manufacturer · Cleanertype Name" meta gives up its space first
   (the name and the zinc verdict must stay readable on a phone), the verdict never shrinks. */

/* The cleaner NAME can be as long as the meta ("SUPER DECKS CLEANER CONCENTRATE"), and a flex item
   refuses to shrink below its content width without min-width: 0 — so on a 390px row an overlong
   title pushed the meta and the zinc verdict out of the row instead of truncating. Same treatment
   as the meta, scoped to the cleaner head the sanctioned way (DESIGN-SYSTEM.md's
   ".acc-head .mds-accordion__title" pattern) — the shared title primitive stays untouched. */
.cleaner-head .mds-accordion__title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ...and it really has to yield FIRST. With the default shrink factor of 1 both items give up
   space in proportion to their width, so on a 390px row the muted meta kept 163px while the
   cleaner name — the thing you scan the list for — was cut down to 36px ("KT-..."). A high
   shrink factor makes the meta absorb the whole deficit before the name loses a character. */
.cleaner-meta {
    flex: 0 100 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--mds-muted);
    font-size: var(--mds-text-sm);
}
.cleaner-zinc { flex: none; font-size: var(--mds-text-sm); }

/* Phones: the row cannot hold name + meta + verdict on one line at all. Even after the meta
   yields, the leftover sub-pixel deficit lands on the name — and `text-overflow` then eats three
   or four characters to make room for the ellipsis ("CTC-Cleaner-VLC" became "CTC-Cleaner-V…").
   So below 768px the meta moves onto a line of its own beneath the name (source order stays;
   `order` + a 100% basis do the wrapping), and both are readable in full. */
@media (max-width: 767px) {
    .cleaner-head { flex-wrap: wrap; }
    .cleaner-head .cleaner-meta { order: 1; flex-basis: 100%; }
}

/* Calculator: a small framed block of label + input rows, the computed result on the last row.
   Mirrors the prewash-calc layout so the two interactive cards read the same. */
.cleaner-calc {
    margin-top: var(--mds-space-3);
    border: 1px solid var(--mds-line);
    border-radius: var(--mds-radius);
    background: var(--mds-tint);
}
.cleaner-calc__head {
    padding: var(--mds-space-1-5) var(--mds-space-3);
    font-weight: 600;
    color: var(--mds-title);
    border-bottom: 1px solid var(--mds-line);
}
.cleaner-calc__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mds-space-3);
    padding: var(--mds-space-1-5) var(--mds-space-3);
    border-bottom: 1px solid var(--mds-line);
}
.cleaner-calc__row:last-child { border-bottom: none; }

.cleaner-calc__field { display: inline-flex; align-items: center; gap: var(--mds-space-1-5); }
.cleaner-calc__unit { color: var(--mds-muted); }

.cleaner-calc__input {
    width: 120px;
    padding: var(--mds-space-1) var(--mds-space-2);
    border: 1px solid var(--mds-line);
    border-radius: var(--mds-radius);
    background: var(--mds-surface);
    font-family: inherit;
    font-size: var(--mds-text-sm);
    color: var(--mds-title);
    text-align: right;
}
.cleaner-calc__input:focus { outline: none; border-color: var(--mds-accent); }

.cleaner-calc__result-row { font-weight: 600; color: var(--mds-title); }
.cleaner-calc__result { color: var(--mds-accent-ink); }

/* Inline "Copy" affordance next to a contact e-mail / phone. */
.cleaner-copy {
    margin-left: var(--mds-space-2);
    padding: 0 var(--mds-space-1-5);
    border: 1px solid var(--mds-line);
    border-radius: var(--mds-radius-sm);
    background: var(--mds-surface);
    font-family: inherit;
    font-size: var(--mds-text-xs);
    color: var(--mds-muted);
    cursor: pointer;
}
.cleaner-copy:hover { border-color: var(--mds-accent); color: var(--mds-accent-ink); }

.cleaner-contact p { margin: 0; }

/* PDF teaser buttons — the legacy CleanerPdfPreview, a framed image link with a headline + OPEN. */
.cleaner-pdf {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mds-space-3);
    margin-top: var(--mds-space-3);
}
.cleaner-pdf__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mds-space-1);
    padding: var(--mds-space-2);
    border: 1px solid var(--mds-line);
    border-radius: var(--mds-radius);
    background: var(--mds-surface);
    text-decoration: none;
    color: var(--mds-text);
}
.cleaner-pdf__btn:hover { border-color: var(--mds-accent); }
.cleaner-pdf__title { font-weight: 600; color: var(--mds-title); }
.cleaner-pdf__img { max-width: 140px; height: auto; }
.cleaner-pdf__open { font-size: var(--mds-text-xs); letter-spacing: 0.05em; color: var(--mds-accent-ink); }
