/*
 * shopping-cart style for oleificio-gallura template.
 */

section#shopping-cart {
    padding-bottom: 4em;
    text-align: center;
}

p.titleOnTab {
    display: none;
}

section#shopping-cart table {
    width: 100%;
    margin-bottom: 4em;
}

section#shopping-cart table td {
    background-color: var(--lightGrey);
    border: 1px solid #D6D5D5;
    vertical-align: middle;
    padding: .2em 0;
}

section#shopping-cart table td#firstCol {
    width: 4%;
}

section#shopping-cart table td#secondCol {
    width: 20%;
}

section#shopping-cart table tr th {
    padding: 1em 0;
    overflow: hidden;
}

section#shopping-cart table tr td input[type="text"] {
    width: 30%;
    text-align: center;
}

section#shopping-cart table tr td span.cross {
    color: var(--white);
    border-radius: 50%;
    font-size: .7em;
    background-color: #E3301C;
}

section#shopping-cart table tr td img {
    width: 30%;
}

section#shopping-cart div#subTotalCont {
    width: 100%;
    overflow: hidden;
}

section#shopping-cart table#subTotalTable {
    width: 30%;
    float: right;
}

section#shopping-cart table#subTotalTable button#checkout-button {
    padding: .8em;
    background-color: var(--green);
    color: var(--white);
    border: 1px solid var(--green);
    border-radius: 5px;
    cursor: pointer;
}

section#shopping-cart form#backToStep1 fieldset input#back,
section#checkout-step-1 form#checkoutStep1 input#continue {
    background-color: var(--green);
    color: var(--white);
    border: 1px solid var(--green);
    border-radius: 5px;
    cursor: pointer;
}

section#shopping-cart table#subTotalTable button#checkout-button:hover,
section#shopping-cart form#backToStep1 fieldset input#back:hover,
section#checkout-step-1 form#checkoutStep1 input#continue:hover {
    background-color: var(--white);
    color: var(--green);
    border: 1px solid var(--green);
}

a#checkout.button:hover {
    background-color: var(--white);
    color: var(--green);
    border: 1px solid var(--green);
}

/* Mobile version */
@media screen and (max-width: 576px) {
    /* Force table to not be like tables anymore */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    p.titleOnTab {
        display: inherit;
    }

    /* Hide table headers (but not display: none;, for accessibility) */
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    table#cart th {
        display: none;
    }

    table#cart tr {
        margin-top: 1em;
    }

    table td {
        /* Behave  like a "row" */
        border: none;
        position: relative;
    }

    table#cart td, table#cart td.product {
        line-height: 2em;
    }

    td:before {
        /* Now like a table header */
        position: absolute;
        /* Top/left values mimic padding */
        top: 6px;
        left: 6px;
        padding-right: 10px;
        white-space: nowrap;
    }

    section#shopping-cart table td#firstCol, section#shopping-cart table td#secondCol {
        width: initial;
    }

    section#shopping-cart table#subTotalTable {
        width: 100%;
    }
}