@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

html, body {
    background: transparent;
}

:root {
    --primary-gradient: linear-gradient(135deg, rgb(42, 39, 218) 0%, rgb(0, 204, 255) 100%);
    --primary: rgb(0, 125, 252);
    --default-padding: 15px 15px 15px 15px;
    --thickness: 2px;
    --shadow: rgba(0, 18, 46, 0.16) 0px 8px 36px 0px;
    --rounded-borders: 16px;
    
}



h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 26px !important;
}

h2, h3, h4, h5, h6, textarea, p, span, input, select, div {
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    font-size: 17px !important;
    color: rgb(6, 19, 43);
}

.hidden {
    display: none !important;
}

.toggle-chatbot {
    box-shadow: var(--shadow);
    position: fixed;
    bottom: 40px;
    right: 30px;
    background: var(--primary-gradient);
    color: #fff;
    height: 60px;
    width: 60px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease-in-out;
}

.notice-bar {
    position: fixed;
    bottom: 40px;
    right: 0;
    cursor: pointer;
    z-index: 1;
}

.toggle-chatbot:hover {
    border: var(--thickness) solid var(--primary);
    background: #fff;
    transform: scale(1.1);
    color: var(--primary); 
    fill: var(--primary);
}

.toggle-chatbot:hover svg path {
    fill: var(--primary);
}

.toggle-chatbot svg {
    height: 32px;
    width: 32px;
}

.toggle-chatbot span {
    font-size: 28px !important;
    color: white;
}

.toggle-chatbot:hover span {
    color: var(--primary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#progress_icon {
    animation: spin 1s infinite linear;
}


.card {
    z-index: 9;
    width: 400px;
    height: 90%;
    box-shadow: var(--shadow);
    border-radius: var(--rounded-borders);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    position: fixed;
    bottom: 20px;
    right: 55px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.card.visible {
    opacity: 1;
}

.card .header {
    height: 10%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    color: white;
    padding: var(--default-padding);
    font-size: 18px;  
    position: relative;      
    justify-content: space-between;
}

.card .header .text {
    display: flex;
    align-items: center;
    color: white;
    font-size: 18px;  
}

.card .header img {
    border-radius: var(--rounded-borders);
    margin-right: 10px;
    background-color: white;
}

.card .header span {
    font-size: 26px !important;
    color: white;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}
.card .header span:hover {
    background: rgba(0, 0, 0, 0.212);
}

.card .body {
    height: 70%;
    background: white;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    color: white;
    padding: var(--default-padding);
    overflow-y: scroll;
    position: relative;
}

.message {
    max-width: 85%;
    margin: 5px;
    border-radius: var(--rounded-borders);
    word-wrap: break-word;
    font-size: 16px !important;
}

.outgoing {
    align-self: flex-end;
    background: var(--primary-gradient);
}

.outgoing .content {
    color: white;
}

.content p {
    margin: 0;
    padding: 0;
}

#wave {
    display: inline-block;
    width: auto;
    height: auto;
    text-align: center;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 3px;
    background: var(--primary-gradient);
    animation: wave 1.3s linear infinite;

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

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

@keyframes wave {
    0%, 60%, 100% {
        transform: initial;
    }

    30% {
        transform: translateY(-15px);
    }
}


.incoming {
    align-self: flex-start;
    align-items: center;
    background: rgb(240, 242, 247);
    border: 2px solid #e0e0e0;
}

.incoming .content {
    color: black;
}

.message .content {
    padding: 16px;
}

.message .flows-container {
    background: white;
    border-radius: var(--rounded-borders);
    display: flex;
    flex-direction: column; /* Display flows below each other */
}

.flows {
    padding: 8px 16px;
    color: var(--primary) !important;
    cursor: pointer;
}

.flows:not(:first-child) {
    margin-top: 2px; 
    border-top: 2px solid #dedede; 

}

.card .body::-webkit-scrollbar {
    width: 10px;
}

.card .body::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 2px; 
}

.card .body::-webkit-scrollbar-track {
    background-color: transparent;
}

.card .footer {
    height: 20%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: stretch; /* Updated to stretch */
    flex-direction: column;
    color: white;
    padding: var(--default-padding);
}

textarea {
    width: 100%;
    height: 80%;
    margin-top: 10px; /* Adjust as needed */
    padding: var(--default-padding);
    background: transparent;
    border: none;
    border-top: var(--thickness) solid #f7f7f7;
    resize: none;
    color: black;
    outline: none;
    overflow: hidden;
}

textarea::placeholder {
    font-family: 'Roboto', sans-serif;
    color: #adadad;
}


@media only screen and (max-width: 550px) {
    .card {
        z-index: 9;
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;

    }
}