@import '../../index.scss';

@keyframes txtBlink {
    0% {
        border-right: 4px solid;
    }

    50% {
        border-right: none;
    }

    100% {
        border-right: 4px solid;
    }
}

.light {
    .New {
        .card-bg {
            background: rgba(247, 247, 248, 1);
            border-radius: .375rem;
            padding: .75rem;

            p {
                font-size: 14px;
            }

            &:is(.hover):hover {
                background: rgba(236, 236, 241, 1);
                cursor: pointer;
            }
        }
    }

    .Chat {
        .qs {
            background: white;

            .txt {
                color: #343541;
            }
        }

        .res {
            border-top: 1px solid #d9d9e3;
            border-bottom: 1px solid #d9d9e3;
            background: rgba(247, 247, 248, 1);

            .txt {
                .error {
                    color: #374151;
                }

                span {
                    color: #374151;

                    &span::after {
                        border-color: #374151;
                    }
                }
            }
        }
    }
}

.dark {
    .New {
        .card-bg {
            background: hsla(0, 0%, 100%, .05);
            border-radius: .375rem;
            padding: .75rem;

            p {
                font-size: 14px;
            }

            &:is(.hover):hover {
                background: rgba(32, 33, 35, 1);
                cursor: pointer;
            }
        }
    }

    .Chat {
        .qs {
            background: rgba(52, 53, 65, 1);

            .txt {
                color: #ECECF1;
            }
        }

        .res {
            background: #444654;
            border-top: 1px solid rgba(32, 33, 35, .5);
            border-bottom: 1px solid rgba(32, 33, 35, .5);

            .txt {
                .error {
                    color: #D1D5DB;
                }

                span {
                    color: #D1D5DB;

                    &::after {
                        border-color: #D1D5DB;
                    }
                }
            }
        }
    }
}

.New {
    display: block;
    padding-left: 12em;
    padding-right: 12em;
    padding-top: 7em;
    padding-bottom: 12rem;

    @media only screen and (max-width: 1300px) {
        padding-left: 5em;
        padding-right: 5em;
    }

    @media only screen and (max-width: 1000px) {
        padding-left: 1.5em;
        padding-right: 1.5em;
    }

    .title {
        font-size: 2.25rem;
        font-weight: 600;
        margin-bottom: 2em;
    }

    .flex {
        display: flex;
        flex-direction: row;
        gap: .875rem;

        @media screen and (max-width:767px) {
            flex-direction: column;
        }

        svg {
            width: 24px;
            height: 24px;
        }

        .inner {
            flex-basis: 100%;
            display: flex;
            flex-direction: column;

            @media screen and (max-width:767px) {
                flex-basis: 100%;
            }

            .card {
                margin-bottom: 1em;

                h4 {
                    font-weight: 400;
                    font-size: 1.125rem;
                    line-height: 1.75rem;
                }
            }
        }

    }
}

.Chat {
    display: block;
    text-align: left;
    padding-bottom: 12rem;

    .qs {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        padding-left: 10em;
        padding-right: 12em;
        display: grid;
        grid-template-columns: calc(30px + 1.5rem) auto;

        @media only screen and (max-width: 1300px) {
            padding-left: 5em;
            padding-right: 5em;
        }

        @media only screen and (max-width: 1000px) {
            padding-left: 1em;
            padding-right: 1em;
        }

        @media only screen and (max-width: 767px) {
            padding-top: 4rem;
            grid-template-columns: calc(30px + 1rem) auto;
        }

        .acc {
            display: flex;
            width: 30px;
            height: 30px;
            border: none;
            background: green;
            color: white;
            justify-content: center;
            align-items: center;
            border-radius: 2px;
            font-weight: 500;
            margin-right: 1.5rem;

            @media only screen and (max-width: 767px) {
                margin-right: 1rem;
            }
        }

        .txt {
            line-height: 1.5rem;
            font-size: 1rem;
        }
    }

    .res {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        padding-left: 10em;
        padding-right: 12em;
        display: grid;
        grid-template-columns: calc(30px + 1.5rem) auto;

        @media only screen and (max-width: 1300px) {
            padding-left: 5em;
            padding-right: 5em;
        }

        @media only screen and (max-width: 1000px) {
            padding-left: 1em;
            padding-right: 1em;
        }

        @media only screen and (max-width: 767px) {
            grid-template-columns: calc(30px + 1rem) auto;
        }

        .icon {
            position: relative;
            display: flex;
            width: 30px;
            height: 30px;
            border: none;
            background: rgb(16, 163, 127);
            justify-content: center;
            align-items: center;
            border-radius: 2px;
            font-weight: 500;
            margin-right: 1.5rem;

            @media only screen and (max-width: 767px) {
                margin-right: 1rem;
            }

            svg {
                width: 1.5rem;
                height: 1.5rem;
                color: white;
            }

            span {
                position: absolute;
                background: rgba(239, 68, 68, 1);
                border-radius: 50%;
                font-size: 10px;
                width: 1rem;
                height: 1rem;
                display: flex;
                align-items: center;
                justify-content: center;
                right: -4px;
                bottom: -4px;
                color: rgba(255,255,255,1);
                border: 1px solid rgba(255,255,255,1);
            }
        }

        .txt {
            display: block;

            .error {
                background: rgba(239, 68, 68, .1);
                border: 1px solid rgba(239, 68, 68, 1);
                border-radius: .375rem;
                padding: 0.75rem;
                font-size: .875rem;
                line-height: 1.25rem;
            }

            span {
                line-height: 1.5rem;
                font-size: 1rem;
                white-space: pre-wrap;

                &:is(.blink) {
                    &::after {
                        content: '';
                        padding-left: 3px;
                        border-right: 4px solid;
                        animation: txtBlink 1s ease-in-out infinite;
                    }
                }
            }
        }
    }
}