﻿
html {
    --todiai-primary-color: purple;
}

body:has(.bd-modal.active) {
    overflow: hidden;
}

.bd-modal {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: rgba(0, 0, 0, .75);
    z-index: 9999;
    transition: all .3s ease;
}

    .bd-modal.active {
        opacity: 1;
        pointer-events: all;
    }

    .bd-modal .bd-modal-container {
        opacity: 0;
        transform: translateX(100%);
        height: 100%;
        margin-left: auto;
        width: 100%;
        max-width: 700px;
        background-color: var(--white-bg);
        transition: all .5s ease;
    }

    .bd-modal.active .bd-modal-container {
        transform: translateX(0);
        opacity: 1;
    }



.todiai-chat-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.todiai-chat-content {
    height: 100%;
    max-height: calc(100% - (55px + 15px));
    display: flex;
    flex-direction: column;
}

.todiai-chat-entry {
    gap: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

    .todiai-chat-entry h2 {
        font-size: 2.4rem;
    }

.todiai-populars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 550px;
}

.todiai-example-box {
    font-weight: 300;
    padding: 15px 20px;
    background-color: rgba(var(--black-o), .05);
    border-radius: calc(var(--card-radius)* 2);
    border: none;
    outline: none;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 7px 15px -5px rgba(var(--black-o), .2);
}

    .todiai-example-box:hover {
        box-shadow: 0 13px 15px -8px rgba(var(--black-o), .25);
    }

    .todiai-example-box p {
        line-height: 1.5;
    }

.todiai-chat-container {
    width: 100%;
    height: 100%;
    position: relative;
    max-height: 100%;
    overflow-y: auto;
}

    .todiai-chat-container .bg {
        opacity: .05;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

.todiai-chat-wrapper {
    font-weight: 300;
    padding: 15px;
    font-size: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    z-index: 2;
}

    .todiai-chat-wrapper .user {
        max-width: 70%;
        margin-left: auto;
        width: fit-content;
        padding: 10px 20px 9px;
        background-color: #f4f4f4;
        border-radius: calc(var(--card-radius) * 2);
    }

    .todiai-chat-wrapper .ai {
    }

        .todiai-chat-wrapper .ai:nth-last-of-type(1) {
            min-height: calc(100% - 50px);
        }

        .todiai-chat-wrapper .ai p {
            margin-bottom: 15px;
        }

        .todiai-chat-wrapper .ai ul {
            margin-bottom: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            list-style: disc;
            padding-left: 15px;
        }

.todiai-chat-input {
    height: 55px;
    padding: 7px;
    display: flex;
    gap: 15px;
    border: 1px solid rgba(var(--black-o), .1);
    border-radius: calc(var(--card-radius));
    box-shadow: 0 9px 9px 0px rgba(0, 0, 0, .01), 0 2px 5px 0px rgba(0, 0, 0, .06);
    transition: all .2s ease;
    position: relative;
}

    .todiai-chat-input:has(:focus) {
        box-shadow: 0 2px 12px 0px rgba(0, 0, 0, .04), 0 9px 9px 0px rgba(0, 0, 0, .01), 0 2px 5px 0px rgba(0, 0, 0, .06);
    }

    .todiai-chat-input input {
        padding: 2px 10px 0;
        font-weight: 300;
        font-size: 1.6rem;
        width: 100%;
        border: none;
        outline: none;
    }

        .todiai-chat-input input::placeholder {
            opacity: .75;
        }

    .todiai-chat-input button {
        min-width: 39px;
        border-radius: 12px;
        padding: 0;
        aspect-ratio: 1;
        background: var(--todiai-primary-color);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .todiai-chat-input.v2 {
        max-width: 550px;
        width: 100%;
        margin-top: 20px;
    }

.todi-think {
    position: absolute;
    left: 0;
    top: -10px;
    transform: translateY(-100%);
    display: flex;
    gap: 10px;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: all .2s ease;
    z-index: 2;
}

    .todi-think.active {
        opacity: 1;
    }

    .todi-think > img {
        height: 28px;
        animation: shakeRotate 5s ease-in-out infinite;
    }
    /*.todi-think > span{ transform-origin: bottom left; top: 7px; right: 7px; font-size: 1.3rem; padding: 10px 15px 8px; transform: translateX(100%) translateY(-100%); border-radius: 99px; color: var(--white-txt); position: absolute; background: linear-gradient(150deg, #3779FF, #37B2FF); white-space: nowrap; border-bottom-left-radius: 0;}*/
    .todi-think > span {
        font-size: 14px;
        color: var(--main-clr);
        white-space: nowrap;
    }

        .todi-think > span > span {
            animation: typing-dots 1.5s infinite;
        }

            .todi-think > span > span:nth-child(2) {
                animation-delay: 0.2s;
            }

            .todi-think > span > span:nth-child(3) {
                animation-delay: 0.4s;
            }

@keyframes shakeRotate {
    0% {
        transform: rotate(0deg);
    }

    35% {
        transform: rotate(0deg);
    }

    40% {
        transform: rotate(7deg);
    }

    50% {
        transform: rotate(-7deg);
    }

    60% {
        transform: rotate(7deg);
    }

    65% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}






@keyframes typing-dots {
    0% {
        opacity: 0;
    }

    25% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}


.todi-owl-bg {
    --size: 60px;
    width: var(--size);
    height: var(--size);
    margin-left: 5px;
    border-radius: 50%;
    background-color: purple;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .3), 0 0 0 5px rgba(0, 0, 0, .05);
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
}

    .todi-owl-bg.big {
        --size: 80px;
    }

    .todi-owl-bg::before {
        box-shadow: -3px 5px 5px 0 rgba(0, 0, 0, .1);
        width: calc(100% + 5px);
        height: calc(100% + 5px);
        border-radius: 50%;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        content: '';
        z-index: 2;
        display: inline-block;
        position: absolute;
    }

    .todi-owl-bg img {
        width: 100%;
    }


.todi-owl {
    position: fixed;
    z-index: 99;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: purple;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .3), 0 0 0 5px rgba(0, 0, 0, .05);
    border: none;
    outline: none;
}

    .todi-owl::before {
        box-shadow: -3px 5px 5px 0 rgba(0, 0, 0, .1);
        width: calc(100% + 5px);
        height: calc(100% + 5px);
        border-radius: 50%;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        content: '';
        z-index: 2;
        display: inline-block;
        position: absolute;
    }

    .todi-owl img {
        width: 100%;
    }
    /* .todi-owl > span{ font-size: 1.3rem; padding: 10px 15px 8px; transform: translateX(100%) translateY(-100%); border-radius: 99px; color: var(--white-txt); position: absolute; top: 5px; right: 5px; background: linear-gradient(150deg, #3779FF, #37B2FF); white-space: nowrap; border-bottom-left-radius: 0;} */
    .todi-owl > span {
        transform-origin: bottom left;
        top: 7px;
        right: 7px;
        font-size: 11px;
        padding: 0px 10px 0px;
        transform: translateX(100%) translateY(-100%);
        border-radius: 99px;
        color: #fff;
        position: absolute;
        background: linear-gradient(150deg, var(--todiai-primary-color), #0a74a3);
        white-space: nowrap;
        border-bottom-left-radius: 0;
    }

        .todi-owl > span > span {
            animation: typing-dots 1.5s infinite;
        }

            .todi-owl > span > span:nth-child(2) {
                animation-delay: 0.2s;
            }

            .todi-owl > span > span:nth-child(3) {
                animation-delay: 0.4s;
            }



.fix-right {
    z-index: 50;
    padding: 10px 30px 8px 20px;
    background-color: var(--color-main-powder);
    color: var(--white-txt);
    border-radius: 99px 0 0 99px;
    position: fixed;
    bottom: 25px;
    right: 0;
}



@keyframes blobAnimation {
    0% {
        transform: translateX(100%) translateY(-100%) scale(0) rotate(0deg);
    }

    3% {
        transform: translateX(100%) translateY(-100%) scale(0) rotate(0deg);
    }

    5% {
        transform: translateX(100%) translateY(-100%) scale(1.05) rotate(-3deg);
    }

    7% {
        transform: translateX(100%) translateY(-100%) scale(1) rotate(2deg);
    }

    10% {
        transform: translateX(100%) translateY(-100%) scale(1) rotate(0deg);
    }
    /* Bekleme süresi (burada hareket etmiyor) */
    40% {
        transform: translateX(100%) translateY(-100%) scale(1) rotate(0deg);
    }
    /* Kısa sallanma */
    45% {
        transform: translateX(100%) translateY(-100%) scale(1) rotate(3deg);
    }

    50% {
        transform: translateX(100%) translateY(-100%) scale(1) rotate(-5deg);
    }

    55% {
        transform: translateX(100%) translateY(-100%) scale(1) rotate(0deg);
    }
    /* Tekrar bekleme süresi */
    85% {
        transform: translateX(100%) translateY(-100%) scale(1) rotate(0deg);
    }
    /* Gidiş efekti */
    90% {
        transform: translateX(100%) translateY(-100%) scale(1.05) rotate(3deg);
    }

    95% {
        transform: translateX(100%) translateY(-100%) scale(0) rotate(0deg);
    }

    100% {
        transform: translateX(100%) translateY(-100%) scale(0) rotate(0deg);
    }
}


.todi-owl > span {
    animation: blobAnimation 10s infinite ease-in-out;
}



.bd-modal .bd-modal-container {
    padding: 15px;
    background: purple;
}

.todiai-chat-wrapper {
    background: #fff;
    border-radius: 20px;
}

.bd-modal-closeButton {
    --size: 40px;
    width: var(--size);
    height: var(--size);
    border: solid 2px #ccc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 100;
}

.bd-modal-closeButton {
    top: 0;
    right: 0;
    background: purple;
    transform: translate(-20%, 20%);
    color: #fff;
    border-color: #fff !important;
}
