/* chatbot css start */

:root {
    --grey: #f5f5f5;
    --blue: #3d88f9;
    --black: #1a1a1a;
}

body.chat-open {
    .chat-window {
        display: flex;
    }
}

/* Chat Bubble */
.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0078ff;
    color: white;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 25px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
    z-index: 999;
}

.chat-button img {
    height: 2.5rem;
}

/* Chat Window */
.chat-window {
    display: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.20);
    background: #fff;
    border-radius: 16px;
    position: fixed;
    z-index: 999;
    bottom: 90px;
    right: 20px;
    height: 430px;
    width: 340px;
    /* display: flex; */
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-close {
    display: none !important;
}

/* Header */
.chat-header {
    background: #2e2e2e;
    padding: 5px 14px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-size: 16px;
    /* font-weight: 600; */
}

.chat-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
}

/* Slide Animation */
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-window {

    .chat {
        overflow-y: auto; /* scroll */
        flex: 1;
        padding: 12px;
        /* background: #f5f5f5; */

        p {
            max-width: 78%;
            margin-bottom: 12px;
            padding: 10px 14px;
            border-radius: 14px;
            font-size: 14px;
            line-height: 1.4;
        }

        div.model {

            p {
                background-color: var(--grey);
            }

            div{
                background-color: var(--grey);
                max-width: 78%;
                margin-bottom: 12px;
                padding: 10px 14px;
                border-radius: 14px;
                font-size: 14px;
                line-height: 1.4;

                p{
                    max-width: none;
                    margin-bottom: 0px;
                    padding: 0px;
                    border-radius: 0px;
                    font-size: 14px;
                    line-height: 1.4;
                }
            }

            
        }

        div.user {
            display: flex;
            justify-content: flex-end;

            p {
                background-color: var(--blue);
                color: white;
            }
        }

        div.error {
            p {
                font-size: 14px;
                text-align: center;
                color: red;
            }
        }
        
    }

    .input-area {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px;
        border-top: 1px solid lightgray;

        input {
            flex: 1;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid #ccc;
            font-size: 14px;
        }

        button {
            height: 40px;
            width: 40px;
            display: flex;
            justify-content: center;
            align-items: center;

            margin-left: 8px;
            background: #0078ff;
            border: none;
            color: white;
            padding: 10px 14px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 16px;

            img {
                width: 18px;
            }

            &:hover {
                box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
            }
        }
    }
}

.loader {
    width: 40px;
    opacity: 0.4;
    aspect-ratio: 4;
    background: radial-gradient(circle closest-side,#000 90%,#0000) 0/calc(100%/3) 100% space;
    clip-path: inset(0 100% 0 0);
    animation: l1 1.5s steps(4) infinite;
  }
  @keyframes l1 {to{clip-path: inset(0 -34% 0 0)}}

/* ===========================
   RESPONSIVE - MAX 600px
=========================== */
@media (max-width: 600px) {

    .chat-window {
        width: 92%;
        right: 4%;
        height: 70vh;
        bottom: 100px;
        border-radius: 18px;
    }

    .chat-header {
        padding: 4px 12px;
    }

    .chat-title {
        font-size: 15px;
    }

}

/* ===========================
   RESPONSIVE - MAX 480px
=========================== */
@media (max-width: 480px) {

    .chat-window {
        width: 96%;
        right: 2%;
        height: 78vh;
        bottom: 90px;
        border-radius: 16px;
    }

    .chat-button {
        bottom: 15px;
        right: 15px;
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    .chat-header {
        padding: 3px 10px;
    }

}
  
/* chatbot css end */