/* Near-Expiry Stock Discount — Frontend Styles */

/* Product page promo notice */
.nesd-promo-notice {
    display: block;
    margin: 12px 0 16px;
    padding: 10px 14px;
    background: #fff8e1;
    border-left: 4px solid #dba617;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.45;
    color: #3c434a;
}

.nesd-promo-notice__title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px;
    color: #8a6d00;
    margin-bottom: 4px;
}

.nesd-promo-notice__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nesd-promo-notice__list li {
    margin: 2px 0;
    padding: 0;
}

.nesd-promo-notice__list li::before {
    content: "• ";
    color: #dba617;
    font-weight: 700;
}

/* Cart line note (appended inside the item name cell) */
.nesd-cart-item-note {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #8a6d00;
    letter-spacing: .01em;
}

/* Cart line subtotal (regular struck-through, discounted highlighted) */
.nesd-subtotal-regular {
    display: inline-block;
    color: #888;
    text-decoration: line-through;
    margin-right: 4px;
}

.nesd-subtotal-discounted {
    display: inline-block;
    text-decoration: none;
    color: #8a6d00;
    font-weight: 600;
}

/* Opt-in radio control */
.nesd-opt-in {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0c97a;
}

.nesd-opt-in__choice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.nesd-opt-in__choice:hover {
    border-color: #dba617;
}

.nesd-opt-in__choice input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.nesd-opt-in__choice input[type="radio"]:checked ~ .nesd-opt-in__body {
    color: #3c434a;
}

.nesd-opt-in__choice:has(input[type="radio"]:checked) {
    border-color: #dba617;
    background: #fffdf5;
}

.nesd-opt-in__choice:has(input[type="radio"]:disabled) {
    opacity: .55;
    cursor: not-allowed;
}

/* Forced state: when every unit on the shelf is already near-expiry, the
   Regular option is collapsed out of sight so customers aren't offered a
   choice that doesn't exist. */
.nesd-opt-in--forced .nesd-opt-in__choice--regular {
    display: none;
}

.nesd-opt-in__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.nesd-opt-in__body strong {
    font-size: 13px;
    font-weight: 600;
}

.nesd-opt-in__price {
    font-size: 13px;
    color: #3c434a;
}

.nesd-opt-in__price .woocommerce-Price-amount {
    font-weight: 600;
}

.nesd-opt-in__meta {
    font-size: 11px;
    color: #8a6d00;
}
