@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@500&display=swap');

/* Bootstrap to vanilla CSS */
.invisible-custom {
    display: none !important;
}
.position-fixed-custom {
    position: fixed;
}
.d-flex-custom {
    display: flex;
}
.flex-column-custom {
    flex-direction: column;
}

.flex-row-custom {
    flex-direction: row;
}

.align-items-center-custom {
    align-items: center;
}
.justify-content-end-custom {
    justify-content: flex-end;
}

.justify-content-start-custom {
    justify-content: flex-start;
}

.lead-custom {
    font-size: 1.25rem;
    font-weight: 300;
}
.fs-3-custom {
    font-size: 1.75rem;
}
.fs-4-custom {
    font-size: 1.5rem;
}
.ms-2-custom {
    margin-left: .5rem;
}
.ms-auto-custom {
    margin-left: auto;
}
.mt-1-custom {
    margin-top: .25rem;
}
.ms-1-custom {
    margin-left: .25rem;
}
.text-white-custom {
    color: #fff !important;
}
.btn-custom {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    border: none;
    padding: .375rem .75rem;
    line-height: 1.5;
    border-radius: .25rem;
    background-color: #3FA535;
}
.btn-custom:active {
    border: 1px solid #fff;
}


.spinner-custom {
    height: 40px;
    width: 40px;
    border: 5px solid #ccc;
    border-right-color: #fff;
    border-radius: 50%;
    animation: rotate 1.5s linear infinite;
}

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

/* Custom CSS */
#chat-window {
    line-height: 25px;
    width: auto;
    bottom: 20px;
    right: 20px;
    font-family: 'Lato', sans-serif !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 20;
    ::-webkit-scrollbar {
        width: 5px;
    }
    ::-webkit-scrollbar-track {
        background: white;
    }
    ::-webkit-scrollbar-thumb {
        background: #3FA535;
    }
}

.chat-window-small {
    height: 50vh;
    max-width: 400px;
}

.chat-window-large {
    height: 80vh; 
    width: 80vw !important;
    max-width: 100vw;
}

@media (max-width: 440px) {
    #chat-window {
        max-width: 300px;
    }
}

@media (max-width: 340px) {
    #chat-window {
        max-width: 250px;
    }
}

#chat-top{
    justify-content: space-between;
    font-family: 'M PLUS Rounded 1c', sans-serif !important;
    background-color: #3FA535;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    line-height: 25px;
}

#outer-chat-middle {
    background-color: #fff;
    overflow-y: auto; /* Enables vertical scrolling */
    flex: 1; 
}

#chat-bottom {
    background-color: #3FA535;
    padding: 5px; 
    box-sizing: border-box;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

#chat-textarea {
    line-height: 25px;
    font-family: 'Lato', sans-serif;
    resize: none;
    margin: 2px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 80%; 
    height: 100%; 
    box-sizing: border-box;
}

#chat-textarea:disabled {
    background-color: #E5E4E2;;
}

#submit-button {
    font-family: 'Lato', sans-serif;
    font-weight: bold;
    background-color: #3FA535 !important;
    color: #fff;
    width: 20%;
}

#close-button {
    font-family: 'Lato', sans-serif;
    color: white;
}

#open-chat-button {
    background-color: #3FA535 !important;
    color: #fff;
    position: fixed;
    right: 25px;      
    bottom: 25px;  
    z-index: 1000;
    border: none;
    width: 85px;         
    height: 85px;         
    border-radius: 50%;
    border: 1px solid #fff;
}

.bot-text-box {
    margin-left: 2%;
    max-width: 70%;
    font-size: medium;
    background-color: #3FA535;
    border-radius: 5px;
    color: #fff;
    padding: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.user-text-box {
    margin-top: 5px;
    margin-bottom: 5px;
    margin-right: 2%;
    max-width: 70%;
    font-size: medium;
    background-color: #097000;
    border-radius: 5px;
    color: #fff;
    padding: 5px;
}

#expand-chat-arrows {
    max-height: 18px;
    max-width: 18px;
    margin-right: 12.5px;
}

#expand-chat-arrows:hover {
    cursor: pointer;
}

/* Popup */
#popup-close {
    color: #fff;
    position: absolute;
    top: 0px;
    right: 8px;
    font-size: 20px;
}

#popup-close:hover {
    cursor: pointer;
}

.popup {
    font-family: 'Lato', sans-serif;
    color: #fff;
    width: 250px;
    margin: 0 auto;
    position: fixed;
    text-align: center;
    z-index: 10;
    opacity: 0; /* Initially hidden */
    transform: translateY(100%); /* Initially off-screen */
    transition: opacity 0.5s, transform 0.5s; /* Smooth transition */
    right: 45px;      
    bottom: 220px;  
}

.popup.active {
    opacity: 1;
    transform: translateY(0);
}

.popup:after {
    content: "";
    height: 100%;
    width: 100%;
    border-radius: 4px;
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 0 1px 14px rgba(0,0,0,.2);
    z-index: 11;
}

.popup:before {
    content: "";
    width: 20px;
    height: 20px;
    transform: rotate(45deg);
    box-shadow: 0 1px 14px rgba(0,0,0,.2);
    background: #3FA535;
    position: fixed;
    z-index: 11;
}

.popup.arrow-bottom:before {
    left: calc(90% - 10px);
    bottom: -105px;
}

.popup-wrapper {
    width: 100%;
    padding: 1px;
    border-radius: 4px;
    background: #3FA535;
    position: fixed;
    z-index: 11;  
}

/*Choice buttons*/
.choice-button {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    border: none;
    padding: .375rem .75rem;
    line-height: 1.5;
    border-radius: .5rem;
    background-color: #fff;
    border: 2px solid #097000;
    margin-bottom: 3px;
    color: #097000;
    width: fit-content;
    font-size: 0.9rem;
}

.choice-button:hover {
    border: 2px solid #d2ffce;
}

/*Temrs of use*/

#chatbot-terms-of-use {
    display: flex;
    flex-direction: column; 
    align-items: center;
    width: 100%;
    background-color: rgba(63, 165, 53, 0.9);
    position: absolute;
    padding: 10px;
}
#chatbot-terms-of-use-text {
    color: white;
    text-align: center;
    text-shadow: 0.9px 0.9px 0.9px rgba(0,0,0,0.5);
    line-height: 1.5;
}

#chatbot-terms-of-use-link {
    color: #0000FF;
    text-shadow: 0px 0px 0px rgba(0,0,0,0.5);
}

.chatbot-accept-terms-button:active {
    background-color: rgba(63, 165, 53, 0.9);
}

.chatbot-accept-terms-button {
    align-items: center;
    border-radius: 5px;
    border: none;
    background-color: white;
    width: fit-content;
    padding: 5px 10px; 
    margin-top: 20px;
    font-family: 'Lato', sans-serif;
}

/* Chatbot Reviews */

#chatbot-review {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: rgba(63, 165, 53, 0.93); 
    color: white;
    position: absolute;
    padding: 5px;
    justify-content: space-between;
    max-height: 0;
    overflow: hidden;
    transition: max-height 1s ease-out, opacity 1s ease-out;
    opacity: 0;  /* Start hidden */
}

.chatbot-review-text {
    padding: 3px;
    margin: 0px;
    text-shadow: 0.9px 0.9px 0.9px rgba(0, 0, 0, 0.5);
}

.chatbot-review-close {
    display: flex;
    justify-content: end;
    cursor: pointer;
    font-size: 20px;
}

.review_bot_button {
    height: 28px;
}

.review_bot_button:hover {
    cursor: pointer;
}

.chatbot-feedback-button:active {
    background-color: rgba(63, 165, 53, 0.9);
}

.chatbot-feedback-button {
    border-radius: 5px;
    border: none;
    background-color: white;
    padding: 2.5px 5px; 
    font-family: 'Lato', sans-serif;
    width: 50px;
    margin-right: 10px;
}