:root {
    --aichat-header-bg-color: #0071e3;
    /* --aichat-header-bg-light-color: #0071e35c; */
    --aichat-header-text-color: white;
    --aichat-body-bg-color: #f9f9f9;
    --aichat-body-text-color: black;
    /* --aichat-body-text-color-rgb: 0, 0, 0; */
    /* --aichat-body-text-color-opacity: rgba(var(--aichat-body-text-color-rgb), 0.1);   */
    --aichat-icon-bg-color: #27bdc4;
    --aichat-icon-color: white;
    --aichat-icon-hover-bg-color: #126064;
    --aichat-icon-hover-color: white;
}



.d-flex{
    display: flex;
}

.align-items-center{
    align-items: center;
}

.open-button {
    /* background-color: #0071e3;  */
    color: white;
    border: none;
    border-radius: 50%; /* Make it round */
    padding: 0;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    position: fixed ;
    bottom: 50px;
    right: 20px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); /* Add some shadows */
    transition: all 0.3s ease-in-out; /* Add smooth transition */
    height: 60px;
    width: 60px;
    /* background: linear-gradient(135deg, #282fdc, #0071e3); */
    /* box-shadow: rgb(33 0 255 / 50%) 0px 4px 24px; */
    z-index: 99;
    background-color: var(--aichat-icon-bg-color);

}

.open-button:hover {
    /* background: linear-gradient(135deg, #0071e3 , #282fdc);  */
    background-color: var(--aichat-icon-hover-bg-color);
}

.open-button:hover  svg{
    /* transform: scale(1.5); */
    transition: all 1.6s ease-in-out; /* Add smooth transition */
    transform: rotate(360deg);
    fill: var(--aichat-icon-hover-color);
}

.chat-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: 100%;
    background-color: var(--aichat-body-bg-color);
    box-shadow: 0px 2px 10px rgba(0,0,0,.25);
    overflow: visible;
    padding: 0;
    border-radius: 20px;
    height: 65vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    display: none;
    max-width: 360px;
}


.chat-header{
    /* background: linear-gradient(135deg, rgb(42, 39, 218) 0%, rgb(0, 204, 255) 100%); */
    padding: 15px 23px 15px 13px;
    position: relative;
    overflow: hidden;
    background: var(--aichat-header-bg-color);
}

.chat-header .background-svg{
    position: absolute;
}
.pattern{
    background: linear-gradient(135deg, rgb(42, 39, 218) 0%, rgb(0, 204, 255) 100%);
}
.chat-header .cancel {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    background: transparent !important;
    width: auto !important;
    padding: 0 !important;
    right: 10px !important;
    font-size: 30px !important;
    top: 0 !important;
    cursor: pointer;
    border: none !important;
}
.chat-header .cancel::after{
    display: none;
}

.chat-header .cancel:hover,
.chat-header .cancel:focus{
    background: none !important;
    box-shadow: none !important;
}

.chat-header .background-svg {
    position: absolute;
    left: 0;
    width: 400px;
    right: 0;
    height: 205px;
    object-fit: cover;
    background-size: cover;
    top: -10px;
    z-index: -1;

}
.chat-header h5, .chat-header p{
    color: var(--aichat-header-text-color);
    position: relative;
    z-index: 9;
}
.btn:hover , .btn.active.focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn:active:focus, .btn:focus{
    outline: none;
    box-shadow: none;
}
.chat-header  .cancel svg , .form-container .btn svg{
    fill: var(--aichat-header-text-color);
}


.happy-to-help{
    margin-top: 4px;
    font-weight: 500;
    font-size: 12px;
}

.help{
    fill: #ebce15;
    height: 30px;
    width: 30px;
    margin-left: 4px;
    position: relative;
    top: -5px;
}

.avtr-icn-wrp svg{
    box-shadow: 1px 1px 5px 2px rgba(0,0,0,0.4);
    border-radius: 50%;
    margin-left: -15px;
}
.avtr-icn-wrp:first-child svg{
    margin-left: 0;
}

.chat-header h5{
    margin-bottom: 0;
    margin-left: 15px;
}
.form-container {
    display: flex;
    flex-direction: column;
    margin-top: auto; /* This will push the form to the bottom */
}

.form-container textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0 22px 0;
    border: 1px solid #ddd;
    background: var(--aichat-body-bg-color);
    resize: none;
    min-height: 50px;
    border-radius: 20px;
    box-shadow: inset 0px 2px 5px rgba(0,0,0,.05);
    margin: 0;
    border-radius: 0;
    border-right: none;
    border-bottom: none;
    border-left: 0;
    font-size: 13px;
    color: var(--aichat-body-text-color);
}
textarea::placeholder {
    color: var(--aichat-body-text-color);
}

.form-container .btn {
    /* background: linear-gradient(135deg, #282fdc, #0071e3c7) !important; */
    background: var(--aichat-icon-bg-color) !important;
    color: var(--aichat-icon-color);
    border: none;
    cursor: pointer;
    width: 50px !important;
    margin-bottom: 0;
    opacity: 0.8 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    height: 50px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute !important;
    right: -20px !important;
    opacity: 1 !important;
    bottom: 30px !important;
    transition: all 0.2s ease-in-out 0s;
    box-shadow: 1px 1px 5px 2px rgba(0,0,0,0.4);
}

.form-container .btn:after{
    content: "";
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--aichat-icon-hover-bg-color);
    transition: all 0.2s ease-in-out 0s;
    transform: scale(0);
    left: 0;
    top: 0;
    z-index: -1;
}
.form-container .btn svg{
    fill: var(--aichat-icon-color);
    z-index: 1;
}
.form-container .btn:hover {
    opacity: 1;
    /* background: var(--aichat-icon-hover-bg-color) !important; */
    background: none !important;
    box-shadow: 0 0 40px 40px var(--aichat-icon-hover-bg-color) inset !important;
}
.form-container .btn:hover svg{
    /* fill: #0060c1; */
    fill: var(--aichat-icon-hover-color);
}

.form-container .btn:hover::after {
    transform: scale(1);
}

.form-container .cancel {
    background-color: red;
}
.message{

    margin: 0;
    padding: 4px 10px;
    font-size: 10px;

}
.messages-container {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    height: 50vh; /* Changed from max-height to height */
}

.user {
    text-align: right;
    /* background: linear-gradient(135deg, rgb(21 139 240), rgb(145 145 234)); */
    background: var(--aichat-header-bg-color);
    color: var(--aichat-body-bg-color);
    padding: 10px;
    margin: 10px;
    margin-top:0px;
    font-size: 12px;
    border-radius: 20px;
    width: fit-content;
    align-self: flex-end; /* Align user messages to the right */
    max-width: 80%;
    margin-left: auto; /* Align user messages to the right */
    border-top-right-radius: 0px;
}

.bot {
    text-align: left;
    /* background-color: #ddd; */
    color: var(--aichat-body-text-color);
    /* background: var(--aichat-body-text-color); */

    padding: 10px;
    font-size: 12px;
    margin: 10px;
    margin-top:0px;
    border-radius: 20px;
    width: fit-content;
    align-self: flex-start; /* Align bot messages to the left */
    max-width: 80%;
    margin-right: auto; /* Align bot messages to the left */
    border-top-left-radius: 0px;
    position: relative;
}
.bot::after{
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    content: "";
    background: var(--aichat-body-text-color);
    border-radius: 20px;
    border-top-left-radius: 0px;
    opacity: 0.1;
}
.assistant {
    text-align: left;
    background-color: #ddd;
    color: #000;
    padding: 10px;
    font-size: 12px;
    margin: 10px;
    margin-top:0px;
    border-radius: 20px;
    width: fit-content;
    align-self: flex-start; /* Align bot messages to the left */
    max-width: 80%;
    margin-right: auto; /* Align bot messages to the left */
    border-top-left-radius: 0px;
}

.flash-message {
    position: fixed;
    top: 0;
    width: 70%;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
    background-color: #0071e3;
    color:white !important;
    z-index: 999;
    border-radius: 0 0 10px 10px;
    transition: 0.3s;
    animation: slideDown 0.5s ease-in-out forwards;
}

.flash-message.hide {
    animation: slideUp 0.5s ease-in-out forwards;
}

textarea[disabled] {
    /* Styles for disabled textarea */
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}


.open-button svg{
    height: 35px;
    width: 40px;
    fill: var(--aichat-icon-color);
}

.open-button::after{
    content: "";
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 32px;
    background: rgb(255, 255, 255);
    transition: all 0.2s ease-in-out 0s;
    transform: scale(0);
}

.chat-wrap{
    height: 100%;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
}

@keyframes moveLeftRight {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-7deg);
    }
    50% {
        transform: rotate(-7deg);
    }
    75% {
        transform: rotate(7deg);
    }
}

.help {
    animation: moveLeftRight 3s ease-in-out infinite;
    transform-origin: center bottom;
}

@media only screen and (max-width: 500px){
    .chat-popup {
        max-width: 300px;
    }
}

.chat-button{
    padding: 3px 30px;
    border-radius: 10px;
    border: 1px solid var(--aichat-header-bg-color);
    background-color: var(--aichat-body-bg-color);
    color: var(--aichat-header-bg-color);
    font-size: 12px;
    width: 60%;
    margin-left: 10px;
    margin-top: 5px;
}

.chat-button:hover{
    background-color: var(--aichat-header-bg-color);
    color: var(--aichat-body-bg-color);
}


.language-select{
    margin-left:10px;
    margin-right:10px;
    margin-bottom: 10px;
}

.flag-select{
    width: 80%;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.3s ease-in-out;
}

.flag-select:hover{
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.wave-container {
    position: relative;
    width: 100%;
    height: auto; /* Adjust as needed */
    background-color: var(--aichat-header-bg-color);
    overflow: hidden;
}

.wave-container::after {
    content: '';
    position: absolute;
    width: 160%;
    height: 20px;
    bottom: 0;
    left: 0;
    background: #ffffff2e;
    border-radius: 50%;
    transform: translateX(-18%) translateY(61%);
    box-shadow: 0 -10px 0 50px #ffffff2e;
}