/*
 * EventPro checkout responsive polish
 * Scope: WooCommerce checkout only
 * Purpose: Improve phone and tablet checkout presentation without altering checkout logic.
 */

/* Tablet and below: keep the checkout inside the viewport and remove legacy grid overflow. */
@media (max-width: 991px) {
    body.woocommerce-checkout #layout,
    body.woocommerce-checkout .checkoutPageContent,
    body.woocommerce-checkout .checkoutPageContent > .container,
    body.woocommerce-checkout #content,
    body.woocommerce-checkout form.checkout,
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order-review-area,
    body.woocommerce-checkout #order_review {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    body.woocommerce-checkout .checkoutPageContent > .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.woocommerce-checkout #order-review-area,
    body.woocommerce-checkout .woocommerce_billing_order_container {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.woocommerce-checkout .woocommerce-billing-fields,
    body.woocommerce-checkout .review_order_section,
    body.woocommerce-checkout #order_review,
    body.woocommerce-checkout #order_review.col-md-7,
    body.woocommerce-checkout .woocommerce-billing-fields.col-md-7,
    body.woocommerce-checkout .review_order_section.col-md-5 {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 767px) {
    /* Overall page rhythm */
    body.woocommerce-checkout .checkoutPageContent > .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.woocommerce-checkout .checkoutPageContent .page-content,
    body.woocommerce-checkout .checkoutPageContent .entry-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    body.woocommerce-checkout div.cartPageTop {
        min-height: 112px !important;
    }

    body.woocommerce-checkout h2.checkoutPageTitle {
        margin: 0 !important;
        padding: 34px 12px 20px !important;
        font-size: 20px !important;
        line-height: 1.2 !important;
    }

    /* If the legacy step bar is visible, keep it compact and horizontal. */
    body.woocommerce-checkout div.checkoutPageSteps,
    body.woocommerce-checkout div.orderReceivedSteps {
        margin-top: 0 !important;
        margin-bottom: 18px !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        overflow: hidden;
    }

    body.woocommerce-checkout div.checkoutPageSteps > .col-xs-12,
    body.woocommerce-checkout div.orderReceivedSteps > .col-xs-12 {
        width: 25% !important;
        float: left !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    body.woocommerce-checkout div.checkoutPageSteps > .col-xs-12:last-child,
    body.woocommerce-checkout div.orderReceivedSteps > .col-xs-12:last-child {
        display: none !important;
    }

    body.woocommerce-checkout div.checkoutSelectTicket,
    body.woocommerce-checkout div.checkoutValidation,
    body.woocommerce-checkout div.checkoutPayment,
    body.woocommerce-checkout div.checkoutThankou,
    body.woocommerce-checkout div.orderRSelectTicket,
    body.woocommerce-checkout div.orderRValidation,
    body.woocommerce-checkout div.OrderRPayment,
    body.woocommerce-checkout div.OrderRThankou {
        padding: 12px 0 !important;
        text-align: center;
        white-space: nowrap;
    }

    body.woocommerce-checkout div.checkoutPageSteps .fa-stack,
    body.woocommerce-checkout div.orderReceivedSteps .fa-stack {
        display: block;
        margin: 0 auto 4px;
        font-size: 0.7em !important;
    }

    body.woocommerce-checkout div.checkoutPageSteps span.lableText,
    body.woocommerce-checkout div.orderReceivedSteps span.lableText {
        display: block;
        font-size: 9px !important;
        line-height: 1.2 !important;
        letter-spacing: .02em;
    }

    /* Section cards */
    body.woocommerce-checkout div.woocommerce-billling-area-main,
    body.woocommerce-checkout div.review-order-area-main,
    body.woocommerce-checkout div.bookingProtect,
    body.woocommerce-checkout div.payment_method_section,
    body.woocommerce-checkout #attendee_details {
        margin: 0 0 16px !important;
        border: 1px solid #d9d9d9 !important;
        border-radius: 10px !important;
        overflow: hidden;
        background: #fff !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    }

    body.woocommerce-checkout div.review_order_section {
        margin-bottom: 0 !important;
    }

    body.woocommerce-checkout div.woocommerce-billling-area-main div.checkout_heading_text_area,
    body.woocommerce-checkout div.review-order-area-main div.checkout_heading_text_area,
    body.woocommerce-checkout div.bookingProtect div.checkout_heading_text_area,
    body.woocommerce-checkout div.payment_method_section div.checkout_heading_text_area,
    body.woocommerce-checkout div.tickera_owner_info h2 {
        margin: 0 !important;
        padding: 0 !important;
        background: #f2f2f2 !important;
        border: 0 !important;
        border-bottom: 1px solid #d9d9d9 !important;
    }

    body.woocommerce-checkout div.woocommerce-billling-area-main div.checkout_heading_text_area h3,
    body.woocommerce-checkout div.review-order-area-main div.checkout_heading_text_area h3,
    body.woocommerce-checkout div.bookingProtect div.checkout_heading_text_area h3,
    body.woocommerce-checkout div.payment_method_section div.checkout_heading_text_area h3,
    body.woocommerce-checkout div.tickera_owner_info div.tc-form-ticket-fields-wrap h2,
    body.woocommerce-checkout div.tickera_owner_info h2 {
        margin: 0 !important;
        padding: 12px 14px !important;
        font-size: 18px !important;
        line-height: 1.25 !important;
        font-weight: 500 !important;
        letter-spacing: .01em;
    }

    /* Billing and general fields */
    body.woocommerce-checkout div.woocommerce-billing-fields__field-wrapper,
    body.woocommerce-checkout div.bookingProtect-textarea-wrapper,
    body.woocommerce-checkout div.tickera_owner_info h5,
    body.woocommerce-checkout div.tickera_owner_info div.owner-info-wrap {
        padding: 14px !important;
    }

    body.woocommerce-checkout .woocommerce form .form-row,
    body.woocommerce-checkout form.checkout .form-row,
    body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
        width: 100% !important;
        float: none !important;
        clear: both !important;
        margin: 0 0 12px !important;
        padding: 0 !important;
    }

    body.woocommerce-checkout form.checkout label,
    body.woocommerce-checkout .woocommerce form .form-row label {
        display: block;
        margin: 0 0 5px !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
        font-weight: 500;
    }

    body.woocommerce-checkout .woocommerce form .form-row input.input-text,
    body.woocommerce-checkout .woocommerce form .form-row textarea,
    body.woocommerce-checkout .woocommerce form .form-row select,
    body.woocommerce-checkout form.checkout input[type="text"],
    body.woocommerce-checkout form.checkout input[type="email"],
    body.woocommerce-checkout form.checkout input[type="tel"],
    body.woocommerce-checkout form.checkout input[type="number"],
    body.woocommerce-checkout form.checkout input[type="password"],
    body.woocommerce-checkout form.checkout select,
    body.woocommerce-checkout form.checkout textarea,
    body.woocommerce-checkout .tickera-input-field {
        width: 100% !important;
        min-height: 46px !important;
        margin: 0 !important;
        padding: 10px 12px !important;
        border: 1px solid #cfcfcf !important;
        border-radius: 6px !important;
        background: #fff !important;
        box-shadow: none !important;
        font-size: 16px !important;
        line-height: 1.35 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout form.checkout textarea,
    body.woocommerce-checkout .woocommerce form .form-row textarea {
        min-height: 92px !important;
        resize: vertical;
    }

    body.woocommerce-checkout .select2-container {
        width: 100% !important;
    }

    body.woocommerce-checkout .select2-container .select2-selection--single {
        min-height: 46px !important;
        border: 1px solid #cfcfcf !important;
        border-radius: 6px !important;
    }

    body.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
        line-height: 44px !important;
        padding-left: 12px !important;
    }

    body.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
        height: 44px !important;
    }

    /* Order summary */
    body.woocommerce-checkout div.woocommerce-review-order-table-wrapper {
        padding: 14px !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table {
        width: 100% !important;
        margin: 0 !important;
        table-layout: auto;
        border-collapse: collapse !important;
        font-size: 13px !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tr {
        border-bottom: 1px solid #ececec !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tr:last-child {
        border-bottom: 0 !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table th,
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table td {
        padding: 11px 12px !important;
        vertical-align: top !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        overflow-wrap: anywhere;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-name {
        display: table-cell !important;
        width: 68% !important;
        text-align: left !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-total {
        width: 32% !important;
        text-align: right !important;
        white-space: normal !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-name div.quantity {
        margin: 8px 0 0 !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table dl.variation {
        margin: 6px 0 0 !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table dl.variation dt,
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table dl.variation dd {
        float: none !important;
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table dl.variation dd:after {
        content: "";
        display: block;
    }

    /* Coupon and notices */
    body.woocommerce-checkout .woocommerce-info,
    body.woocommerce-checkout .woocommerce-message,
    body.woocommerce-checkout .woocommerce-error {
        margin: 0 0 12px !important;
        padding: 12px 14px 12px 38px !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        border-radius: 6px !important;
    }

    /* Booking protection */
    body.woocommerce-checkout div#insurance_amount_selected_field label {
        display: flex !important;
        align-items: flex-start !important;
        gap: 8px;
        margin: 0 0 8px !important;
        padding: 10px !important;
        border: 1px solid #e3e3e3 !important;
        border-radius: 6px !important;
        background: #fff !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        font-weight: 400 !important;
    }

    body.woocommerce-checkout div#insurance_amount_selected_field input[type="radio"],
    body.woocommerce-checkout div#insurance_amount_selected_field input[type="checkbox"] {
        width: 18px !important;
        min-width: 18px !important;
        height: 18px !important;
        margin: 1px 0 0 !important;
        padding: 0 !important;
    }

    /* Payment methods */
    body.woocommerce-checkout .woocommerce-checkout #payment,
    body.woocommerce-checkout #payment {
        margin-top: 0 !important;
        background: transparent !important;
    }

    body.woocommerce-checkout #payment ul.payment_methods {
        margin: 0 !important;
        padding: 12px 14px !important;
        border: 0 !important;
    }

    body.woocommerce-checkout #payment ul.payment_methods > li {
        margin: 0 !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid #ececec;
    }

    body.woocommerce-checkout #payment ul.payment_methods > li:last-child {
        border-bottom: 0;
    }

    body.woocommerce-checkout #payment ul.payment_methods li > label {
        display: inline !important;
        margin: 0 !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
    }

    body.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
        width: 18px !important;
        height: 18px !important;
        margin: 0 8px 0 0 !important;
        vertical-align: middle;
    }

    body.woocommerce-checkout #payment ul.payment_methods li img {
        width: auto !important;
        max-width: 120px !important;
        max-height: 24px !important;
        margin: 0 0 0 6px !important;
        vertical-align: middle;
    }

    body.woocommerce-checkout #payment div.payment_box {
        margin: 10px 0 0 !important;
        padding: 12px !important;
        border-radius: 6px !important;
        background: #f7f7f7 !important;
        font-size: 13px !important;
        line-height: 1.45 !important;
    }

    body.woocommerce-checkout #payment div.payment_box p {
        margin-bottom: 10px !important;
    }

    body.woocommerce-checkout #payment div.payment_box p:last-child {
        margin-bottom: 0 !important;
    }

    body.woocommerce-checkout #payment .form-row {
        padding: 0 !important;
    }

    /* Ticket attendee details */
    body.woocommerce-checkout div.tickera_additional_info,
    body.woocommerce-checkout div.tickera_owner_info {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.woocommerce-checkout div.tickera_owner_info,
    body.woocommerce-checkout div.tickera_owner_info div.owner-info-wrap {
        min-height: 0 !important;
    }

    body.woocommerce-checkout div.tickera_additional_info div.tc-form-header-text-area {
        margin-top: 0 !important;
    }

    body.woocommerce-checkout div.tickera_owner_info h5 {
        margin: 0 !important;
        font-size: 15px !important;
        line-height: 1.35 !important;
    }

    body.woocommerce-checkout div#copyinfo {
        justify-content: flex-start !important;
        padding: 0 14px 10px !important;
    }

    body.woocommerce-checkout div#copyinfo #CopyPaste {
        margin: 0 !important;
        padding: 9px 11px !important;
        border: 1px solid #cfcfcf !important;
        border-radius: 6px !important;
        background: #f6f6f6 !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    /* Checkboxes, terms and final action */
    body.woocommerce-checkout form.checkout input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
        min-height: 0 !important;
        padding: 0 !important;
        vertical-align: top;
    }

    body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper,
    body.woocommerce-checkout .woocommerce-privacy-policy-text,
    body.woocommerce-checkout .place-order {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    body.woocommerce-checkout .place-order {
        margin: 0 !important;
        padding: 14px 0 0 !important;
    }

    body.woocommerce-checkout .woocommerce #payment #place_order,
    body.woocommerce-checkout .woocommerce-page #payment #place_order,
    body.woocommerce-checkout #place_order {
        width: 100% !important;
        min-height: 50px !important;
        margin: 0 !important;
        padding: 12px 16px !important;
        border: 0 !important;
        border-radius: 6px !important;
        background: #b21917 !important;
        color: #fff !important;
        font-family: "Oswald", sans-serif !important;
        font-size: 17px !important;
        line-height: 1.2 !important;
        text-transform: uppercase;
        letter-spacing: .02em;
    }

    body.woocommerce-checkout #place_order:hover,
    body.woocommerce-checkout #place_order:focus {
        background: #8f1513 !important;
        color: #fff !important;
    }

    body.woocommerce-checkout .form-submit-button-area {
        gap: 12px;
    }

    /* Remove inherited negative positioning and stray margins in legacy checkout overrides. */
    body.woocommerce-checkout h3#order_review_heading,
    body.woocommerce-checkout div#order_review,
    body.woocommerce-checkout .tickera_owner_info > p,
    body.woocommerce-checkout .tc-form-ticket-fields-wrap > p {
        margin-top: 0 !important;
    }

    /* Defensive fallback: if cached HTML was already transformed by the legacy
       ticket-table script, never allow it to hide the checkout cart row. */
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table.eventpro-mobile-ticket-table .eventpro-ticket-header-row {
        display: block !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table.eventpro-mobile-ticket-table td::before {
        content: none !important;
        display: none !important;
    }

    /* Strong mobile reset for the review table so legacy WooCommerce and theme rules do not fragment the summary. */
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table,
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody,
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot {
        display: block !important;
        width: 100% !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item {
        display: block !important;
        width: 100% !important;
        margin: 0 0 12px !important;
        padding: 12px !important;
        border: 1px solid #e5e5e5 !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name {
        margin: 0 0 8px !important;
        font-size: 14px !important;
        line-height: 1.45 !important;
        font-weight: 600 !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total {
        font-size: 14px !important;
        line-height: 1.4 !important;
        font-weight: 600 !important;
        text-align: left !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name .product-quantity {
        display: inline !important;
        margin-left: 4px !important;
        font-weight: 600 !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name div.quantity {
        display: inline !important;
        margin: 0 !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item dl.variation {
        display: block !important;
        margin-top: 6px !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid #ececec !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr:last-child {
        border-bottom: 0 !important;
        padding-bottom: 2px !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th,
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
        display: block !important;
        width: auto !important;
        padding: 0 !important;
        border: 0 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th {
        flex: 1 1 auto !important;
        margin: 0 !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
        text-align: left !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
        flex: 0 0 auto !important;
        margin: 0 !important;
        font-size: 14px !important;
        line-height: 1.45 !important;
        text-align: right !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr.order-total th,
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr.order-total td {
        font-size: 16px !important;
        font-weight: 700 !important;
    }

}

/*
 * v4 mobile checkout line-item stabilization
 * Exact DOM targeted from the rendered EventPro checkout source on 2026-09-09.
 * This intentionally overrides the generic checkout input sizing and the legacy
 * WooCommerce/theme mobile table rules only inside the order review component.
 */
@media (max-width: 767px) {
    /* Keep the buyer question visually inside the Your Order card. */
    body.woocommerce-checkout .review-order-area-main .tickera_buyer_info {
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 14px !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout .review-order-area-main .tickera_buyer_info .fields-wrap {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout .review-order-area-main .tickera_buyer_info .fields-wrap > label {
        display: block !important;
        margin: 0 0 7px !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
        font-weight: 500 !important;
    }

    body.woocommerce-checkout .review-order-area-main .tickera_buyer_info .buyer-field-text {
        width: 100% !important;
        min-height: 46px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout .review-order-area-main .tickera_buyer_info .description {
        display: block !important;
        margin: 7px 0 0 !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        font-style: italic !important;
    }

    /* The product row is one compact line instead of a nested mobile card. */
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px 12px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 14px 0 !important;
        border: 0 !important;
        border-top: 1px solid #ececec !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name {
        display: flex !important;
        flex: 1 1 190px !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px 10px !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
        font-weight: 600 !important;
        text-align: left !important;
        overflow: visible !important;
    }

    /* CQOC outputs quantity before its product-name container in the HTML.
       Reorder visually without changing the plugin or checkout AJAX behavior. */
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name .cqoc_container {
        order: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 7px !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: normal !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name .cqoc_product_name {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
        font-weight: 700 !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name div.quantity {
        order: 2 !important;
        display: inline-flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 6px !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name div.quantity::before {
        content: "Qty";
        display: inline-block !important;
        font-size: 12px !important;
        line-height: 1 !important;
        font-weight: 500 !important;
        color: #555 !important;
    }

    /* Override the broad form.checkout input[type=number] rule that was making
       the quantity control span the full product row. */
    body.woocommerce-checkout form.checkout table.woocommerce-checkout-review-order-table input.qty,
    body.woocommerce-checkout form.checkout table.woocommerce-checkout-review-order-table input[type="number"].qty {
        display: inline-block !important;
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
        min-height: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        padding: 5px 7px !important;
        border: 1px solid #cfcfcf !important;
        border-radius: 6px !important;
        background: #fff !important;
        box-shadow: none !important;
        font-size: 16px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* Neutralize the legacy child-theme negative offset on the remove link. */
    body.woocommerce-checkout #content table.woocommerce-checkout-review-order-table a.remove {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 22px !important;
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        font-size: 20px !important;
        line-height: 22px !important;
        text-align: center !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total {
        display: block !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: max-content !important;
        margin: 0 0 0 auto !important;
        padding: 0 !important;
        border: 0 !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
        font-weight: 700 !important;
        text-align: right !important;
        white-space: nowrap !important;
    }

    /* Keep totals clean and allow the USD conversion to occupy its own line. */
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr.order-total td strong {
        display: block !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr.order-total td {
        max-width: 58% !important;
        white-space: normal !important;
    }

    /* WooCommerce smallscreen styles may generate pseudo labels on responsive
       table cells. This checkout template supplies no data-title labels, so
       suppress them inside this table to avoid stray spacing. */
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table td::before,
    body.woocommerce-checkout table.woocommerce-checkout-review-order-table th::before {
        content: none !important;
        display: none !important;
    }
}
