@import './components/loader.scss';
@import './components/powered-by.scss';
@import './components/social-icons.scss';
@import './components/opening-hours.scss';
@import './components/pincode.scss';
@import './components/splash-screen.scss';
@import './components/lead-form.scss';

@keyframes qrcode-type-slide-down {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes qrcode-type-slide-up {
    from {
        margin-top: 0;
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        margin-top: -2rem;
        opacity: 1;
        transform: scale(1);
    }
}

@mixin white-card($icons-color) {
    .white-card {
        background-color: white;
        padding: 1rem;
        border-radius: 1rem;
        box-shadow: $box-shadow;
        margin: 1rem 0;

        header {
            display: flex;
            align-items: center;
            margin-bottom: 1rem;

            font-weight: bold;
            text-transform: uppercase;
            color: var(--blue-gray-1);

            svg {
                width: 2rem;
                margin-right: 1.5rem;

                * {
                    fill: $icons-color;
                }
            }
        }

        .body {
            line-height: 1.7;

            p {
                margin: 0;
            }

            a {
                color: var(--blue-text-color);
                text-decoration: none;
            }

            .row {
                display: flex;
                justify-content: space-between;
            }

            .vertical-item {
                position: relative;

                &:not(:last-child) {
                    padding-bottom: 1rem;
                    margin-bottom: 1rem;

                    &:after {
                        display: block;
                        content: '';
                        position: absolute;
                        left: -1rem;
                        right: -1rem;
                        height: 2px;
                        background-color: #e6ebff;
                        bottom: 0;
                    }
                }
                .key {
                    color: var(--blue-gray-1);
                    font-weight: bold;
                    text-transform: uppercase;
                    font-size: 0.9rem;
                }
                .value {
                    font-weight: bold;
                }
            }
        }
    }
}

@mixin base-qrcode-type($icons-color) {
    @include qrcode-type-loader;

    user-select: none;

    .bg-image {
        pointer-events: none;
        animation: qrcode-type-slide-down ease 0.5s both;
        position: fixed;
        top: 0;
        display: none;

        &-placeholder {
            pointer-events: none;
            opacity: 0;
        }
    }

    .bg-image-placeholder {
        opacity: 0;
        pointer-events: none;
    }

    .details-container {
        border-radius: 1rem;
        margin-top: -2rem;
        position: relative;
        z-index: 1;
        padding: 1rem;
        box-shadow: $box-shadow;
        animation: qrcode-type-slide-up 0.3s ease both;
        margin-bottom: 2rem;
    }

    .sep {
        margin: 1rem 0;
        padding: 1rem;
        position: relative;

        &::before {
            display: block;
            content: '';
            position: absolute;
            transform: translate(50%, -50%);
            right: 50%;
            top: 50%;
            background-color: rgb(255 255 255 / 30%);
            height: 2px;
            width: 70%;
        }
    }

    .social-icons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;

        svg {
            width: 2rem;
            height: 2rem;
            * {
                fill: orange;
            }
        }

        a {
            display: flex;
            background-color: white;
            margin: 0.5rem 0;
            padding: 0.5rem;
            border-radius: 50%;
            box-shadow: $box-shadow;

            &:not(:last-child) {
                margin-right: 1rem;
            }
        }
    }

    @include white-card($icons-color);
}
