.wpbay-health-box {
    overflow: hidden;
    border-color: hsl(var(--border-color));
    box-shadow: 0 12px 35px hsl(var(--heading-color) / 0.06);
}

.wpbay-health-box::before {
    display: none;
}

.wpbay-health-compact {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: clamp(24px, 4vw, 34px);
}

.wpbay-health-compact__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    color: hsl(var(--main));
    background: hsl(var(--main) / 0.09);
}

.wpbay-health-compact__icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wpbay-health-compact__content {
    min-width: 0;
}

.wpbay-health-type,
.wpbay-health-seller-only,
.wpbay-health-seller-score {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 999px;
    color: hsl(var(--body-color));
    background: hsl(var(--section-bg));
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.wpbay-health-compact h2 {
    margin: 8px 0 5px;
    color: hsl(var(--heading-color));
    font-size: clamp(21px, 3vw, 25px);
    line-height: 1.25;
}

.wpbay-health-summary {
    max-width: 680px;
    margin: 0;
    color: hsl(var(--body-color));
    font-size: 14px;
    line-height: 1.55;
}

.product-details .product-comment-form .wpbay-health-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 17px 0 0;
    padding: 0;
    list-style: none;
}

.product-details .product-comment-form .wpbay-health-facts > li {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 9px;
    color: hsl(var(--heading-color));
    background: hsl(var(--body-bg));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

.product-details .product-comment-form .wpbay-health-facts > li::before {
    position: static;
    display: block;
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border: 0;
    border-radius: 50%;
    background: hsl(var(--main));
    content: "";
}

.wpbay-health-checked {
    margin: 13px 0 0;
    color: hsl(var(--body-color));
    font-size: 11px;
    line-height: 1.4;
}

.wpbay-health-details {
    border-top: 1px solid hsl(var(--border-color));
}

.wpbay-health-details > summary {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 40px;
    margin: 0 clamp(24px, 4vw, 34px) 24px 90px;
    padding: 9px 14px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 9px;
    color: hsl(var(--heading-color));
    background: hsl(var(--body-bg));
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    list-style: none;
}

.wpbay-health-details > summary::-webkit-details-marker,
.wpbay-health-calc > summary::-webkit-details-marker {
    display: none;
}

.wpbay-health-details > summary:hover {
    border-color: hsl(var(--main) / 0.4);
    color: hsl(var(--main));
}

.wpbay-health-details > summary:focus-visible,
.wpbay-health-calc > summary:focus-visible,
.wpbay-health-tip:focus-visible,
.wpbay-health-action:focus-visible {
    outline: 3px solid hsl(var(--main) / 0.2);
    outline-offset: 2px;
}

.wpbay-health-details > summary svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 160ms ease;
}

.wpbay-health-details__open {
    display: none;
}

.wpbay-health-details[open] > summary .wpbay-health-details__closed {
    display: none;
}

.wpbay-health-details[open] > summary .wpbay-health-details__open {
    display: inline;
}

.wpbay-health-details[open] > summary svg {
    transform: rotate(180deg);
}

.wpbay-health-details__content {
    padding: clamp(23px, 4vw, 32px);
    border-top: 1px solid hsl(var(--border-color));
    background: hsl(var(--section-bg) / 0.55);
}

.wpbay-health-section {
    padding: clamp(23px, 4vw, 32px);
}

.wpbay-health-section + .wpbay-health-section,
.wpbay-health-seller-plan {
    border-top: 1px solid hsl(var(--border-color));
}

.wpbay-health-section__heading {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.wpbay-health-section__heading h3,
.wpbay-health-section > h3 {
    margin: 0 0 4px;
    color: hsl(var(--heading-color));
    font-size: 17px;
    line-height: 1.35;
}

.wpbay-health-section__heading p {
    max-width: 680px;
    margin: 0;
    color: hsl(var(--body-color));
    font-size: 12px;
    line-height: 1.55;
}

.product-details .product-comment-form .wpbay-health-signals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-details .product-comment-form .wpbay-health-signals > li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    gap: 10px;
    align-items: start;
    min-width: 0;
    margin: 0;
    padding: 13px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 10px;
    background: hsl(var(--body-bg));
}

.product-details .product-comment-form .wpbay-health-details .wpbay-health-signals > li::before,
.product-details .product-comment-form .wpbay-health-actions > li::before,
.product-details .product-comment-form .wpbay-health-help__labels > li::before,
.product-details .product-comment-form .wpbay-health-help__scale > li::before {
    display: none !important;
    content: none !important;
}

.wpbay-health-signal__icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: hsl(var(--body-color));
    background: hsl(var(--border-color) / 0.75);
}

.wpbay-health-signal__icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wpbay-health-signals > li.is-complete .wpbay-health-signal__icon {
    color: hsl(var(--success));
    background: hsl(var(--success) / 0.1);
}

.wpbay-health-signals > li.is-partial .wpbay-health-signal__icon {
    color: hsl(var(--main));
    background: hsl(var(--main) / 0.1);
}

.wpbay-health-signal__text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.wpbay-health-signal__text strong {
    color: hsl(var(--heading-color));
    font-size: 12px;
    line-height: 1.4;
}

.wpbay-health-signal__text > span {
    color: hsl(var(--body-color));
    font-size: 12px;
    line-height: 1.5;
}

.wpbay-health-tip {
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: hsl(var(--body-color));
    background: transparent;
    line-height: 1;
}

.wpbay-health-tip:hover,
.wpbay-health-tip:focus-visible {
    color: hsl(var(--main));
    background: hsl(var(--main) / 0.09);
}

.wpbay-health-tip svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wpbay-health-tooltip .tooltip-inner {
    max-width: min(360px, calc(100vw - 30px));
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.wpbay-health-history {
    display: flex;
    gap: 5px;
    align-items: center;
    margin: 15px 0 0;
    color: hsl(var(--body-color));
    font-size: 11px;
    line-height: 1.5;
}

.wpbay-health-calc {
    margin-top: 16px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 10px;
    background: hsl(var(--body-bg));
}

.wpbay-health-calc > summary {
    position: relative;
    padding: 13px 44px 13px 14px;
    color: hsl(var(--heading-color));
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    list-style: none;
}

.wpbay-health-calc > summary::after {
    position: absolute;
    top: 50%;
    right: 15px;
    color: hsl(var(--main));
    content: "+";
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    transform: translateY(-50%);
}

.wpbay-health-calc[open] > summary::after {
    content: "−";
}

.wpbay-health-help {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 0 14px 16px;
    border-top: 1px solid hsl(var(--border-color));
}

.wpbay-health-help__group {
    padding-top: 16px;
}

.wpbay-health-help__group + .wpbay-health-help__group {
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid hsl(var(--border-color));
}

.wpbay-health-help__group h3 {
    margin: 0 0 4px;
    color: hsl(var(--heading-color));
    font-size: 15px;
}

.wpbay-health-help__lead {
    margin: 0 0 12px;
    color: hsl(var(--body-color));
    font-size: 12px;
    line-height: 1.5;
}

.wpbay-health-help__signals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

.wpbay-health-help__item {
    padding: 10px 11px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 8px;
    background: hsl(var(--section-bg) / 0.65);
}

.wpbay-health-help__item dt {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    color: hsl(var(--heading-color));
    font-size: 12px;
    font-weight: 700;
}

.wpbay-health-help__pts {
    flex: 0 0 auto;
    color: hsl(var(--main));
}

.wpbay-health-help__item dd {
    margin: 5px 0 0;
    color: hsl(var(--body-color));
    font-size: 11px;
    line-height: 1.5;
}

.wpbay-health-help__item dd p {
    margin: 0;
}

.product-details .product-comment-form .wpbay-health-help__scale,
.product-details .product-comment-form .wpbay-health-help__labels {
    display: grid;
    gap: 6px;
    margin: 9px 0 0;
    padding: 0;
    list-style: none;
}

.product-details .product-comment-form .wpbay-health-help__scale > li,
.product-details .product-comment-form .wpbay-health-help__labels > li {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    color: hsl(var(--body-color));
    font-size: 11px;
    line-height: 1.4;
}

.product-details .product-comment-form .wpbay-health-help__labels {
    display: flex;
    flex-wrap: wrap;
    margin-top: 11px;
}

.product-details .product-comment-form .wpbay-health-help__labels > li {
    justify-content: flex-start;
    padding: 6px 8px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 7px;
    background: hsl(var(--section-bg));
    white-space: nowrap;
}

.wpbay-health-help__subheading {
    margin: 13px 0 0;
    color: hsl(var(--heading-color));
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.wpbay-health-seller-plan {
    background: hsl(var(--main) / 0.035);
}

.wpbay-health-seller-only {
    margin-bottom: 8px;
    border-color: hsl(var(--main) / 0.23);
    color: hsl(var(--main));
    background: hsl(var(--main) / 0.08);
}

.wpbay-health-seller-score {
    flex: 0 0 auto;
    background: hsl(var(--body-bg));
}

.product-details .product-comment-form .wpbay-health-actions {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-details .product-comment-form .wpbay-health-actions > li {
    margin: 0;
    padding: 0;
    border: 0;
}

.wpbay-health-action {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 10px;
    color: hsl(var(--heading-color)) !important;
    background: hsl(var(--body-bg));
    text-decoration: none !important;
}

a.wpbay-health-action:hover {
    border-color: hsl(var(--main) / 0.35);
    transform: translateY(-1px);
}

.wpbay-health-action__copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.wpbay-health-action__copy strong {
    font-size: 13px;
    line-height: 1.45;
}

.wpbay-health-action__priority {
    color: hsl(var(--main));
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.wpbay-health-action__impact {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    color: hsl(var(--success));
    background: hsl(var(--success) / 0.09);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.wpbay-health-seller-footnote {
    margin: 12px 0 0;
    color: hsl(var(--body-color));
    font-size: 11px;
    line-height: 1.5;
}

.wpbay-health-all-clear {
    display: grid;
    gap: 3px;
    padding: 13px 15px;
    border: 1px solid hsl(var(--success) / 0.25);
    border-radius: 10px;
    color: hsl(var(--body-color));
    background: hsl(var(--success) / 0.07);
    font-size: 12px;
    line-height: 1.5;
}

.wpbay-health-all-clear strong {
    color: hsl(var(--heading-color));
    font-size: 13px;
}

.wpbay-health-score-gap {
    border-color: hsl(var(--main) / 0.25);
    background: hsl(var(--main) / 0.06);
}

/* Keep Product Health in control when the older single-product stylesheet is present. */
.product-details .product-comment-form .wpbay-health-details .wpbay-health-signals > li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    gap: 10px;
    align-items: start;
    min-width: 0;
    margin: 0;
    padding: 13px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 10px;
    background: hsl(var(--body-bg));
}

.product-details .product-comment-form .wpbay-health-details .wpbay-health-signals > li:first-child,
.product-details .product-comment-form .wpbay-health-details .wpbay-health-signals > li:last-child {
    padding: 13px;
    border: 1px solid hsl(var(--border-color));
}

.product-details .product-comment-form .wpbay-health-details .wpbay-health-signal__text strong,
.product-details .product-comment-form .wpbay-health-details .wpbay-health-signal__text > span {
    font-size: 12px;
}

.product-details .product-comment-form .wpbay-health-details .wpbay-health-history {
    gap: 5px;
    margin-top: 15px;
    font-size: 11px;
}

.product-details .product-comment-form .wpbay-health-calc > summary {
    display: block;
    padding: 13px 44px 13px 14px;
    font-size: 12px;
}

.product-details .product-comment-form .wpbay-health-calc > summary::before {
    display: none;
    content: none;
}

.product-details .product-comment-form .wpbay-health-help {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    max-width: none;
    margin-top: 0;
    padding: 0 14px 16px;
}

.product-details .product-comment-form .wpbay-health-help__group + .wpbay-health-help__group {
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid hsl(var(--border-color));
}

.product-details .product-comment-form .wpbay-health-help__signals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

.product-details .product-comment-form .wpbay-health-help__item,
.product-details .product-comment-form .wpbay-health-help__item:first-child,
.product-details .product-comment-form .wpbay-health-help__item:last-child {
    padding: 10px 11px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 8px;
    background: hsl(var(--section-bg) / 0.65);
}

.product-details .product-comment-form .wpbay-health-help__item dt {
    font-size: 12px;
}

.product-details .product-comment-form .wpbay-health-help__lead {
    margin-bottom: 12px;
    font-size: 12px;
}

.product-details .product-comment-form .wpbay-health-help__item dd {
    margin-top: 5px;
}

.product-details .product-comment-form .wpbay-health-help__item dd p {
    font-size: 11px;
}

.product-details .product-comment-form .wpbay-health-help p.wpbay-health-help__subheading {
    margin: 13px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 11px;
}

.product-details .product-comment-form .wpbay-health-help__labels {
    display: flex;
    grid-template-columns: none;
    flex-wrap: wrap;
}

.product-details .product-comment-form .wpbay-health-help__labels > li {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid hsl(var(--border-color));
    border-radius: 999px;
    background: hsl(var(--section-bg));
    white-space: nowrap;
}

.wpbay-health-sidebar-item .wpbay-health-sidebar-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: flex-start;
    width: 100%;
    color: inherit;
    font-weight: 300;
    text-decoration: none;
}

.wpbay-health-sidebar-item .icon {
    align-self: start;
    margin-top: 2px;
}

.wpbay-health-sidebar-item .icon img {
    display: block;
}

.wpbay-health-sidebar-item .text {
    min-width: 0;
    font-weight: 300;
}

.wpbay-health-sidebar-facts {
    display: block;
    margin-top: 3px;
    color: hsl(var(--body-color));
    font-size: 11px;
    font-weight: 300;
    line-height: 1.45;
}

.wpbay-health-sidebar-link:hover .text,
.wpbay-health-sidebar-link:focus-visible .text {
    color: hsl(var(--main));
}

.wpbay-health-sidebar-link:focus-visible {
    outline: 2px solid hsl(var(--main) / 0.25);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .wpbay-health-compact {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 14px;
        padding: 22px 20px;
    }

    .wpbay-health-compact__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .wpbay-health-compact__icon svg {
        width: 22px;
        height: 22px;
    }

    .wpbay-health-details > summary {
        margin: 0 20px 20px 76px;
    }

    .wpbay-health-details__content,
    .wpbay-health-section {
        padding: 22px 20px;
    }

    .product-details .product-comment-form .wpbay-health-signals,
    .wpbay-health-help {
        grid-template-columns: 1fr;
    }

    .product-details .product-comment-form .wpbay-health-help__signals {
        grid-template-columns: 1fr;
    }

    .wpbay-health-help {
        gap: 2px;
    }

    .wpbay-health-section__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .wpbay-health-seller-score {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .wpbay-health-compact {
        grid-template-columns: 1fr;
    }

    .wpbay-health-details > summary {
        margin-left: 20px;
    }

    .product-details .product-comment-form .wpbay-health-facts {
        display: grid;
        grid-template-columns: 1fr;
    }

    .wpbay-health-action {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (prefers-reduced-motion: reduce) {
    .wpbay-health-details > summary svg,
    .wpbay-health-action {
        transition: none;
    }
}
