@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@100&display=swap');

#green {
    width: 10px;
    height: 10px;
    display: flex;
    margin-right: 10px;
    background: #9dff20;
    border-radius: 5px;
}

/* 02 - Couleur des liens dans le chatbot */

#chatbot-container a {
    color: white !important;
    line-break: anywhere !important;
    overflow-x: hidden;
    text-decoration: underline;
}

#chat-circle {
    position: fixed;
    bottom: 55px;
    right: 35px;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0px 3px 16px 0px rgba(0, 0, 0, 0.6),
        0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.5s ease-in-out;
    transform: scale(1);
    transform-origin: bottom right;
    z-index: 100000;
}

#chat-overlay {
    background: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: none;
}

#chatbot-container {
    color: white;
    background: white;
    border: O.5px solid rgba(68, 66, 178, 0.2);
    opacity: 1;
    z-index: 1001;
    overflow: hidden;
    pointer-events: visible;
    text-align: left;
    border-radius: 20px;
    background: #efefef;
    position: fixed;
    right: 30px;
    bottom: 50px;
    width: 350px;
    max-width: 85vw;
    max-height: 85vh;
    box-shadow: 0px 5px 35px 9px #ccc;
    transition: transform 0.5s ease-in-out;
    transform: scale(0);
    transform-origin: bottom right;
    z-index : 100000;
}

#chatbot-toggle {
    float: right;
    margin-right: 10px;
    cursor: pointer;
}

/* Section Header du chatbot */

#chatbot-header {
    padding: 15px;
    justify-content: initial;
    background: transparent;
    align-items: center;
    display: flex;
    color: black;
    flex-direction: row;
    border-radius: 20px 20px 0 0;
    box-shadow: rgba(255, 255, 255, 0.6) 0px 0px 0px 0.5px inset;
    border: 0.1px solid rgba(68, 66, 178, 0.2);
}

#chatbot-header span {
    font-size: 8px;
}

#pluginimg {
    width: 40px;
    background-size: contain;
    margin-right: 10px;
}

#chatbot-close {
    display: flex;
    justify-content: end;
    font-style: italic;
    font-size: 20px;
    cursor: pointer;
    position: fixed;
    right: 45px;
}

/* Reset button */


#chatbot-reset {
    display: flex;
    justify-content: end;
    font-style: italic;
    font-size: 20px;
    cursor: pointer;
    position: fixed;
    right: 115px;
}


/* Resize handling */

@media (max-width: 768px) {
    #chatbot-resize {
        display: none !important;
    }
    #chatbot-reset {
        right : 80px !important;
    }
}

#chatbot-resize {
    display: flex;
    justify-content: end;
    font-style: italic;
    font-size: 20px;
    cursor: pointer;
    position: fixed;
    right: 80px;
}

.expanded {
    /** When expanded, the chatbot is 100% of the screen width and height */
    width: 100vw !important;
}



#chatbot-title {
    font-size: 20px;
    font-weight: 600;
}

#chatbot-body #chatbot-messages {
    display: flex;
    align-items: baseline;
    margin-bottom: 10px;
    flex-direction: column;
    padding: 15px;
    align-content: center;
    max-height: 350px;
    min-height: 350px;
    overflow-y: auto;
}

#chatbot-body,
#chatbot-container {
    padding: 0;
}

#chatbot-body {
    overflow-y: auto;
}

#chatbot-body #chatbot-messages .response .pseudo {
    max-width: 80%;
    padding: 0 0 0 0;
    text-decoration: underline;
    border-radius: 5px;
    font-weight: 600;
}

#chatbot-body #chatbot-messages .response {
    max-width: 80%;
    background: #2f58e8;
    padding: 10px;
}

#chatbot-body #chatbot-input-container button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

span.response {
    background: rgba(0, 0, 0, 1);
    border-radius: 15px;
    background: lightskyblue;
    opacity: 0.7;
    text-decoration: none !important;
}

.response {
    margin-bottom: 35px;
    text-decoration: none !important;
}

.response.user {
    margin-left: auto;
    background: #0e2886 !important;
    text-decoration: none !important;
}

.response.assistant {
    text-decoration: none !important;
}

span.pseudo {
    text-decoration: none !important;
}

/* CSS relatif au design de la scrollbar dans le chatbot */

.chatbot-container::placeholder {
    color: black;
    font-size: 16px;
}

.chatbot-container::-webkit-scrollbar {
    background: transparent;
}

.chatbot-container::-webkit-scrollbar-thumb {
    padding-right: 10px;
    height: 10px;
    border-radius: 50px;
    background-color: #ff3cac;
    background-image: linear-gradient(
        225deg,
        #ff3cac 0%,
        #784ba0 50%,
        #2b86c5 100%
    );
}

#chatbot-input-container {
    color: black;
    bottom: 0;
    border-top: 0px solid white;
    display: flex;
}

#chatbot-input {
    padding: 12px;
    font-size: 16px;
    width: 95%;
    border-radius: 5px 5px 5px 5px;
    color: black;
    box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 0px 0.5px inset;
    border: 1px solid rgba(0, 0, 0, 0.6);
}

/** Ellipsis animation while loading **/

.loading-dots:after {
    display: inline-block;
    animation: dotty steps(1, end) 1.5s infinite;
    content: '';
}

@keyframes dotty {
    0% {
        content: '';
    }
    25% {
        content: '.';
    }
    50% {
        content: '..';
    }
    75% {
        content: '...';
    }
    100% {
        content: '';
    }
}

#chatbot-send {
    border-radius: 5px 5px 5px 5px;
    background-color: white;
    color: black;
    box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 0px 0.5px inset;
    border: 1px solid rgba(0, 0, 0, 0.6) !important;
}

/* Chatbot display en mobile */

@media screen and (max-width: 768px) {
    #chatbot-container {
        width: auto;
    }
}

@media screen and (max-width: 500px) {
    #chatbot-container {
        width: auto;
    }
    .open {
        width: auto !important;
    }

    #chatbot-input-container {
        justify-content: center;
    }
}

#chatbot-bubble {
    z-index: 100000;
    display: none;
    position: fixed;
    padding: 15px 25px;
    right: 110px;
    bottom: 70px;
    color: white;
    background: #2f58e8;
    border-radius: 20px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
    font-size: smaller;
    max-width: 30vh;
    &:before {
        content: "";
        position: absolute;
        z-index: -1;
        bottom: 10px;
        right: -5px;
        width: 20px;
        height: 20px;
        background: #2f58e8;
        border-bottom-left-radius: 15px;
        transform: rotate(45deg);
    }
}
@media only screen and (max-width: 600px) {
    #chatbot-bubble{
        display: none;
    }
}


.close-button {
    position: absolute;
    top: -9px;
    right: -9px;
    width: 20px;
    height: 20px;
    content: "";
    background-color: white;
    border: solid #2f58e8 1px;
    border-radius: 50%;
}
.close-button:before {
    position: absolute;
    border-radius: 50%;
    content: "";
    border: solid white 2px;
    width: 16px;
    height: 16px;
    top: 0px;
    left: 0px;
}
.close-button:after {
    position: absolute;
    content: "X";
    color: #2f58e8;
    top: 0px;
    left: 0px;
    width: 100%;
    text-align: center;
    vertical-align: middle;
    line-height: 20px;
}

.close-button.blue:before {
    background-color: white;
}

#text-never-show{
    display: none;
    position: fixed;
    margin: 15px 20px;
    right: 110px;
    bottom: 40px;
    color: #2f58e8;
    float: right;
    font-size: xx-small;
    text-decoration: underline;
    cursor: pointer;
    z-index: 100000;
}

@media only screen and (max-width: 600px) {
    #text-never-show{
        display: none;
    }
}

#chatbot-disclaimer {
    margin: 5px;
    font-size: 0.4em;
    color: #aca3a3;
    text-align: center;
}

#chatbot-container #chatbot-body #chatbot-messages .response.assistant span p {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
}