/**
 * WC Checkout Optimizer — Cart UI styles.
 *
 * Loaded site-wide (no admin guard, no page restriction) by WCO_Cart_UI::enqueue_assets().
 * Covers: sale price strikethrough, checkout remove link, trust badges.
 *
 * @package WC_Checkout_Optimizer
 */

/* ==========================================================================
   CARTUX-01 — Sale Price Strikethrough
   ========================================================================== */

/* wco-regular-price (del) — dimmed, strikethrough */
.wco-regular-price {
    opacity:      0.5;
    margin-right: 6px;
}

/* Force strikethrough through WC's nested price spans which create their
   own decoration context. !important overrides theme rules. */
.wco-regular-price,
.wco-regular-price .woocommerce-Price-amount,
.wco-regular-price .amount,
.wco-regular-price bdi {
    text-decoration: line-through !important;
}

/* wco-sale-price (ins) — gold accent on the nested spans (not <ins> itself,
   which WC's spans override with their own color). */
.wco-sale-price,
.wco-sale-price .woocommerce-Price-amount,
.wco-sale-price .amount,
.wco-sale-price bdi {
    color:           var(--color-gold, #d4a437) !important;
    text-decoration: none !important;
}

.wco-sale-price {
    font-weight: 600;
}

/* wco-sale-badge — small gold pill next to the sale price explaining why it's discounted */
.wco-sale-badge {
    display:          inline-block;
    margin-left:      6px;
    padding:          2px 8px;
    font-size:        0.7rem;
    font-weight:      700;
    letter-spacing:   0.05em;
    color:            #000;
    background-color: var(--color-gold, #d4a437);
    border-radius:    3px;
    vertical-align:   middle;
    text-transform:   uppercase;
}

/* ==========================================================================
   CARTUX-03 — Checkout Remove Link
   ========================================================================== */

.wco-remove-wrap {
    display:      inline;
    margin-right: 4px;
}

.wco-remove-item {
    color:           var(--color-muted, #999);
    text-decoration: none;
    font-size:       1.1em;
    line-height:     1;
    transition:      color 0.15s ease;
}

.wco-remove-item:hover {
    color: #e74c3c;
}

/* ==========================================================================
   CARTUX-02 — Trust Badges
   ========================================================================== */

.wco-trust-badges {
    text-align:  center;
    margin-top:  20px;
    padding:     20px 0;
    border-top:  1px solid rgba(255, 255, 255, 0.1);
}

.wco-trust-badge-item {
    margin-bottom: 20px;
}

.wco-trust-badge-item img {
    height: auto;
}

.wco-trust-badge-item a {
    text-decoration: none;
}

.wco-guarantee-badge {
    display:        block;
    font-size:      0.9rem;
    font-weight:    700;
    color:          var(--color-gold, #d4a437);
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .wco-trust-badges {
        padding: 15px 0;
    }
}

/* ==========================================================================
   CARTUX-03 — Loading overlay during AJAX item removal
   ========================================================================== */

/* Applied to .woocommerce-checkout-review-order while the remove AJAX is in-flight.
   Matches WC's blockUI visual effect: dims + blocks pointer input. */
.wco-review-loading {
    position:       relative;
    pointer-events: none;
    opacity:        0.5;
    transition:     opacity 0.2s ease;
}

/* ==========================================================================
   SUBDSP-01/02 -- Subscription Period Suffix & Price Display
   ========================================================================== */

.wco-sub-price,
.wco-sub-subtotal {
    display: inline;
}

.wco-sub-period-suffix {
    color:       var(--color-muted, #999);
    font-size:   0.9em;
    font-weight: 400;
}

/* ==========================================================================
   SUBDSP-04 -- Payment Summary Box (populated by Plan 02)
   ========================================================================== */

.wco-sub-payment-summary {
    margin-top:    20px;
    padding:       16px 20px;
    border:        1px solid rgba(212, 164, 55, 0.3);
    border-radius: 4px;
    background:    var(--color-surface, #1a1a1a);
}

.wco-sub-payment-summary__title {
    font-size:      0.85rem;
    font-weight:    700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color:          var(--color-gold, #d4a437);
    margin:         0 0 12px;
}

.wco-sub-payment-summary__line {
    display:         flex;
    justify-content: space-between;
    align-items:     baseline;
    padding:         4px 0;
}

.wco-sub-payment-summary__label {
    font-size: 0.9rem;
    color:     var(--color-muted, #999);
}

.wco-sub-payment-summary__value {
    font-size:  0.9rem;
    text-align: right;
}

.wco-sub-payment-summary__value--primary {
    font-weight: 700;
    font-size:   1.1em;
    color:       #fff;
}

.wco-sub-payment-summary__value--tax {
    font-size: 0.85rem;
    color:     var(--color-muted, #999);
}

.wco-sub-payment-summary__explanation {
    margin-top:  12px;
    padding-top: 8px;
    border-top:  1px solid rgba(255, 255, 255, 0.08);
    font-size:   0.8rem;
    color:       var(--color-muted, #999);
    line-height: 1.4;
}

/* ==========================================================================
   SUBDSP-05 -- Next Billing Date (populated by Plan 03)
   ========================================================================== */

.wco-sub-next-billing {
    display:    block;
    font-size:  0.8rem;
    color:      var(--color-muted, #999);
    margin-top: 2px;
}

/* ==========================================================================
   Responsive -- Payment Summary
   ========================================================================== */

@media (max-width: 768px) {
    .wco-sub-payment-summary {
        padding: 12px 14px;
    }

    .wco-sub-payment-summary__line {
        flex-wrap: wrap;
        gap:       2px;
    }
}
