:root {
    --white: #ffffff;
    --black: #000000;
    --darkblue: #1476A1;
    --gray: #959595;
    --lightgray: #F2FBFF;
    --lightblue: #D7F3FF;
    --teal: #00A79D;
}

.chatbot-toggler {
    position: fixed;
    bottom: 10px;
    left: 15px;
    outline: none;
    border: none;
    height: 60px;
    width: 60px;
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 99;
	transition: right 0.3s ease-in-out;
	overflow: visible;
}

.chat-text {
    position: absolute;
    top: 50%;
    right: -120px; /* initially position it outside the viewport */
    transform: translateY(-50%);
    background-color: var(--darkblue);
    color: var(--white);
    padding: 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: right 0.3s ease-in-out;
	opacity: 0;
}

.chatbot-toggler:hover .chat-text {
	opacity: 1;
}

.chatbot-toggler.chatbot-toggled:hover .chat-text {
	opacity: 0;
}

.chatbot-toggler img {
    width: 80px;
}

.chatbot {
    position: fixed;
    left: 35px;
    bottom: 100px;
    width: 500px;
    height: 500px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    transform-origin: bottom right;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-in-out;
    z-index: 99;
}

.chatbot header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    background: var(--darkblue);
}

.header-image {
    width: 75px;
    object-fit: contain;
}

.header-greeting {
    flex: 2;
    display: flex;
    flex-direction: column;
    font-size: 20px;
}

.refresh-icon {
    margin-right: 3rem;
    cursor: pointer;
}

.close-icon {
	margin-right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: var(--darkblue);
    color: var(--white);
}

.chatbot .chatbox {
    overflow-y: scroll;
    height: 400px;
    padding: 0px 20px 100px 0;
    background-color: var(--white);
}

.chatbot :where(.chatbox)::-webkit-scrollbar {
    width: 6px;
}

.chatbot :where(.chatbox)::-webkit-scrollbar-track {
    background: var(--white);
    border-radius: 25px;
}

.chatbot :where(.chatbox)::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 25px;
}

#chatbox {
    background-image: url("/assets/img/chatbot/background.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.chatbox .chat {
    display: flex;
    list-style: none;
    justify-content: flex-start;
    align-items: end;

}

.chatbot .incoming {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* margin-top: 20px; */
    width: 100%;
}

.chat img.chatbot-image {
    width: 50px;
    height: auto;
    object-fit: contain;
}

.chatbox .outgoing {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 15px;
}

.chatbot .incoming img {
    border-radius: 10px;
    width: 300px;
    height: 200px;
    max-width: 75%;
    margin-bottom: 10px;
    object-fit: contain;
}

.chatbox .chat p,
.chatbox .chat a {
    white-space: pre-wrap;
    padding: 12px 16px;
    border-radius: 10px 10px 0 10px;
    max-width: 75%;
    font-size: 0.75rem;
}

.chatbox .chat a {
    overflow-wrap: anywhere;
}

.chatbox .incoming p,
.chatbox .incoming a {
    border-radius: 10px 10px 10px 0;
    margin-bottom: 10px;
    color: var(--black);
    background: var(--lightblue);
}

.chatbox .outgoing p {
    cursor: pointer;
    color: var(--darkblue);
    border: 1px solid var(--darkblue);
    background-color: var(--white);
}

.chatbox .outgoing span {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.75rem;
    max-width: 75%;
    border-radius: 20px;
    border: 1px solid var(--darkblue);
    background-color: var(--white);
    margin-right: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.chatbox .outgoing p:hover,
.chatbox .outgoing p.selected,
.chatbox .outgoing span:hover,
.chatbox .outgoing span.selected {
    background-color: var(--darkblue);
    color: var(--white);
}

.chatbox .outgoing .extra,
.chatbox .outgoing .languages {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    flex-wrap: wrap;

}

.chatbox .outgoing .extra span {
    white-space: nowrap;
    max-width: fit-content;
    color: var(--teal);
    font-size: 0.75rem;
    padding: 6px 12px;
    border: 1px solid var(--teal);
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: var(--white);
}

.chatbox .outgoing .extra span:hover,
.chatbox .outgoing .extra span.selected {
    color: var(--white);
    background-color: var(--teal);
}

.chatbot .modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.chatbot .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    outline: 0;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 0 60px;
}

.chatbot .button-group {
    justify-content: center;
    display: flex;
    gap: 20px;
}

.chatbot .button-group .btn {
    display: inline-block;
    margin-top: 15px;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.chatbot .button-group .confirm-btn {
    background-color: var(--darkblue);
    color: var(--white);
}

.chatbot .button-group .confirm-btn:hover {
    background-color: var(--lightblue);
    color: var(--darkblue);
    border: 1px solid var(--darkblue);
}

.chatbot .button-group .cancel-btn {
    border: 1px solid var(--black);
    color: var(--black);
}

.chatbot .button-group .cancel-btn:hover {
    background-color: var(--black);
    color: var(--white);
}

.chatbot .chat iframe {
    margin-bottom: 10px;
}

.chat.outgoing.form .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--lightgray);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    width: 300px;
}

.chat.outgoing.form .form-control {
    flex: 1;
    padding: 8px;
    font-weight: 400;
    border: 1px solid var(--gray);
    border-radius: 5px;
}

.chat.outgoing.form .btn {
    font-weight: 700;
    padding: 8px 20px;
    background-color: var(--darkblue);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat.outgoing.form .btn:hover {
    background-color: var(--lightblue);
    border: 1px solid var(--darkblue);
    color: var(--darkblue);
}


/* css by yash for aids helpline number start  */
#chatbot_helpline a{
    text-decoration: underline !important;
    color: #fff;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3px 5px;
    
}

#chatbot_helpline {
    background-color: var(--darkblue);
    
}
/* css by yash for aids helpline number end  */

@media screen and (max-width: 767px) {
    .chatbot {
        width: 80%;
        height: 70%;
    }

    .chatbot .chatbox {
        height: 100%;
    }

    .chatbot .chat p,
    .chatbot .chat a {
        padding: 8px 12px;
    }

    .chatbot .chat iframe {
        max-width: 400px;
        width: 100%;
    }

    .refresh-icon {
        margin-right: 2rem;
    }

    .chat.outgoing.form .form-group {
        width: 100%;
    }

    
}
