/* Custom Shipping Rules — Checkout "Shipping" column */

/* ── Column widths: Produkt 60% / Zwischensumme 20% / Versand 20% ── */
#order_review table.shop_table {
    width: 100%;
    table-layout: fixed;
}

#order_review .shop_table th.product-name,
#order_review .shop_table td.product-name {
    width: 60%;
}

#order_review .shop_table th.product-subtotal,
#order_review .shop_table td.product-subtotal {
    width: 20%;
}

#order_review .shop_table th.csr-shipping-col,
#order_review .shop_table td.csr-shipping-col {
    width: 20%;
    text-align: right;
    white-space: nowrap;
    vertical-align: top;
}

/* Match the same look as the Subtotal price cell — no badge/box, just plain text */
#order_review .shop_table td.csr-shipping-col .csr-shipping-col-value {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

#order_review .shop_table td.csr-shipping-col .csr-shipping-col-empty {
    color: #9ca3af;
}

/* Invoice text — shown when admin has set a custom message for invoice-type items */
#order_review .shop_table td.csr-shipping-col .csr-shipping-col-invoice {
    display: inline-block;
    font-size: 11px;
    color: #804519;
    font-style: italic;
    line-height: 1.4;
    max-width: 160px;
    white-space: normal;
    text-align: right;
}

.csr-checkout-invoice-notice-row td {
    border: none !important;
}

/* Versandhinweis-Box styles removed — invoice text now shown inline
   in the Shipment column per product row. */

/* ── Mobile Responsive — screens up to 600px ── */
@media ( max-width: 600px ) {

    /* Prevent the table wrapper from pushing outside the viewport */
    #order_review {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Table fills the container, fixed layout so percentages are respected */
    #order_review table.shop_table {
        width: 100% !important;
        max-width: 100%;
        table-layout: fixed;
        overflow-x: hidden;
    }

    /* ALL th and td: allow wrapping and hyphenation by default */
    #order_review .shop_table th,
    #order_review .shop_table td {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }

    /* Normalize ALL cells — headers and data — to the same size */
    #order_review .shop_table th,
    #order_review .shop_table td {
        font-size: 12px !important;
        font-weight: normal;
    }

    /* Keep footer totals (Zwischensumme, Gesamtsumme) bold but same size */
    #order_review .shop_table tfoot tr th,
    #order_review .shop_table tfoot tr td {
        font-size: 12px !important;
        font-weight: bold;
    }

    /* Price amounts inside amount/bdi spans */
    #order_review .shop_table .amount,
    #order_review .shop_table bdi {
        font-size: 12px !important;
    }

    /* Product name: largest column */
    #order_review .shop_table th.product-name,
    #order_review .shop_table td.product-name {
        width: 44%;
        font-size: 12px;
    }

    /* Subtotal column */
    #order_review .shop_table th.product-subtotal,
    #order_review .shop_table td.product-subtotal {
        width: 28%;
        font-size: 12px;
        text-align: right;
    }

    /* Shipping column */
    #order_review .shop_table th.csr-shipping-col,
    #order_review .shop_table td.csr-shipping-col {
        width: 28%;
        font-size: 12px;
        text-align: right;
    }

    /* Invoice text */
    #order_review .shop_table td.csr-shipping-col .csr-shipping-col-invoice {
        max-width: 100%;
        font-size: 10px;
    }
}
