.sc-discount-field {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
}

.sc-discount-label {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: #01224d;
}

.sc-discount-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.sc-discount-row .input-text {
    flex: 1 1 180px;
    min-width: 140px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.4rem;
    text-transform: uppercase;
}

.sc-discount-row .button.sc-discount-apply {
    background: #fbbf24;
    color: #01224d;
    border: none;
    font-weight: 700;
}

.sc-discount-row .button.sc-discount-remove {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.sc-discount-row .button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.sc-discount-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    min-height: 1.1em;
}

.sc-discount-message.sc-error {
    color: #ef4444;
}

.sc-discount-message.sc-success {
    color: #22c55e;
}

/* Applied codes as removable chips (stacked discounts show several). The theme (Flatsome)
   adds generous padding / min-height to list items, which balloons the chips, so the size-
   critical properties are forced with !important to stay compact. */
.sc-discount-applied {
    list-style: none !important;
    margin: 0 0 0.6rem !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sc-discount-applied li.sc-discount-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    margin: 0 !important;
    padding: 0.3rem 0.65rem !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1.3 !important;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #01224d;
    list-style: none !important;
}

.sc-discount-applied li.sc-discount-chip::before,
.sc-discount-applied li.sc-discount-chip::marker {
    content: none !important;
    display: none !important;
}

.sc-discount-chip-code {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sc-discount-chip .sc-discount-remove {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.1rem;
    margin: 0;
    min-height: 0;
}

.sc-discount-chip .sc-discount-remove:hover {
    color: #ef4444;
}

.sc-discount-chip .sc-discount-remove[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/* Suppress WooCommerce's native coupon entry — discounts go ONLY      */
/* through our code field above. Native coupons stay technically       */
/* enabled (our field + loyalty's referral field render via the        */
/* wc_coupons_enabled() gate), but no native coupons exist, so there   */
/* is nothing to apply. The checkout form is also removed server-side. */
/* ------------------------------------------------------------------ */

/* Cart: hide only the native input + Apply button (unique WC selectors).
   Our .sc-discount-* field renders right after, inside the same wrapper,
   and stays visible. */
#coupon_code,
label[for="coupon_code"],
button[name="apply_coupon"] {
    display: none !important;
}

/* Checkout: hide the native "Have a coupon?" toggle/form (belt-and-suspenders;
   it is also removed via remove_action() in PHP). */
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout form.checkout_coupon {
    display: none !important;
}
