/*
 * Shared flagship product information polish.
 * Scope is intentionally limited to the reusable FPH/ICH product hubs so the
 * existing product data, tabs and page architecture remain unchanged.
 */

:where(.fph, .ich) {
    --fpi-ink: #243127;
    --fpi-body: #526057;
    --fpi-muted: #69746c;
    --fpi-olive: #829a39;
    --fpi-olive-strong: #687f2c;
    --fpi-olive-soft: #e8eece;
    --fpi-olive-mist: #f2f5e5;
    --fpi-cream: #faf8f0;
    --fpi-cream-strong: #f4f0e3;
    --fpi-line: #d5ddbc;
    --fpi-white: #fff;
}

/* Product selector and selected-product summary */
:where(.fph, .ich) .fph-category-tabs {
    border-color: var(--fpi-line) !important;
    background: var(--fpi-cream) !important;
    box-shadow: 0 10px 30px rgba(65, 78, 45, .06);
}

:where(.fph, .ich) .fph-category-tabs button {
    position: relative;
    border-right-color: var(--fpi-line);
    color: var(--fpi-body);
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

:where(.fph, .ich) .fph-category-tabs button:is(:hover, :focus-visible, .is-active, [aria-selected="true"]) {
    background: var(--fpi-olive-soft) !important;
    color: var(--fpi-ink);
}

:where(.fph, .ich) .fph-category-tabs button[aria-selected="true"] {
    box-shadow: inset 0 -4px 0 var(--fpi-olive) !important;
}

:where(.fph, .ich) .fph-product-card {
    position: relative;
    border-bottom-color: #e5e9d7;
}

:where(.fph, .ich) .fph-product-card:is(:hover, :focus-visible, .is-active) {
    border-color: var(--fpi-olive) !important;
    background: var(--fpi-olive-mist) !important;
    box-shadow: inset 4px 0 0 var(--fpi-olive), 0 7px 18px rgba(67, 82, 42, .07);
}

:where(.fph, .ich) .fph-product-card small,
:where(.fph, .ich) .fph-code,
:where(.fph, .ich) .fph-used-for span,
:where(.fph, .ich) .fph-summary-facts dt {
    color: var(--fpi-olive-strong);
}

:where(.fph, .ich) .fph-product-card strong,
:where(.fph, .ich) .fph-product-summary h2 {
    color: var(--fpi-ink);
}

:where(.fph, .ich) .fph-product-card em,
:where(.fph, .ich) .fph-product-summary__top p:not(.fpp-eyebrow),
:where(.fph, .ich) .fph-used-for p,
:where(.fph, .ich) .fph-summary-facts dd {
    color: var(--fpi-body);
}

:where(.fph, .ich) .fph-code {
    padding: 7px 10px;
    border-color: #afbe78;
    background: var(--fpi-olive-soft);
}

:where(.fph, .ich) .fph-product-summary__top figure {
    border-color: var(--fpi-line) !important;
    background: var(--fpi-cream) !important;
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .72);
}

:where(.fph, .ich) .fph-used-for {
    padding: 16px 18px;
    border: 1px solid var(--fpi-line);
    border-left: 4px solid var(--fpi-olive);
    background: var(--fpi-cream);
}

:where(.fph, .ich) .fph-summary-facts {
    border-color: var(--fpi-line);
}

:where(.fph, .ich) .fph-summary-facts div {
    border-color: var(--fpi-line);
    background: var(--fpi-white);
}

:where(.fph, .ich) .fph-summary-facts div:nth-child(even) {
    background: var(--fpi-cream);
}

/* Product information shell and navigation */
:where(.fph, .ich) .fph-technical {
    border: 1px solid var(--fpi-line);
    border-radius: 8px;
    background: var(--fpi-white);
    box-shadow: 0 18px 46px rgba(58, 73, 40, .09), inset 0 4px 0 var(--fpi-olive);
}

:where(.fph, .ich) .fph-technical__head {
    border-bottom-color: var(--fpi-line);
    background: var(--fpi-cream);
}

:where(.fph, .ich) .fph-technical__head :where(.fpp-eyebrow, .iic-kicker) {
    position: relative;
    padding-left: 25px;
    color: var(--fpi-olive-strong);
}

:where(.fph, .ich) .fph-technical__head :where(.fpp-eyebrow, .iic-kicker)::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 3px;
    background: var(--fpi-olive);
    content: "";
    transform: translateY(-50%);
}

:where(.fph, .ich) .fph-technical__head h3 {
    color: var(--fpi-ink);
}

:where(.fph, .ich) .fph-technical-tabs {
    counter-reset: fpi-tab;
    border-bottom-color: var(--fpi-line);
    background: var(--fpi-cream-strong);
    scroll-snap-type: x proximity;
}

:where(.fph, .ich) .fph-technical-tabs__label {
    min-width: 194px;
    border-right-color: #677d2d;
    background: var(--fpi-olive);
    color: var(--fpi-white);
    letter-spacing: .08em;
}

:where(.fph, .ich) .fph-technical-tabs button {
    counter-increment: fpi-tab;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    justify-content: start;
    min-width: 0;
    border-right-color: var(--fpi-line);
    color: var(--fpi-body);
    text-align: left;
    scroll-snap-align: start;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

:where(.fph, .ich) .fph-technical-tabs button::before {
    color: var(--fpi-olive-strong);
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .05em;
    content: counter(fpi-tab, decimal-leading-zero);
}

:where(.fph, .ich) .fph-technical-tabs button:is(:hover, :focus-visible, .is-active, [aria-selected="true"]) {
    background: var(--fpi-olive-soft);
    color: var(--fpi-ink);
    outline: 0;
}

:where(.fph, .ich) .fph-technical-tabs button[aria-selected="true"] {
    box-shadow: inset 0 -4px 0 var(--fpi-olive), inset 0 1px 0 rgba(255, 255, 255, .78);
}

:where(.fph, .ich) .fph-technical-tabs button:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(130, 154, 57, .28);
    outline-offset: -4px;
}

/* Information panels */
:where(.fph, .ich) .fph-technical-panels {
    background: var(--fpi-white);
}

:where(.fph, .ich) .fph-technical-panels > section > h4 {
    max-width: 920px;
    padding-left: 15px;
    border-left: 4px solid var(--fpi-olive);
    color: var(--fpi-ink);
    line-height: 1.25;
}

:where(.fph, .ich) .fph-technical-panels > section > h5 {
    color: var(--fpi-ink);
}

:where(.fph, .ich) .fph-technical-panels > section > p,
:where(.fph, .ich) .fph-technical-panels li {
    color: var(--fpi-body);
}

:where(.fph, .ich) .fph-info-pairs,
:where(.fph, .ich) .fph-property-list,
:where(.fph, .ich) .fph-benefit-grid {
    border-color: var(--fpi-line);
}

:where(.fph, .ich) .fph-info-pairs article,
:where(.fph, .ich) .fph-property-list div,
:where(.fph, .ich) .fph-benefit-grid article {
    position: relative;
    border-color: var(--fpi-line);
    background: var(--fpi-white);
}

:where(.fph, .ich) .fph-info-pairs article:nth-child(4n + 2),
:where(.fph, .ich) .fph-info-pairs article:nth-child(4n + 3),
:where(.fph, .ich) .fph-property-list div:nth-child(4n + 2),
:where(.fph, .ich) .fph-property-list div:nth-child(4n + 3) {
    background: var(--fpi-cream);
}

:where(.fph, .ich) .fph-info-pairs article::before,
:where(.fph, .ich) .fph-property-list div::before {
    position: absolute;
    top: 0;
    left: 17px;
    width: 32px;
    height: 3px;
    background: var(--fpi-olive);
    content: "";
}

:where(.fph, .ich) .fph-info-pairs span,
:where(.fph, .ich) .fph-property-list dt {
    color: var(--fpi-olive-strong);
}

:where(.fph, .ich) .fph-info-pairs p,
:where(.fph, .ich) .fph-property-list dd,
:where(.fph, .ich) .fph-benefit-grid p {
    color: var(--fpi-body);
}

:where(.fph, .ich) .fph-benefit-grid article {
    min-height: 140px;
    padding-top: 22px;
    border-top: 3px solid var(--fpi-olive);
    background: var(--fpi-cream);
}

:where(.fph, .ich) .fph-benefit-grid article:nth-child(even) {
    background: var(--fpi-olive-mist);
}

:where(.fph, .ich) .fph-benefit-grid strong {
    color: var(--fpi-ink);
}

/* Technical tables */
:where(.fph, .ich) .fph-table-wrap {
    border-color: var(--fpi-line) !important;
    border-radius: 6px;
    background: var(--fpi-white) !important;
    box-shadow: 0 8px 24px rgba(67, 82, 42, .06);
}

:where(.fph, .ich) .fph-table-wrap th {
    padding: 14px 13px;
    border-right: 1px solid rgba(255, 255, 255, .22);
    background: var(--fpi-olive-strong);
    color: var(--fpi-white);
    letter-spacing: .07em;
}

:where(.fph, .ich) .fph-table-wrap th:last-child {
    border-right: 0;
}

:where(.fph, .ich) .fph-table-wrap td {
    border-color: var(--fpi-line);
    color: var(--fpi-body);
}

:where(.fph, .ich) .fph-table-wrap tbody tr:nth-child(even) td {
    background: var(--fpi-cream);
}

:where(.fph, .ich) .fph-table-wrap tbody tr:hover td {
    background: var(--fpi-olive-mist);
}

:where(.fph, .ich) .fph-table-wrap td:first-child {
    color: var(--fpi-ink);
    font-weight: 750;
}

/* Directions, guardrails and documents */
:where(.fph, .ich) .fph-directions,
:where(.fph, .ich) .fph-guardrails,
:where(.fph, .ich) .fph-documents {
    background: var(--fpi-line);
}

:where(.fph, .ich) .fph-directions li {
    position: relative;
    background: var(--fpi-cream);
}

:where(.fph, .ich) .fph-directions li::before {
    display: none;
}

:where(.fph, .ich) .fph-directions span {
    display: grid;
    place-items: center;
    align-self: start;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fpi-olive);
    color: var(--fpi-white);
}

:where(.fph, .ich) .fph-directions p {
    color: var(--fpi-body);
}

:where(.fph, .ich) .fph-guardrails article {
    border-top: 3px solid var(--fpi-olive);
    background: var(--fpi-white);
}

:where(.fph, .ich) .fph-guardrails article:nth-child(2) {
    background: var(--fpi-cream);
}

:where(.fph, .ich) .fph-guardrails article:nth-child(3) {
    background: var(--fpi-olive-mist);
}

:where(.fph, .ich) .fph-guardrails h5 {
    color: var(--fpi-ink);
}

:where(.fph, .ich) .fph-documents a {
    border-top: 3px solid transparent;
    background: var(--fpi-white) !important;
    color: var(--fpi-ink);
    transition: background-color .18s ease, border-color .18s ease;
}

:where(.fph, .ich) .fph-documents a:is(:hover, :focus-visible) {
    border-top-color: var(--fpi-olive);
    background: var(--fpi-olive-mist) !important;
}

:where(.fph, .ich) .fph-documents span {
    border-color: var(--fpi-olive);
    background: var(--fpi-olive);
    color: var(--fpi-white);
}

:where(.fph, .ich) .fph-documents b {
    color: var(--fpi-olive-strong);
}

@media (max-width: 900px) {
    :where(.fph, .ich) .fph-technical-tabs__label {
        min-width: 184px;
    }

    :where(.fph, .ich) .fph-technical-tabs button {
        flex-basis: 188px;
    }
}

@media (max-width: 620px) {
    :where(.fph, .ich) .fph-used-for {
        padding: 15px;
    }

    :where(.fph, .ich) .fph-technical {
        border-radius: 6px;
        box-shadow: 0 12px 30px rgba(58, 73, 40, .08), inset 0 4px 0 var(--fpi-olive);
    }

    :where(.fph, .ich) .fph-technical-tabs__label {
        min-width: 164px;
    }

    :where(.fph, .ich) .fph-technical-tabs button {
        flex-basis: 178px;
    }

    :where(.fph, .ich) .fph-technical-panels > section > h4 {
        font-size: 1.25rem;
    }

    :where(.fph, .ich) .fph-info-pairs article:nth-child(n),
    :where(.fph, .ich) .fph-property-list div:nth-child(n) {
        background: var(--fpi-white);
    }

    :where(.fph, .ich) .fph-info-pairs article:nth-child(even),
    :where(.fph, .ich) .fph-property-list div:nth-child(even) {
        background: var(--fpi-cream);
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(.fph, .ich) .fph-category-tabs button,
    :where(.fph, .ich) .fph-technical-tabs button,
    :where(.fph, .ich) .fph-documents a {
        transition: none;
    }
}
