/*
 * Campaign discount (ProductAmountCoupon): Blocks basket / checkout lines and the product page line.
 * Basket text arrives per line in --smp-pac-now / --smp-pac-pay / --smp-pac-unit (set by the JS); the look lives here.
 */
:root {
    --smp-pac-was-color: #6b6b6b;
    --smp-pac-now-color: #ffffff;
    --smp-pac-now-bg: #7c1715; /* Prime Deal banner red (owner, 2026-10-06); white on it is ~10:1 */
    --smp-pac-radius: 3px;
}

/* What the customer pays (team, 2026-10-10: the full price alone "was confusing"): on a campaign line
   WooCommerce shows the full price; strike it and put the price after the campaign next to it, in the
   basket (unit price under the name, line total on the right) and in the checkout summary. */
.smp-pac--pay .wc-block-cart-item__prices .wc-block-components-product-price__value,
.smp-pac--pay .wc-block-cart-item__total .wc-block-components-product-price__value,
.smp-pac--pay .wc-block-components-order-summary-item__individual-prices .wc-block-components-product-price__value,
.smp-pac--pay .wc-block-components-order-summary-item__total-price .wc-block-components-product-price__value {
    font-weight: 400;
    color: var(--smp-pac-was-color);
    text-decoration: line-through;
}

.smp-pac--pay .wc-block-cart-item__prices .wc-block-components-product-price::after,
.smp-pac--pay .wc-block-components-order-summary-item__individual-prices .wc-block-components-product-price::after {
    content: var(--smp-pac-unit);
    margin-left: 6px;
    font-weight: 700;
}

.smp-pac--pay .wc-block-cart-item__total .wc-block-components-product-price::after,
.smp-pac--pay .wc-block-components-order-summary-item__total-price .wc-block-components-product-price::after {
    content: var(--smp-pac-pay);
    display: block;
    font-weight: 700;
}

/* The campaign's saving, under it; wraps on narrow phones instead of widening the page. */
.smp-pac .wc-block-cart-item__total-price-and-sale-badge-wrapper::after {
    content: var(--smp-pac-now);
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    padding: 2px 6px;
    font-size: .75em;
    font-weight: 600;
    line-height: 1.4;
    text-align: right;
    white-space: normal;
    color: var(--smp-pac-now-color);
    background: var(--smp-pac-now-bg);
    border-radius: var(--smp-pac-radius);
}

/* Product page and product cards: the price the basket will charge, under the listed price. */
.smp-pac-pdp {
    margin: 8px 0 14px;
    padding: 8px 12px;
    font-size: .95rem;
    line-height: 1.45;
    color: var(--smp-pac-now-color);
    background: var(--smp-pac-now-bg);
    border-radius: 6px;
}

.smp-pac-pdp strong {
    font-weight: 700;
}

.smp-pac-pdp small {
    display: block;
    margin-top: 2px;
    font-size: .8em;
}

.smp-pac-card {
    margin: 6px 0 0;
    padding: 4px 8px;
    font-size: .85rem;
    line-height: 1.35;
    color: var(--smp-pac-now-color);
    background: var(--smp-pac-now-bg);
    border-radius: var(--smp-pac-radius);
}

.smp-pac-card small {
    display: block;
    font-size: .85em;
}

/* The theme colours <strong>/<small> on its own (dark on the red); the line's parts keep its colour. */
.smp-pac-pdp strong,
.smp-pac-pdp small,
.smp-pac-card strong,
.smp-pac-card small {
    color: var(--smp-pac-now-color) !important;
}

/* The theme's cards get height: 25rem !important from Tailwind's .h-100 (a layered !important, which
   nothing unlayered can override), so the line above would push the buttons out of the card.
   min-height beats height, so cards that carry the line grow with their content. !important: on
   desktop the Hot Deals grid sets min-height: 520px with a longer selector. */
.card.h-100:has(.smp-pac-card) {
    min-height: max-content !important;
}
