/**
 * Plugin Discounts - Stili frontend
 */

/* ── Input coupon ────────────────────────────────────────── */
.discount-coupon-section {
    padding: .75rem 0;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

#discountCouponCode {
    flex: 1;
    min-width: 0;
}

#discountCouponError {
    font-size: .8rem;
}

/* ── Riga sconto nel riepilogo ───────────────────────────── */
[data-discount-row] {
    padding: .25rem 0;
}

/* ── Badge promozione sulle card prodotto ─────────────────── */
.discount-badge {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 2;
    font-size: .7rem;
    font-weight: 600;
    padding: .25em .6em;
    border-radius: .25rem;
    background-color: var(--bs-danger, #dc3545);
    color: #fff;
}

/* ── Prezzo barrato (promozioni) ─────────────────────────── */
.discount-price-original {
    text-decoration: line-through;
    color: var(--bs-secondary, #6c757d);
    font-size: .9em;
    margin-right: .35rem;
}

.discount-price-promo {
    color: var(--bs-danger, #dc3545);
    font-weight: 600;
}

/* ── Prezzi barrati nelle righe carrello ────────────────── */
.cart-item-price .discount-price-original,
.cart-item-price .discount-price-promo,
.cart-item-unit-price .discount-price-original,
.cart-item-unit-price .discount-price-promo {
    display: block;
}

/* ── Loading spinner sul bottone ─────────────────────────── */
#discountApplyBtn.loading,
#discountRemoveBtn.loading {
    pointer-events: none;
    opacity: .65;
}
