/* ============================================================================
   powerflex.diagrams.css  -  Fitment diagrams on the Powerflex product page
   ----------------------------------------------------------------------------
   Loaded only for brandID 34 by ajax/part.number.cfm, which is a STANDALONE
   document (its own <head>, loaded as a fragment) and therefore does NOT get
   header.cfm's core bundle or foundations.css. So this file is self-contained
   and repeats the handful of foundation values it needs rather than relying on
   --oct-* tokens that are not present on this page. Keep the literals in step
   with css/foundations.css if that palette moves.

   Page-level CSS, so it carries ?v=N in the <link> and the bump belongs in the
   same edit as any change here.
============================================================================ */

.pf-diagrams {
    text-align: left;              /* .fixedwidth centres everything; undo once */
    font-size: 1rem;               /* 16px base -- never smaller, see foundations rule 3 */
    line-height: 1.6;
    color: #11171f;
}

.pf-diagrams__intro {
    margin: 0 0 16px;
    font-size: 1.0625rem;          /* 17px, intro scale */
    color: #55606e;
    max-width: 68ch;
}

/* ---- series colours ------------------------------------------------------
   Colours the "(Black Series)" suffix on the product title. The root page has
   these in css/part.number.css already; they are repeated here because the
   ajax/part.number.cfm fragment is a standalone document that loads neither
   part.number.css nor the core bundle, and previously carried them as an inline
   <style> inside the accordion body. Keep the two copies in step.
-------------------------------------------------------------------------- */

.series-road     { color: #6e1287; }
.series-black    { color: #000000; }
.series-heritage { color: #1d5f30; }

/* ---- Powerflex's own product notes ---------------------------------------
   Sits in the Product Details accordion, above the quantity guidance. Sibling
   part numbers inside it are linked to our own PDPs by
   octLinkifyPlainPartNumbers() in includes/brand.description.links.cfm.
-------------------------------------------------------------------------- */

.pf-notes {
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.6;
    color: #11171f;
    max-width: 68ch;
    text-align: left;
}

/* The linked codes are the scannable part of a kit listing -- someone reading
   "what's in this pack" is looking for the codes, not the prose. */
.pf-notes a {
    font-weight: 600;
    color: #ff3200;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.pf-notes a:hover { color: #d92b00; }

/* ---- "find your vehicle" filter ------------------------------------------
   Rendered with [hidden] and revealed by powerflex.diagrams.js, so a no-JS
   visitor never sees a control that cannot do anything. [hidden] is honoured
   explicitly because the display below would otherwise override it.
-------------------------------------------------------------------------- */

.pf-diagram-filter {
    margin: 0 0 20px;
    padding: 14px 16px;
    background: #f7f9fb;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.pf-diagram-filter[hidden] { display: none; }

.pf-diagram-filter__label {
    font-weight: 600;
    font-size: 1rem;
    color: #11171f;
}

.pf-diagram-filter__select {
    font: inherit;                 /* selects don't inherit page type by default */
    font-size: 1.125rem;           /* 18px -- matches the site's input scale */
    padding: 9px 12px;
    border: 1px solid #c9d0d9;
    border-radius: 6px;
    background: #ffffff;
    color: #11171f;
    max-width: 100%;
    flex: 1 1 260px;
    min-width: 0;                  /* let it actually shrink inside the flex row */
}

.pf-diagram-filter__select:focus-visible {
    outline: 2px solid #ff3200;
    outline-offset: 1px;
}

.pf-diagram-filter__reset {
    font: inherit;
    font-size: 1rem;
    padding: 9px 14px;
    border: 1px solid #c9d0d9;
    border-radius: 6px;
    background: #ffffff;
    color: #11171f;
    cursor: pointer;
}

.pf-diagram-filter__reset:hover { border-color: #6b7683; }
.pf-diagram-filter__reset[hidden] { display: none; }

.pf-diagram-filter__status {
    flex: 1 0 100%;
    margin: 0;
    font-size: 0.9375rem;
    color: #55606e;
}

.pf-diagram-filter__status:empty { display: none; }

/* ---- the list of diagrams ------------------------------------------------ */

.pf-diagram-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* A single diagram reads as one unit, so the card carries the border rather
   than the image floating loose on the accordion background. */
.pf-diagram {
    margin: 0;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

/* Filtered-out cards leave the grid entirely rather than going transparent,
   so the surviving diagram sits at the top instead of in a field of gaps. */
.pf-diagram.is-filtered-out { display: none; }

.pf-diagram__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pf-diagram__link {
    display: block;
    background: #f7f9fb;           /* diagrams are line art on white; the inset
                                      panel stops them dissolving into the page */
    line-height: 0;                /* kill the inline-image descender gap */
}

.pf-diagram__link:focus-visible {
    outline: 2px solid #ff3200;
    outline-offset: -2px;
}

.pf-diagram__img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* ---- caption ------------------------------------------------------------- */

.pf-diagram__caption {
    padding: 14px 16px 16px;
    border-top: 1px solid #eceff3;
    flex: 1 1 auto;
}

/* The location callout is the whole point of showing the diagram, so it is the
   loudest thing in the caption. */
.pf-diagram__ref {
    margin: 0;
    font-size: 1rem;
    color: #11171f;
}

.pf-diagram__ref strong {
    font-weight: 700;
    color: #ff3200;
}

.pf-diagram__vehicles {
    margin: 8px 0 0;
    font-size: 0.9375rem;          /* 15px floor */
    color: #55606e;
}

.pf-diagram__vehicles-label {
    font-weight: 600;
    color: #6b7683;
}

.pf-diagram__more {
    color: #6b7683;
    white-space: nowrap;
}

.pf-diagrams__credit {
    margin: 16px 0 0;
    font-size: 0.9375rem;
    color: #6b7683;
}

/* ---- narrow screens ------------------------------------------------------ */

@media (max-width: 640px) {
    .pf-diagram-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .pf-diagrams__intro { font-size: 1rem; }
}
