/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* START Make the cart table responsive */
/* http://css-tricks.com/responsive-data-tables/ */
@media screen and (max-width: 600px) {

    /* Force table to not be like tables anymore */
    .woocommerce-cart table.shop_table,
    .woocommerce-cart table.shop_table thead,
    .woocommerce-cart table.shop_table tbody,
    .woocommerce-cart table.shop_table th,
    .woocommerce-cart table.shop_table td,
    .woocommerce-cart table.shop_table tr {
        display: block;
    }
    
    /* Hide table headers (but not display: none;, for accessibility) */
    .woocommerce-cart table.shop_table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .woocommerce-cart table.shop_table tr {
        /*border: 1px solid #d2d3d3; */
    }
    
    .woocommerce-cart table.shop_table td {
        /* Behave like a "row" */
        border: 1px solid #d2d3d3;
        position: relative;
        padding-left: 30% !important;
    }
    
    .woocommerce-cart table.shop_table {
        border: none;
    }
    
    .woocommerce-cart table.shop_table td.product-spacer {
        border-color: #FFF;
        height: 10px;
    }
    
    .woocommerce-cart table.shop_table td:before {
        /* Now like a table header */
        position: absolute;
        /* Top/left values mimic padding */
        top: 6px;
        left: 6px;
        width: 25%;
        padding-right: 10px;
        white-space: nowrap;
    }
    
    /*
    Label the data
    */
    .woocommerce-cart table.shop_table td.product-remove:before {
        content: "DELETE";
    }
    
    .woocommerce-cart table.shop_table td.product-thumbnail:before {
        content: "IMAGE";
    }
    
    .woocommerce-cart table.shop_table td.product-name:before {
        content: "PRODUCT";
    }
    
    .woocommerce-cart table.shop_table td.product-price:before {
        content: "PRICE";
    }
    
    .woocommerce-cart table.shop_table td.product-quantity:before {
        content: "QUANTITY";
    }
    
    .woocommerce-cart table.shop_table td.product-subtotal:before {
        content: "SUBTOTAL";
    }
    
    .woocommerce-cart table.shop_table td.product-total:before {
        content: "TOTAL";
    }
    
    .woocommerce .quantity,
    .woocommerce #content .quantity,
    .woocommerce-cart .quantity,
    .woocommerce-cart #content .quantity {
        margin: 0;
    }
    
    .woocommerce-cart table.cart td.actions,
    .woocommerce-cart #content table.cart td.actions {
        text-align: left;
        border:0;
        padding-left: 6px !important;
    }
    
    .woocommerce-cart table.cart td.actions .button.alt,
    .woocommerce-cart #content table.cart td.actions .button.alt {
        float: left;
        margin-top: 10px;
    }
    
    .woocommerce-cart table.cart td.actions div,
    .woocommerce-cart #content table.cart td.actions div,
    .woocommerce-cart table.cart td.actions input,
    .woocommerce-cart #content table.cart td.actions input {
        margin-bottom: 10px;
    }
    
    .woocommerce-cart .cart-collaterals .cart_totals {
        float: left;
        width: 100%;
        text-align: left;
    }
    
    .woocommerce-cart .cart-collaterals .cart_totals th,
    .woocommerce-cart .cart-collaterals .cart_totals td {
        border:0 !important;
    }
    
    .woocommerce-cart .cart-collaterals .cart_totals table tr.cart-subtotal td,
    .woocommerce-cart .cart-collaterals .cart_totals table tr.shipping td,
    .woocommerce-cart .cart-collaterals .cart_totals table tr.total td {
        padding-left: 6px !important;
    }
    
    .woocommerce-cart table.shop_table tr.cart-subtotal td,
    .woocommerce-cart table.shop_table tr.shipping td,
    .woocommerce-cart table.shop_table tr.total td,
    .woocommerce-cart table.shop_table.order_details tfoot th,
    .woocommerce-cart table.shop_table.order_details tfoot td {
        padding-left: 6px !important;
        border:0 !important;
    }
    
    .woocommerce-cart table.shop_table tbody {
        padding-top: 10px;
    }
    
    .woocommerce .col2-set .col-1,
    .woocommerce-cart .col2-set .col-1,
    .woocommerce .col2-set .col-2,
    .woocommerce-cart .col2-set .col-2,
    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last,
    .woocommerce-cart form .form-row-first,
    .woocommerce-cart form .form-row-last {
        float: none;
        width: 100%;
    }
    
    .woocommerce .order_details ul,
    .woocommerce-cart .order_details ul,
    .woocommerce .order_details,
    .woocommerce-cart .order_details {
        padding:0;
    }
    
    .woocommerce .order_details li,
    .woocommerce-cart .order_details li {
        clear: left;
        margin-bottom: 10px;
        border:0;
    }
    
    /* make buttons full width, text wide anyway, improves effectiveness */
    #content table.cart td.actions .button,
    .woocommerce #content table.cart td.actions .input-text,
    .woocommerce #content table.cart td.actions input,
    .woocommerce table.cart td.actions .button,
    .woocommerce table.cart td.actions .input-text,
    .woocommerce table.cart td.actions input,
    .woocommerce-cart #content table.cart td.actions .button,
    .woocommerce-cart #content table.cart td.actions .input-text,
    .woocommerce-cart #content table.cart td.actions input,
    .woocommerce-cart table.cart td.actions .button,
    .woocommerce-cart table.cart td.actions .input-text,
    .woocommerce-cart table.cart td.actions input {
        width: 100%;
    }
    
    /* keep coupon at 50% */
    #content table.cart td.actions .coupon .button,
    .woocommerce #content table.cart td.actions .coupon .input-text,
    .woocommerce #content table.cart td.actions .coupon input,
    .woocommerce table.cart td.actions .coupon .button,
    .woocommerce table.cart td.actions .coupon .input-text,
    .woocommerce table.cart td.actions .coupon input,
    .woocommerce-cart #content table.cart td.actions .coupon .button,
    .woocommerce-cart #content table.cart td.actions .coupon .input-text,
    .woocommerce-cart #content table.cart td.actions .coupon input,
    .woocommerce-cart table.cart td.actions .coupon .button,
    .woocommerce-cart table.cart td.actions .coupon .input-text,
    .woocommerce-cart table.cart td.actions .coupon input {
        width: 48%;
    }
    
    /* clean up how coupon inputs display */
    #content table.cart td.actions .coupon,
    .woocommerce table.cart td.actions .coupon,
    .woocommerce-cart #content table.cart td.actions .coupon,
    .woocommerce-cart table.cart td.actions .coupon {
        margin-top: 1.5em;
    }
    
    #content table.cart td.actions .coupon .input-text,
    .woocommerce table.cart td.actions .coupon .input-text,
    .woocommerce-cart #content table.cart td.actions .coupon .input-text,
    .woocommerce-cart table.cart td.actions .coupon .input-text {
        margin-bottom: 1em;
    }
    
    /* remove cross sells, they interfere with flow between cart and cart totals + shipping calculator */
    .woocommerce .cart-collaterals .cross-sells,
    .woocommerce-cart .cart-collaterals .cross-sells {
        display: none;
    }
    
    }
    
    /* END Make the cart table responsive */