/**
 * Cart
 *
 * We are using the 'vo-' prefix to avoid potential conflicts with WooCommerce
 * classes. Better safe than sorry!
 * ----------------------------------------------------------------------------
 */
.woocommerce-cart {
    .footer {
        display: none;
    }
}

// Variables.
$cart-width: 780px;
$cart-padding: $spacing--large 0;
$cart-item-padding: $spacing $spacing--xxlarge;

.vo-cart {
    position: fixed;
    overflow-y: scroll;
    top: 0;
    left: 0;
    right: 0;
    color: $color-gray-45;
    bottom: 0;
    background: linear-gradient(to bottom, #f9f9f9 0%, #f9f9f9 50%, $color-gray-5 50%, $color-gray-5 100%);

    // Hide WooCommerce messages in cart.
    .woocommerce-message {
        display: none;
    }
}

.vo-cart__inner {
    position: relative;
    width: 100%;
    font-size: rem-calc(16);
    background-color: $color-white;
    max-width: $cart-width;
    margin: $spacing--xxlarge auto;
    box-shadow: $shadow;
    padding: $cart-padding;
}

/**
 * Cart Item.
 */

.vo-cart__item {
    padding: $cart-item-padding;
    border-bottom: 1px solid $color-gray-35;
}

.vo-cart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: $spacing--small;
}

.vo-cart__title {
    font-size: rem-calc(16);
    font-weight: 500;
}

.vo-cart__remove {
    a {
        color: $color-gray-45;
    }
}

.vo-cart__content {
    display: flex;
    align-items: center;
}

.vo-cart__thumbnail {
    max-width: 140px;
}

.vo-cart .quantity {
    margin: 0 $spacing 0 0;
}

.vo-cart .quantity__label {
    display: none;
}

.vo-cart__attributes {
    margin-right: $spacing;
}

.vo-cart__price {
    margin-left: auto;
    color: $color-gray-45;
}

.vo-cart__coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: $cart-item-padding;
    border-bottom: 1px solid $color-gray-35;
}

.vo-cart__coupon-input {
    margin: 0;
    border: 0;
    border-bottom: 1px solid transparent;
    padding: 0;

    &:focus {
        border: 0;
        border-bottom: 1px solid $color-black;
    }
}

.vo-cart__coupon-button {
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 51 51"><g fill="none" fill-rule="evenodd" stroke="#000" stroke-width="2" transform="translate(1 1)"><circle cx="24.5" cy="24.5" r="24.5" opacity=".8"/><path stroke-linecap="square" d="M37.5 25.544H12.32M25 13.044v25.18"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height: 20px;
}

/**
 * Subtotal
 */

.vo-cart__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: $cart-item-padding;
    border-bottom: 1px solid $color-gray-35;
}

.vo-cart__amount {
    font-size: rem-calc(26);
    color: $color-black;
}

/**
 * Actions
 */

.vo-cart__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: $cart-item-padding;

    .button {
        margin-bottom: 0;
        width: calc(50% - #{$spacing--xsmall});
    }
}

/**
 * Hide the update button. It is toggled using JavaScript.
 */

.vo-cart__update {
    position: absolute;
    left: -9999px;
}
