:root {
    --green-huttopia: #0A523B;
}

@keyframes blink {
    0%, 80%, 100% {
        opacity: .2;
    }

    40% {
        opacity: 1;
    }
}

huttopia-chatbot {
    display: flex;
    flex-direction: column;
    align-items: center;

    .inputs {
        display: flex;
        column-gap: 10px;
        background-color: white;
        border-radius: 5px;
        padding: 0;
        margin: 10px 0;
    }

    @media (min-width: 993px) {
        input,
        .response .container,
        .response .disclaimer {
            width: 75%;
        }

        .inputs {
            padding: 0;
            width: 100%;
        }

        .cta {
            margin-top: 10px;
        }
    }

    .response {
        justify-content: center;
        position: relative;
        width: 100%;

        .huttobot {
            position: absolute;
            right: 16%;
            top: -5%;

            @media (max-width: 992px) {
                width: 55px;
                right: 6%;
            }
        }

        .disclaimer {
            font-size: 13px;
            line-height: inherit;
            margin: 0 auto 10px;
            display: flex;
        }

        .loader,
        .loading-content {
            display: none;

            &.visible {
                display: flex;
            }
        }

        .container {
            color: var(--green-huttopia);

            @media (max-width: 992px) {
                margin: 30px 0 0;
            }

            @media (min-width: 993px) {
                padding: 30px;
            }

            .loader {
                justify-content: center;
                align-items: center;
                gap: 6px;
                padding: 1em;
                height: 40px;

                .dot {
                    width: 10px;
                    height: 10px;
                    border-radius: 50%;
                    background-color: var(--green-huttopia);
                    animation: blink 1.4s infinite;

                    &:nth-child(2) {
                        animation-delay: .2s;
                    }

                    &:nth-child(3) {
                        animation-delay: .4s;
                    }
                }
            }

            .loading-content {
                justify-content: center;
            }

            .content {
                font-size: 18px;
                overflow-wrap: break-word;

                @media (max-width: 992px) {
                    font-size: 16px;
                    line-height: 1.4;
                }

                a,
                a:hover {
                    text-decoration: underline;
                }
            }

            .huttopia-ia {
                width: 100%;
                border: none;
                font-size: 20px;
                height: 40px;
                margin: 0;

                @media (max-width: 992px) {
                    font-size: 16px;
                }
            }

            .huttopia-ia:-webkit-autofill {
                -webkit-box-shadow: 0 0 0 30px white inset !important;
                -webkit-text-fill-color: #000 !important;
            }
        }

        .container::before {
            @media (min-width: 993px) {
                content: '';
                display: block;
                position: absolute;
                left: 6%;
                background: url('tchat.svg') no-repeat center/contain;
                width: 71px;
                height: 71px;
                top: -35px;
            }
        }
    }
    
    input[type="reset"] {
        display: none;
        width: 20px;
        background: none;
        border: none;
        z-index: 999;
        cursor: pointer;
        font-size: 25px;
    }

    button[type="submit"] {
        background: none;
        border: none;
        z-index: 999;
        cursor: pointer;
        position: relative;    
    }

    button[type="submit"]::before {
        display: block;
        position: absolute;
        content: '';
        background-color: #7ea31a26;
        width: 2px;
        height: 70%;
        left: -5px;
        top: 15%;
    }

    button[type="submit"]::after {
        content: '';
        background: url('fly-icon.svg') center center no-repeat;
        display: block;
        background-size: contain;
        width: 24px;
        height: 24px;
    }
}

huttopia-chatbot.done {
    input[type="reset"] {
        display: block;
    }

    .huttopia-ia {
        padding-right: 25px;
    }
}