﻿.checkout__bg {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

    .checkout__bg div {
        height: 100%;
    }

    .checkout__bg > div > div > div {
        position: relative;
    }

        .checkout__bg > div > div > div:before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: #f2f4f5;
        }

.checkout {
    min-height: calc(100vh - 20rem);
}

    .checkout .checkout__summarytitle {
        display: flex;
    }

        .checkout .checkout__summarytitle a {
            margin-left: auto;
        }

    .checkout .checkout__header {
        display: flex;
        align-content: center;
        align-items: center;
        margin: 3rem 0 6rem;
        padding-left: 7.5rem;
        position: relative;
    }

        .checkout .checkout__header .title__back {
            width: 4.5rem;
            height: 4.5rem;
            background-color: var(--blue-light);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='11' viewBox='0 0 8 14'%3E%3Cpolyline points='7 13 1 7 7 1' fill='none' stroke='%23121212' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
            background-size: .7rem auto;
            margin-bottom: 0;
            top: -.75rem;
            left: 0;
        }

    .checkout .checkout__steps {
        margin-bottom: 5rem;
    }

        .checkout .checkout__steps ol {
            display: flex;
            margin: 0;
            padding: 0;
            list-style: none;
            justify-content: space-between;
        }

        .checkout .checkout__steps span {
            font-weight: 600;
            color: var(--blue);
        }

    .checkout .checkout__address {
        display: flex;
    }

        .checkout .checkout__address > div {
            width: 50%;
            padding-right: 1.5rem;
        }

        .checkout .checkout__address .form-group + .form-group {
            margin-top: 0;
        }

        .checkout .checkout__address .notification {
            display: block;
        }

        .checkout .checkout__address textarea {
            min-height: 8rem;
            height: 8rem;
        }

    .checkout .checkout__delivery {
        display: none;
        padding-top: 1.5rem;
    }

    .checkout .paymentmethods {
        display: flex;
        flex-flow: column;
        margin-top: 3rem;
    }

    .checkout .paymentmethod {
        background-color: #f5f9fa;
        border: .1rem solid #e6e6e6;
        margin-bottom: 1rem;
        display: flex;
        align-content: center;
        align-items: center;
        height: 7rem;
        cursor: pointer;
        position: relative;
    }

        .checkout .paymentmethod .paymentmethod__image {
            width: 7rem;
            display: flex;
            justify-content: center;
            align-content: center;
            align-items: center;
        }

            .checkout .paymentmethod .paymentmethod__image img {
                width: 4rem;
                height: auto;
            }

        .checkout .paymentmethod .button {
            margin-left: auto;
            margin-right: 3rem;
            width: 4rem;
            height: 4rem;
            min-height: unset;
            padding-left: .4rem;
            padding-right: 0;
            background-color: #fff;
        }

        .checkout .paymentmethod.active {
            /* Make darker */
            /*filter: brightness(85%);*/
        }

            .checkout .paymentmethod.active .button {
                background-color: var(--green);
            }

        .checkout .paymentmethod .button:before {
            content: "";
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
        }

    .checkout .paymentmethods:has(>.paymentmethod.active) .paymentmethod:not(.active) {
        background-color: #fff;
    }

    .checkout .paymentmethod .button span:after {
        top: -.4rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='13' viewBox='0 0 18 13'%3E%3Cpolyline points='17 1 6 12 1 7' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3'%3E%3C/polyline%3E%3C/svg%3E");
        background-size: 1.8rem 1.3rem;
        background-repeat: no-repeat;
        width: 1.8rem;
        height: 1.3rem;
        right: -2.5rem;
    }

    .checkout .checkout__terms {
        margin: 2rem 0;
    }

        .checkout .checkout__terms li label p:last-child {
            margin-bottom: 0;
        }

    .checkout .checkout__content > p {
        margin-bottom: 3rem;
    }

    .checkout .checkout__cart {
        display: flex;
        flex-flow: column;
        border-bottom: .1rem solid var(--grey-light);
        margin-bottom: 1rem;
    }

        .checkout .checkout__cart .productoverview__item {
            display: flex;
            flex-flow: row;
            margin-bottom: 2rem;
        }

            .checkout .checkout__cart .productoverview__item .cart__amount {
                padding: 1.5rem 1.5rem 0 0;
                font-weight: 600;
            }

            .checkout .checkout__cart .productoverview__item .productoverview__image {
                height: 6rem;
                margin-right: 1.5rem;
                min-height: unset;
            }

                .checkout .checkout__cart .productoverview__item .productoverview__image img {
                    height: 100%;
                    width: auto;
                }

            .checkout .checkout__cart .productoverview__item .productoverview__title {
                padding-top: .5rem;
                margin-bottom: 0;
            }

                .checkout .checkout__cart .productoverview__item .productoverview__title .subtitle {
                    font-size: 1.2rem;
                    margin-bottom: .1rem;
                }

                .checkout .checkout__cart .productoverview__item .productoverview__title h3 {
                    font-size: 1.6rem;
                    line-height: 2rem;
                    margin-bottom: .3rem;
                    margin-top: 0;
                }

            .checkout .checkout__cart .productoverview__item .productoverview__specs {
                padding-bottom: 0;
            }

                .checkout .checkout__cart .productoverview__item .productoverview__specs > div {
                    margin-bottom: 0;
                    flex-flow: column;
                }

            .checkout .checkout__cart .productoverview__item .product__sku {
                background-color: transparent;
                padding: 0;
                height: unset;
            }

            .checkout .checkout__cart .productoverview__item .product__promotion-text {
                background-color: transparent;
                padding: 0;
                height: unset;
                font-size: 1rem;
                min-height: 2.4rem;
                line-height: 1;
                color: var(--green);
            }

            .checkout .checkout__cart .productoverview__item .cart__price {
                margin-left: auto;
                margin-top: 1.5rem;
                min-width: 7rem;
                text-align: right;
            }

    .checkout .checkout__discount {
        border-bottom: .1rem solid var(--grey-light);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

        .checkout .checkout__discount > button {
            width: 100%;
            border: none;
            background-color: transparent;
            padding: 1rem 0;
            text-align: left;
            position: relative;
            transition: var(--transition-default);
            outline: none !important;
        }

            .checkout .checkout__discount > button:hover {
                color: var(--blue);
            }

            .checkout .checkout__discount > button:after {
                border: none;
                content: "";
                background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpolyline points='1 1 7 7 13 1' fill='none' stroke='%231289a7' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: 100% 50%;
                width: 1.5rem;
                height: 3rem;
                position: absolute;
                top: 1rem;
                right: 0;
                transition: var(--transition-default);
            }

            .checkout .checkout__discount > button:hover:after {
                top: 1.3rem;
            }

            .checkout .checkout__discount > button[aria-expanded="true"]:after {
                transform: rotate(180deg);
            }

            .checkout .checkout__discount > button[aria-expanded="true"]:hover:after {
                top: .7rem;
            }

        .checkout .checkout__discount .input-group {
            margin: 1rem 0 2rem;
        }

            .checkout .checkout__discount .input-group input {
                min-height: 5rem;
                padding: 1.4rem 1rem 1.6rem 3rem;
                border-radius: 2.5rem 0 0 2.5rem;
                border: .1rem solid var(--grey-light);
                border-right: none;
            }

                .checkout .checkout__discount .input-group input:focus {
                    border-color: var(--black);
                }

            .checkout .checkout__discount .input-group .button {
                border: none;
                border-top-left-radius: 0;
                border-bottom-left-radius: 0;
                padding-left: 3rem;
                padding-right: 5rem;
                margin-top: 0;
                transition: var(--transition-default);
            }

.checkout__discount-applied td {
    color: darkgreen;
}

.checkout table {
    width: 100%;
    margin-bottom: 1rem;
}

    .checkout table td {
        padding: .75rem 0;
    }

        .checkout table td:nth-child(2) {
            width: 1rem;
        }

        .checkout table td:last-of-type {
            width: 4rem;
            text-align: right;
        }

    .checkout table hr {
        border-top: .1rem solid var(--grey-light);
        border-bottom: none;
        margin: .5rem 0;
    }

    .checkout table tr.checkout__total-amount td {
        font-size: 1.7rem;
        font-weight: 600;
    }

        .checkout table tr.checkout__total-amount td:last-of-type {
            font-size: 1.8rem;
        }

    .checkout table .table--red {
        color: var(--red);
    }

.checkout .cart__label-free {
    color: var(--green);
    font-weight: 600;
    white-space: nowrap;
}

.checkout .checkout__confirmation > h3 {
    position: relative;
    padding-left: 4rem;
}

    .checkout .checkout__confirmation > h3:before {
        content: "";
        width: 2.7rem;
        height: 2.7rem;
        border-radius: 50%;
        background-color: var(--green);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='13' viewBox='0 0 18 13'%3E%3Cpolyline points='17 1 6 12 1 7' fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3'/%3E%3C/svg%3E");
        background-size: 1.4rem auto;
        background-position: 50% calc(50% + .1rem);
        background-repeat: no-repeat;
        position: absolute;
        top: 0;
        left: 0;
        animation: confirm .5s ease-in-out forwards;
        animation-delay: 1s;
    }

.checkout .checkout__confirmation h4 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

@keyframes confirm {
    0% {
        transform: scale(1);
    }

    70% {
        transform: scale(1.5);
    }

    90% {
        transform: scale(.8);
    }

    100% {
        transform: scale(1);
    }
}

@media(max-width: 991px) {
    .checkout__bg {
        display: none;
    }

    .checkout .checkout__header {
        margin-bottom: 3rem;
    }

        .checkout .checkout__header .title__back {
            position: absolute;
        }

    .checkout .checkout__steps {
        margin-bottom: 3rem;
    }

    .checkout .checkout__address {
        flex-flow: column;
    }

        .checkout .checkout__address > div {
            width: 100%;
            padding-right: 0;
        }

            .checkout .checkout__address > div:first-of-type {
                margin-bottom: 1.5rem;
            }

    .checkout__content {
        background-color: var(--blue-light);
        width: calc(100% + 3rem);
        transform: translateX(-1.5rem);
        padding: 0 1.5rem;
    }

    .checkout__summarytitle {
        height: 7rem;
        display: flex;
        flex-wrap: wrap;
        overflow: hidden;
    }

        .checkout__summarytitle span {
            height: 7rem;
            display: flex;
            align-items: center;
            font-weight: 600;
        }

            .checkout__summarytitle span:first-of-type {
                padding-left: 4rem;
                width: 70%;
                position: relative;
            }

                .checkout__summarytitle span:first-of-type:before {
                    content: "";
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='23' viewBox='0 0 24 23'%3E%3Cpath d='M9,20a1,1,0,1,1-1,1A1,1,0,0,1,9,20Zm11,0a1,1,0,1,1-1,1A1,1,0,0,1,20,20ZM1,1H5L7.68,14.39a2,2,0,0,0,2,1.61H19.4a2,2,0,0,0,2-1.61L23,6H6' fill='none' stroke='%23121212' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
                    width: 2.4rem;
                    height: 2.3rem;
                    position: absolute;
                    top: calc(50% - 1.2rem);
                    left: 0;
                }

                .checkout__summarytitle span:first-of-type:after {
                    content: "";
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpolyline points='1 1 7 7 13 1' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
                    width: 1.4rem;
                    height: .8rem;
                    position: relative;
                    margin-left: 1rem;
                    transition: var(--transition-default);
                }

            .checkout__summarytitle span:last-of-type {
                justify-content: flex-end;
                width: 30%;
            }

        .checkout__summarytitle.open span:first-of-type:after {
            transform: rotate(180deg);
        }

        .checkout__summarytitle a {
            width: 100%;
        }

    .checkout__contents {
        display: none;
        padding-bottom: .5rem;
        margin-bottom: 3rem;
    }
}

/* Loading state for submit button */
#jsPaymentSubmit.loading {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    position: relative;
}

#jsPaymentSubmit.loading span:after {
    display: none;
}

#jsPaymentSubmit.loading:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 2px solid transparent;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Loading state for coupon code button */
#jsDiscount.loading {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    position: relative;
}

#jsDiscount.loading span:after {
    display: none;
}

#jsDiscount.loading:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin: -0.75rem 0 0 -0.75rem;
    border: 2px solid transparent;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Coupon message styling */
.checkout__coupon-message {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.4rem;
    color: #721c24;
    font-size: 1.4rem;
    line-height: 1.4;
}

.checkout__coupon-message--success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.checkout__coupon-message--show {
    display: block !important;
}
