/* Classic cart only. Keep Woo's form, field names and disabled-button behavior. */
body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table .product-price,
body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table .product-quantity,
body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions > button[name="update_cart"] {
    display: none;
}
body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .coupon {
    width: 100%;
    margin-bottom: 0;
}
@media (min-width: 768px) {
    /* Eduma's Product header already spans thumbnail + name (colspan=2). */
    body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table thead .product-thumbnail {
        display: none;
    }
    body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table .product-remove {
        width: 36px;
        padding-right: 12px;
    }
    body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.product-thumbnail {
        width: 108px;
        padding-right: 20px;
    }
    body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table .product-subtotal {
        width: 140px;
        padding-right: 0;
        padding-left: 16px;
        text-align: right;
        white-space: nowrap;
    }
}
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .coupon {
    display: flex;
    align-items: stretch;
    float: left;
    width: calc(100% - 210px);
    max-width: 540px;
    margin: 0;
    padding: 0;
}
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .coupon .input-text {
    flex: 1 1 0;
    float: none;
    min-width: 0;
    width: 0;
    height: 44px;
    margin: 0;
    border-radius: 4px 0 0 4px;
}
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .coupon button[name="apply_coupon"] {
    flex: 0 0 auto;
    float: none;
    width: auto;
    height: 44px;
    margin: 0;
    white-space: nowrap;
    border-radius: 0 4px 4px 0;
}
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions > button[name="update_cart"] {
    float: right;
    width: 190px;
    max-width: 100%;
    height: 44px;
    margin: 0;
}
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions > a.wc-backward {
    display: block;
    position: static;
    inset: auto;
    clear: both;
    float: none;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding-top: 16px;
    color: #805b00;
    text-decoration: underline;
}
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions > a.wc-backward:hover,
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions > a.wc-backward:focus-visible {
    color: #1c1c1c;
}
@media (max-width: 991px) {
    body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .coupon {
        float: none;
        width: 100%;
        max-width: none;
        margin-bottom: 12px;
    }
    body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions > button[name="update_cart"] {
        float: none;
        width: 100%;
    }
}
@media (max-width: 575px) {
    body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .coupon {
        flex-direction: column;
        gap: 10px;
    }
    body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .coupon .input-text,
    body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .coupon button[name="apply_coupon"] {
        flex: 0 0 auto;
        width: 100%;
        border-radius: 4px;
    }
    body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions > a.wc-backward {
        width: 100%;
        text-align: center;
    }
}

/* Keep the real table cell. Only its native coupon/link controls share a flex row. */
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions > .mw-cart-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    width: 100%;
}
body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .mw-cart-controls > .coupon {
    flex: 1 1 320px;
    float: none;
    width: auto;
    min-width: 0;
    max-width: 540px;
    margin: 0;
}
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .mw-cart-controls > a.wc-backward {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    position: static;
    inset: auto;
    clear: none;
    float: none;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0;
    color: #805b00;
    text-align: center;
    text-decoration: underline;
}
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .mw-cart-controls > a.wc-backward:hover,
body.woocommerce-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .mw-cart-controls > a.wc-backward:focus-visible {
    color: #1c1c1c;
}
@media (max-width: 575px) {
    body.woocommerce-cart.mw-single-course-cart .entry-content .woocommerce form.woocommerce-cart-form table.cart.shop_table td.actions .mw-cart-controls > .coupon {
        flex-basis: 100%;
        max-width: none;
    }
}
