/* Chat bubble floating icon */
.chatBubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1E1E96;
    color: #FFF;
    padding: 17px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    cursor: pointer;
    z-index: 9999;
}
.chatBubble:hover{
    background-color: #4B4B4B;
}
.chatBubbleIcon{
    width: 35px;
}
.closeChatBubbleIcon{
    padding: 9px 12px;
}
.closeChatBubbleIcon .closeChatBubbleIconImg{
    width: 12px;
}

.minimizedChatBubble{
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    box-shadow: 0 4px 10px #0003;
    width: 255px;
    height: 70px;
    background-color: #4b4b4b;
    color: #fff;
    border-radius: 35px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
    transition: opacity .3s ease;
    font-size: 14px;
    z-index: 999999;
}

/* Main chat container */
.chatContainer{
    width: 390px;
    height: 500px;
    position: fixed;
    bottom: 100px;
    right: 20px;
    box-shadow: 0 4px 10px #0003;
    border: 1px solid #ccc;
    background-color: #FFF;
    z-index: 9998;
}
.chatContainer header{
    color: #fff;
    background-color: #1e1e96;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}
.chatContainer header p {
    color: #FFF;
    font-size: 16px;
    font-weight: 400;
    white-space: wrap;
}
.chatContainer header .whiteLogoContainer{
    background: #FF0000;
    border-radius: 100%;
    width: 30px;
    height: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatContainer header .whiteLogoContainer .logo{
    width: 80%;
    margin-left: -2px;
    margin-top: -2px;
}
.chatContainer header .logo{
    vertical-align: middle;
}
.chatContainer header .actionBtns {
    margin-left: auto;
    display: flex;
    gap: 5px;
}
.chatContainer header button{
    background: transparent;
    border: none;
    cursor: pointer;
    color: #FFF;
    font-size: 20px;
    line-height: 1;
}

.chatContainer .disclaimerContainer{
    background-color: #1e1e96;
    color: #fff;
    padding: 0 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    z-index: 2;
}

.chatContainer .disclaimerContainer p{
    margin-bottom: 20px;
    margin-top: 1em;
    line-height: 15px;
}

.chatContainer .disclaimerContainer a{
    color: #fff;
    text-decoration: underline;
}

.chatContainer .disclaimerContainer button{
    padding: 5px 10px;
    border-radius: 4px;
    align-self: flex-end;
}

.chatContainer .timerInactiveContainer {
    background-color: #1e1e96;
    color: #fff;
    padding: 0 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    z-index: 2;
}
.chatContainer .timerInactiveContainer .timer{
    width: 40.5px;
    display: inline-block;
    white-space: nowrap;
}

/* Chat body area */
.chatBody {
    width: 100%;
    height: calc(95% - 32px);
    background: #FFF;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 4px 10px #0003;
}
.chatBody .mainChatContainer{
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: #f1f1f1 transparent;
    overflow-y: auto;
}
.chatBody .mainChatContainer::-webkit-scrollbar{
    display: block;
    width: 5px;
}
.chatBody .mainChatContainer::-webkit-scrollbar-thum{
    border-radius: 5px;
    background: #d9d9d9;
    height: 250px;
}
.chatBody .chatContent {
    padding: 5px 15px;
    font-size: 13px;
}
.chatBody .chatContent::-webkit-scrollbar {
    width: 5px;
}
.chatBody .chatContent::-webkit-scrollbar-thumb {
    background: #4B4B4B;
    border-radius: 10px;
}
.chatBody .chatContent::-webkit-scrollbar-track {
    background: #F2F2F2;
}
.chatBody .chatContent .feedbackContainer{
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 10px;
}
.chatBody .chatContent .feedbackContainer.selected{
    margin-bottom: 26px;
}
.chatBody .chatContent .feedbackContainer button{
    border: none !important;
    min-width: auto;
    padding: 0;
    height: 25px;
    width: auto;
    background: #FFF;
    cursor: pointer;
}
.chatBody .chatContent .feedbackContainer button img{
    width: 35px;
    margin-bottom: 16px;
    margin-right: 10px;
    transition: transform .2s ease, width .2s ease;
}
.chatBody .chatContent .feedbackContainer button img.thumbsdown-icon{
    transform: rotate(180deg);
}
.chatBody .chatContent .feedbackContainer button.selected img.thumbsdown-icon{
    width: 45px;
    transform: rotate(180deg) scale(1.2);
}
.chatBody .chatContent .feedbackContainer button.selected img{
    width: 45px;
    transform: scale(1.2);
}
.chatBody .chatContent .feedbackContainer button.disabled{
    pointer-events: none;
}

/* Typing indicator */
.typingContainer{
    display: flex;
    align-items: center;
    margin-left: 16px;
}
.typing-indicator {
    margin: 2px;
    width: fit-content;
    padding: 5px 10px;
    display: flex;
    gap: 4px;
    align-items: center;
}
.typing-indicator .dot {
    width: 4px;
    height: 4px;
    background-color: #000;
    border-radius: 50%;
    animation: typing 1s infinite;
}
.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.3s;
}
.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.6s;
}
@keyframes typing {
    0%, 100% {     opacity: .2; }
    50% { opacity: 1; }
}

/* Quick replies (optional) */
.quickRepliesContainer {
    padding: 5px;
    display: flex;
    gap: 5px;
    justify-content: center;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
}
.quickReplyBtn {
    background: #EFEFEF;
    border: 1px solid #CCC;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}
.quickReplyBtn:hover {
    background: #DDD;
}

/* Message input area */
.messageContainer {
    position: relative;
    padding: 15px;
}
.messageContainer .message {
    height: 45px;
    max-height: 115px;
    box-sizing: border-box;
    font-size: 14px;
    width: 100%;
    border-radius: 5px;
    font-family: '3MCircular-Book';
    resize: none;
    padding: 12px 40px 12px 12px;
    line-height: 1.5em;
    overflow-y: hidden;
}
.messageContainer .message::placeholder{
    color: #4B4B4B;
}
.messageContainer .message::-webkit-scrollbar{
    width: 5px;
    background: #d9d9d9;
}
.messageContainer .message::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}
.messageContainer .messageIcon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    right: 25px;
    bottom: 25px;
}
.hidden {
    display: none !important;
}

/* User messages */
.userMessageContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 15px 0;
}
.userMessage {
    color: #fff;
    padding: 10px;
    border-radius: 10px 10px 0 10px !important;
    background-color: #4b4b4b;
    text-align: right;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
    max-width: 225px;
    word-wrap: break-word;
}
.userMessageTime {
    font-size: 10px;
    color: #888;
    margin: 3px 0 0;
}

.botMessageTime,
.liveAgentTime {
    font-size: 14px;
    color: #4b4b4b;
    margin: -10px 43px 0;
}

.chatbotMessage,
.userMessage,
.liveAgentMessage{
    font-size: 16px;
}

/* Bot messages */
.chatbotMessageContainer,
.liveAgentMessageContainer {
    margin: 15px 0;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.chatbotIconContainer,
.liveAgentIconContainer {
    width: 32px;
    height: 32px;
    background: #1E1E96;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.liveAgentIconContainer{
    background: #FF0000;
}
.chatbotMessageIcon,
.liveAgentMessageIcon {
    width: 18px;
}
.chatbotMessage,
.liveAgentMessage {
    background: #f1f1f1;
    color: #4b4b4b;
    padding: 15px;
    border-radius: 10px 10px 10px 0 !important;
    max-width: 70%;
    margin: 0;
    line-height: 24px;
    word-wrap: break-word;
}

/* System/notifications */
.chatNotification {
    text-align: center;
    color: #4B4B4B;
    font-size: 12px;
    margin: 6px 0;
}

/* Survey styling (0-10 rating) */
.chatSurvey {
    padding: 10px;
}
.chatSurvey h2 {
    font-size: 15px;
    margin: 0 0 20px;
}
.chatSurvey .question {
    font-size: 11px;
    margin-bottom: 10px;
}
.chatSurvey .rating {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}
.ratingIndicator {
    font-size: 10px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.chatSurvey textarea {
    width: 100%;
    height: 80px;
    resize: none;
    font-size: 12px;
    margin-bottom: 10px;
    padding: 5px;
    box-sizing: border-box;
}
.checkbox-container {
    margin-bottom: 10px;
}

/* Overlays for session inactivity, ended, end chat */
.sessionInactiveContainer,
.waitingSessionContainer,
.sessionEndedContainer,
.alertContainer,
.endChatContainer,
.basicEndChatContainer,
.unavailableContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sessionEndedContainer{
    height: 100%;
}

.sessionInactiveContainer h2,
.sessionEndedContainer h2,
.waitingSessionContainer h2,
.alertContainer h2,
.endChatContainer h2,
.basicEndChatContainer h2,
.unavailableContainer h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}
.sessionInactiveContainer p,
.sessionEndedContainer p,
.waitingSessionContainer p,
.alertContainer p,
.endChatContainer p,
.basicEndChatContainer p,
.unavailableContainer p {
    margin: 28px 0;
    font-size: 17px;
    line-height: 18px;
    width: 360px;
    text-align: center;
}
.sessionInactiveContainer p span,
.sessionEndedContainer p span,
.waitingSessionContainer p span,
.alertContainer p span,
.endChatContainer p span,
.basicEndChatContainer p span,
.unavailableContainer p span{
    margin-bottom: 10px;
}
.unavailableContainer .firstPart,
.unavailableContainer .secondPart{
    display: flex;
    flex-direction: column;
    margin-top: 28px;
    text-align: center;
}
.unavailableContainer .firstPart span,
.unavailableContainer .secondPart span{
    margin: 3px 0;
    font-size: 17px;
}
.unavailableContainer .firstPart span.bolder{
    font-size: 18px;
    font-weight: 700;
}
.unavailableContainer img,
.waitingSessionContainer img,
.alertContainer img{
    width: 60px;
    margin-bottom: 28px;
}
.alertContainer p span{
    display: block;
}
.sessionInactiveContainer .buttonContainer,
.sessionEndedContainer .buttonContainer,
.endChatContainer .buttonContainer,
.basicEndChatContainer .buttonContainer {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.sessionEndedContainer .download{
    position: absolute;
    bottom: 0;
    width: 90%;
}
.warningIcon {
    width: 50px;
    margin-bottom: 28px;
}

/* Buttons */
button.submit,
button.cancel {
    background: #FF0000;
    color: #FFF;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 5px;
}
button.cancel {
    background: #4B4B4B;
}
button.submit:hover {
    background: #CC0000;
}

/* Download Transcript button style */
button.download {
    background: #1E1E96;
    color: #FFF;
    border: none;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 5px;
}
button.download:hover {
    background: #151578;
}
