.ps_s_ai_chat_plugin_container {
    position: fixed;
    bottom: 0px;
    right: 0px;
    z-index: 1000;
}

#ps_s_ai_chat_plugin_button .bot {
    animation: float 3s ease-in-out infinite;
}

#ps_s_ai_chat_plugin_button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#ps_s_ai_chat_plugin_button .bot {
    display: block;
    width: 100%;
    height: auto;
}

#ps_s_ai_chat_plugin_button .cross {
    display: none;
    width: 100%;
    height: auto;
}

#ps_s_ai_chat_plugin_button.icon_cross .bot {
    display: none;
}

#ps_s_ai_chat_plugin_button.icon_cross .cross {
    display: block;
}

#ps_s_ai_chat_plugin {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 100vw;
    height: 75vh;
    background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#c2cfe6));
    background: -o-linear-gradient(top, #fff 0, #c2cfe6 100%);
    background: linear-gradient(to bottom, #fff 0, #c2cfe6 100%);
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: nowrap;
    max-width: 500px;
    max-height: 1000px;
    min-width: 250px;
    border-bottom-right-radius: 0px;
}

.ps_s_ai_chat_plugin_hidden {
    display: none;
}

.ps_s_ai_chat_plugin_visible {
    display: flex;
}

#ps_s_ai_chat_plugin_holder {
    width: 100%;
    height: 100%;
}

#ps_s_ai_chat_plugin_holder .App .botinputholder input {
    font-size: 18px;
    border: none;
    outline: none !important;
    width: 100%;
    padding: 3px 30% 3px 16px;
}

#ps_s_ai_chat_plugin_holder .App .botinputholder {
    width: 90%;
    height: 50px;
    display: block;
    padding: 10px;
    column-gap: 15px;
    background: white;
    border-radius: 30px;
    margin-bottom: 20px;
    box-shadow: rgba(0, 0, 0, .05) -2px 2px 23px 0;
    display: block;
    position: relative;
}

#ps_s_ai_chat_plugin_holder .App {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: flex-end;
    align-items: center;
}

.ps_s_ai_chat_plugin_visible {
    position: relative;
    max-width: 100%;
    height: 500px; /* Adjust the height as needed */
    overflow-y: auto;
    font-family: 'Arial', sans-serif;
}

.ps_s_ai_chat_plugin_visible .botmessageholder {
    display: flex;
    flex-direction: column;
    padding: 10px;
    margin: 10px 0;
    overflow: auto;
    width: 100%;
}

.ps_s_ai_chat_plugin_visible .user, 
.ps_s_ai_chat_plugin_visible .bot {
    max-width: 80%;
    padding: 15px 10px 10px 15px;
    border-radius: 10px;
    margin: 5px 0;
   
    animation: fadeIn 0.5s ease-in-out;
    text-align: left;
    position: relative;
    color: #000;
    -webkit-box-shadow: rgba(0, 0, 0, .05) -2px 2px 23px 0;
    box-shadow: rgba(0, 0, 0, .05) -2px 2px 23px 0;
}

.ps_s_ai_chat_plugin_visible .user {
    align-self: flex-end;
    background-color: #52ffc1;
    font-family: "Space Grotesk Light", Arial, sans-serif;
    line-height: 1.5;
    border-bottom-right-radius: 0;
}

.ps_s_ai_chat_plugin_visible .bot {
    align-self: flex-start;
    background-color: white;
    color: black;
    font-family: "Space Grotesk Light", Arial, sans-serif;
    line-height: 1.5;
    border-bottom-left-radius: 0;
}

.ps_s_ai_chat_plugin_visible .user::before, 
.ps_s_ai_chat_plugin_visible .bot::before {
    content: '';
    width: 20px;
    height: 20px;
    background-size: cover;
    position: absolute;
    top: -5px;
    left: -5px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 1px 2px 2px lightgray;
}

.ps_s_ai_chat_plugin_visible .user::before {
    background-image: url('../img/icons8-user-48.png');
}

.ps_s_ai_chat_plugin_visible .bot::before {
    background-image: url('https://www.tmpw.co.uk/wp-content/uploads/2024/01/cropped-FAF-1-192x192.png');
}

.ps_s_ai_chat_plugin_visible .botinputholder .promo__button {
    display: inline-block;
    overflow: hidden;
    position: relative;
    width: 100px;
    height: 47px;
    background: #fff;
    color: #93d500;
    text-indent: 9999px;
    text-decoration: none;
    font-family: sans-serif;
    border-radius: 26px;
    position: absolute;
    right: 0;
    background: 0 0;
    border: none;
}

.ps_s_ai_chat_plugin_visible .botinputholder .promo__button::after {
    position: absolute;
    display: inline-block;
    border-top: 2px solid #93d500;
    border-right: 2px solid #93d500;
    content: " ";
    top: 35%;
    right: 30%;
    margin-right: -5px;
    margin-top: 1px;
    -webkit-transform-origin: center;
    -ms-transform-origin: center;
    transform-origin: center;
    opacity: 0;
    -webkit-transform: translate(-50%, -50%) rotate(45deg);
    -ms-transform: translate(-50%, -50%) rotate(45deg);
    transform: translate(-50%, -50%) rotate(45deg);
    -webkit-animation: ARROWHEAD-OUT 1s forwards;
    animation: ARROWHEAD-OUT 1s forwards;
}

.ps_s_ai_chat_plugin_visible .botinputholder .promo__button::before {
    position: absolute;
    display: inline-block;
    height: 2px;
    background: #93d500;
    content: " ";
    top: 35%;
    -webkit-animation: LINE-OUT 1s forwards;
    animation: LINE-OUT 1s forwards;
}

.ps_s_ai_chat_plugin_visible .botinputholder input:focus + .promo__button::after, 
.ps_s_ai_chat_plugin_visible .botinputholder .promo__button:hover::after {
    -webkit-animation: ARROWHEAD-IN 1s forwards;
    animation: ARROWHEAD-IN 1s forwards;
}

.ps_s_ai_chat_plugin_visible .botinputholder input:focus + .promo__button::before, 
.ps_s_ai_chat_plugin_visible .botinputholder .promo__button:hover::before {
    -webkit-animation: LINE-IN 1s forwards;
    animation: LINE-IN 1s forwards;
}

.ps_s_ai_chat_plugin_visible @keyframeS fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .ps_s_ai_chat_plugin_visible .user, 
    .ps_s_ai_chat_plugin_visible .bot {
        max-width: 80%;
    }
}

@keyframes LINE-IN {
    0% {
        left: 0;
        right: 100%;
    }
    
    50% {
        left: 0;
        right: 30%;
    }
    100% {
        left: 30%;
        right: 30%;
    }
}
@keyframes LINE-OUT {
    0% {
        width: 40%;
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
        left: 50%;
    }
    100% {
        width: 40%;
        -webkit-transform: translateX(100%);
        transform: translateX(100%);
        left: 100%;
    }
}
@keyframes ARROWHEAD-IN {
    60% {
        width: 0;
        height: 0;
        opacity: 0;
    }
    
    65% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        height: 10px;
        width: 10px;
        opacity: 1;
    }
}
@keyframes ARROWHEAD-OUT {
    0% {
        right: 30%;
        height: 10px;
        width: 10px;
        opacity: 1;
    }
    
    100% {
        right: -100%;
        height: 10px;
        width: 10px;
        opacity: 1;
    }
}
@keyframes float {
    0% {
        transform: translatey(0px);
    }
    50% {
        transform: translatey(-10px);
    }
    100% {
        transform: translatey(0px);
    }
}

@media screen and (max-width: 960px) {
    #ps_s_ai_chat_plugin {
        bottom: 90PX;
    }
    #ps_s_ai_chat_plugin_button {
        width: 90px;
        height: 90PX;
    }
    #ps_s_ai_chat_plugin.ps_s_ai_chat_plugin_visible{
        right: 0;
    }
}