/* SCube Event Manager v0.5.0 - responsive cart + coupon alignment. */
body.woocommerce-cart {
    overflow-x: hidden;
}
body.woocommerce-cart .site-main,
body.woocommerce-cart main,
body.woocommerce-cart .woocommerce,
body.woocommerce-cart .wc-block-cart {
    box-sizing: border-box;
    max-width: 100% !important;
    min-width: 0 !important;
}
body.woocommerce-cart .woocommerce {
    width: min(1120px, calc(100% - 40px));
    margin-left: auto !important;
    margin-right: auto !important;
}
body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .cart-collaterals,
body.woocommerce-cart .cart_totals,
body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .woocommerce table.shop_table {
    width: 100% !important;
    table-layout: auto;
}
body.woocommerce-cart .woocommerce table.shop_table td,
body.woocommerce-cart .woocommerce table.shop_table th {
    overflow-wrap: anywhere;
}
body.woocommerce-cart .wc-block-cart-items,
body.woocommerce-cart .wc-block-components-sidebar-layout,
body.woocommerce-cart .wc-block-components-sidebar-layout__main,
body.woocommerce-cart .wc-block-components-sidebar {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart .wc-block-components-product-metadata,
body.woocommerce-cart .wc-block-components-product-details {
    overflow-wrap: anywhere;
    word-break: normal;
}

@media (max-width: 1024px) {
    body.woocommerce-cart .woocommerce {
        width: min(100% - 32px, 960px);
    }
    body.woocommerce-cart .wc-block-components-sidebar-layout {
        gap: 28px !important;
    }
}

@media (max-width: 782px) {
    body.woocommerce-cart .woocommerce {
        width: calc(100% - 28px);
    }
    body.woocommerce-cart .wc-block-components-sidebar-layout {
        display: block !important;
    }
    body.woocommerce-cart .wc-block-components-sidebar-layout__main,
    body.woocommerce-cart .wc-block-components-sidebar {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body.woocommerce-cart .wc-block-cart__sidebar {
        margin-top: 24px !important;
    }
    body.woocommerce-cart .cart-collaterals .cart_totals {
        width: 100% !important;
        float: none !important;
    }
}

@media (max-width: 480px) {
    body.woocommerce-cart .woocommerce {
        width: calc(100% - 24px);
    }
    body.woocommerce-cart .woocommerce h1,
    body.woocommerce-cart .woocommerce-page h1 {
        font-size: 34px !important;
        line-height: 1.15 !important;
    }
    body.woocommerce-cart .wc-block-cart-items__row {
        grid-template-columns: minmax(0, 1fr) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body.woocommerce-cart .wc-block-cart-item__image {
        display: none !important;
    }
    body.woocommerce-cart .wc-block-cart-item__product {
        grid-column: 1 !important;
        padding: 0 !important;
    }
    body.woocommerce-cart .wc-block-components-quantity-selector {
        max-width: 132px;
    }
    body.woocommerce-cart .wc-block-cart__submit-button,
    body.woocommerce-cart .checkout-button {
        width: 100% !important;
        min-height: 48px !important;
        box-sizing: border-box !important;
    }
}


/* Cart title spacing. */
body.woocommerce-cart .woocommerce > h1,
body.woocommerce-cart .entry-title,
body.woocommerce-cart main h1.wp-block-post-title {
    margin-top: 44px !important;
    margin-bottom: 24px !important;
}

/* Classic WooCommerce coupon/actions row. */
body.woocommerce-cart .woocommerce table.shop_table td.actions {
    padding: 14px 16px !important;
    vertical-align: middle !important;
}
body.woocommerce-cart .woocommerce table.shop_table td.actions::after {
    content: '';
    display: table;
    clear: both;
}
body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    float: left !important;
    width: auto !important;
    max-width: 100% !important;
}
body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon .input-text,
body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon input[name="coupon_code"] {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 260px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
    border: 1px solid #cfcfcf !important;
    border-radius: 6px !important;
}
body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon button,
body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon .button {
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .woocommerce table.shop_table td.actions > button[name="update_cart"],
body.woocommerce-cart .woocommerce table.shop_table td.actions > .button[name="update_cart"] {
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    box-sizing: border-box !important;
}

@media (max-width: 782px) {
    body.woocommerce-cart .woocommerce > h1,
    body.woocommerce-cart .entry-title,
    body.woocommerce-cart main h1.wp-block-post-title {
        margin-top: 30px !important;
        margin-bottom: 20px !important;
    }
    body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon {
        float: none !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
    }
    body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon .input-text,
    body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon input[name="coupon_code"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    body.woocommerce-cart .woocommerce table.shop_table td.actions > button[name="update_cart"],
    body.woocommerce-cart .woocommerce table.shop_table td.actions > .button[name="update_cart"] {
        float: none !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    body.woocommerce-cart .woocommerce table.shop_table td.actions {
        padding: 12px !important;
    }
    body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon {
        grid-template-columns: 1fr !important;
    }
    body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon button,
    body.woocommerce-cart .woocommerce table.shop_table td.actions .coupon .button {
        width: 100% !important;
    }
}
