.mgAddToCart {
    position: relative;
    border-radius: 3px;
    background-color: #FFF;
    display: inline-block;
    white-space: nowrap;
}

.mgAddToCart.green {
    border: 1px solid #699b22;
    background-color: #8cc739;
}

.mgAddToCart.grey {
    border: 1px solid #AAA;
    background-color: #BBB;
    cursor: default;
}

.mgAddToCart input {
    outline: none; /* Remove input glow */
    width: 30px;
    border: none;
    display: inline-block;
    vertical-align: top;
    padding: 0;
    margin: 0;
    line-height: 28px;
    height: 28px;
    text-align: center;
    font-size: 14px;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}

.mgAddToCart a {
    display: inline-block;
    background-image: url(../svg/addtocart.svg);
    background-repeat: no-repeat;
    vertical-align: top;
}

.mgAddToCart a:hover { color: #FFF; }

.mgAddToCart.green a { cursor: pointer; }

.mgAddToCart .loading {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    text-align: center;
    /*margin: 1px;*/
    background-color: #8cc739;
}

.mgAddToCart .loading svg.checkmark path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 10s linear forwards;
}


/* ** add to offer ** */
.basket .addtooffer {
    margin-top: 5px;
    border: 1px solid #ffc470;
    position: relative;
    border-radius: 2px;
    background-color: #FFF;
    display: inline-block;
    padding: 1px;
    white-space: nowrap;
}

.basket .addtooffer input {
    width: 30px;
    border: none;
    display: inline-block;
    vertical-align: top;
    padding: 0;
    margin: 0;
    line-height: 28px;
    height: 28px;
    text-align: center;
    font-size: 14px;
}

.basket .addtooffer a {
    background-color: #ffd870;
    cursor: pointer;
    display: inline-block;
    padding: 0 15px 0 30px;
    background-image: url(../svg/offer.svg);
    background-repeat: no-repeat;
    background-position: 5px center;
    background-size: 26px 26px;
    color: #FFF;
    line-height: 28px;
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* mobile */
@media all and (max-width: 640px) {
    .mgAddToCart input {
        width: 40px;
        line-height: 35px;
        height: 35px;
    }

    .mgAddToCart a {
        display: inline-block;
        padding: 0px 10px;
        background-size: 32px 32px;
        width: 32px;
        height: 35px;
        background-position: center;
    }

    .mgAddToCart a i { display: none; }
}


/* desktop & tablet */
@media all and (min-width: 641px) {
    .mgAddToCart a {
        padding: 0 15px 0 30px;
        background-repeat: no-repeat;
        background-position: 5px center;
        background-size: 26px 26px;
        color: #FFF;
        line-height: 28px;
    }

    .mgAddToCart a i { font-style: normal; }
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5) {
    .mgAddToCart input {
        width: 40px;
        line-height: 35px;
        height: 35px;
    }

    .mgAddToCart a {
        line-height: 35px;
        padding: 0 15px 0 40px;
        font-weight: bold;
        font-size: 15px;
        background-size: 32px 32px;
    }
}
