:root {}

.chatbot-widget-container {
    position: fixed;
    right: 30px;
    bottom: 65px;
    z-index: 9995;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media screen and (min-width: 768px) {
    .chatbot-widget-container::after {
        content: '';
        position: absolute;
        top: calc(100% + 30px);
        left: 50%;
        transform: translateX(-50%) scale(1);
        background: #dcd6f8;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        margin: auto;
        z-index: -1;
        opacity: 0;
        /*transition: 0.2s;*/
    }
    .chatbot-widget-container.active::after {
        animation: bounceBall 0.5s ease-out forwards;
        opacity: 1;
    }
}

.chatbot-widget-toggle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #dcd6f8;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
    padding-top: 5px;
    box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;
}

.chatbot-widget-toggle-icon {
    width: 100%;
    height: 100%;
    display: inline-block;
    background-image: url('../assets/images/jan-mitra-avatar.png');
    /*background-image: url('/themes/custom/zrixai/images/Thinking.gif');*/
    /*background-image: url('/themes/custom/zrixai/images/Typing.gif');*/
    /*background-image: url('/themes/custom/zrixai/images/Wait.gif');*/
    background-size: 100%;
    background-repeat: no-repeat;
    border-radius: 100%;
    transition: background-image 0.3s ease;
}

/*.chatbot-widget-toggle.chat-started:hover .chatbot-widget-toggle-icon {*/
/*    background-image: url('/themes/custom/zrixai/images/Wait.gif');*/
/*}*/

/*.chatbot-widget-toggle:hover .chatbot-widget-toggle-icon {*/
/*    background-image: url('/themes/custom/zrixai/images/Hello.gif');*/
/*}*/

/*.chatbot-widget-toggle.typing-started .chatbot-widget-toggle-icon {*/
/*    background-image: url('/themes/custom/zrixai/images/Thinking.gif');*/
/*}*/

/*.chatbot-widget-toggle.bot-typing .chatbot-widget-toggle-icon {*/
/*    background-image: url('/themes/custom/zrixai/images/Typing.gif');*/
/*}*/

/*.chatbot-widget-toggle.message-sent .chatbot-widget-toggle-icon {*/
/*    background-image: url('/themes/custom/zrixai/images/Wait.gif');*/
/*}*/

/* .chatbot-widget-toggle:hover .chatbot-widget-toggle-icon {
    background-image: url('/themes/custom/zrixai/images/Wait.gif');
} */



.chatbot-widget-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: #ffffff;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    animation: chatbot-pulse 1.5s infinite;
}

.chatbot-widget-window {
    width: 350px;
    height: 500px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    position: absolute;
    bottom: 90px;
    right: 0;
}

.chatbot-widget-window.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chatbot-widget-header {
    background: #dcd6f8;
    color: #000000;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-widget-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.1rem;
    color: #000000;
}

.chatbot-widget-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dcd6f8;
    font-weight: bold;
    font-size: 18px;
}

.chatbot-widget-close {
    background: none;
    border: none;
    color: #000000;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s;
}

.chatbot-widget-close:hover {
    transform: rotate(90deg);
}

.chatbot-widget-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-widget-message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    position: relative;
    animation: chatbot-fadeIn 0.3s ease;
}

.chatbot-widget-bot-message {
    background: #e9ecf1;
    color: #333;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}

.chatbot-widget-user-message {
    background: #dcd6f8;
    color: #000000;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

.chatbot-widget-input {
    display: flex;
    padding: 15px;
    background: #ffffff;
    border-top: 1px solid #eee;
    gap: 10px;
}

.chatbot-widget-input input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s;
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
}

.chatbot-widget-input input:focus {
    border-color: #dcd6f8;
}

.chatbot-widget-input button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #dcd6f8;
    color: #000000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    flex-shrink: 0;
}

.chatbot-widget-input button:hover {
    background: #c3b9f6;
}

.chatbot-widget-input button i {
    font-size: 20px;
}

.chatbot-widget-typing-indicator {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: #e9ecf1;
    border-radius: 18px;
    width: fit-content;
    margin-top: 5px;
}

.chatbot-widget-typing-indicator span {
    height: 8px;
    width: 8px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: chatbot-typing 1s infinite;
}

.chatbot-widget-typing-indicator span:nth-child(2) {input
    animation-delay: 0.2s;
}

.chatbot-widget-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

.chatbot-widget-toggle-title {
    position: absolute;
    left: 50%;
    font-size: 14px;
    font-weight: bold;
    background-color: #dcd6f8;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    padding: 2px 8px;
    transform: translateX(-50%);
    width: calc(100% + 5px);
    bottom: -35px;
    color: #000000;
    text-align: center;
}

/* Cyber Rakshak CSS */
.chatbot-widget-cyber-rakshak {
    right: 150px;
    z-index: 9994;
}
.chatbot-widget-cyber-rakshak::after {
    background-color: #c82612;
}
.chatbot-widget-cyber-rakshak .chatbot-widget-toggle {
    background-color: #c82612
}
.chatbot-widget-cyber-rakshak .chatbot-widget-toggle-icon {
    background-image: url('../assets/images/cyber-rakshak-avatar.png');
}
.chatbot-widget-cyber-rakshak .chatbot-widget-toggle-title {
    width: calc(100% + 44px);
    background: #c82612;
    color: #ffffff;
}
.chatbot-widget-cyber-rakshak .chatbot-widget-header {
    background: #c82612;
    color: #ffffff;
}
.chatbot-widget-cyber-rakshak .chatbot-widget-header h3 {
    color: #ffffff;
}
.chatbot-widget-cyber-rakshak .chatbot-widget-close {
    color: #ffffff;
}
.chatbot-widget-cyber-rakshak .chatbot-widget-user-message {
    background: #c82612;
    color: #ffffff;
}
.chatbot-widget-cyber-rakshak .chatbot-widget-input input:focus {
    border-color: #c82612;
}
.chatbot-widget-cyber-rakshak .chatbot-widget-input button {
    background: #c82612;
    color: #ffffff;
}
.chatbot-widget-cyber-rakshak .chatbot-widget-input button:hover {
    background: #a31e0e;
}

/* Harit Shakti */
.chatbot-widget-harit-shakti {
    right: 279px;
    z-index: 9993;
}
.chatbot-widget-harit-shakti::after {
    background-color: #53dc6d;
}
.chatbot-widget-harit-shakti .chatbot-widget-toggle {
    padding-top: 0;
}
.chatbot-widget-harit-shakti .chatbot-widget-toggle-icon {
    background-image: url('../assets/images/harit-shakti-avatar.png');
}
.chatbot-widget-harit-shakti .chatbot-widget-toggle-title {
    width: calc(100% + 23px);
    background-color: #53dc6d;
}
.chatbot-widget-harit-shakti .chatbot-widget-header {
    background: #53dc6d;
}
.chatbot-widget-harit-shakti .chatbot-widget-user-message {
    background: #53dc6d;
    color: #000000;
}
.chatbot-widget-harit-shakti .chatbot-widget-input input:focus {
    border-color: #53dc6d;
}
.chatbot-widget-harit-shakti .chatbot-widget-input button {
    background: #53dc6d;
    color: #000000;
}
.chatbot-widget-harit-shakti .chatbot-widget-input button:hover {
    background: #44b65a;
}

@keyframes chatbot-typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .chatbot-widget-window {
        width: 68vw;
        right: 68px !important;
        /*left: 5vw !important;*/
        bottom: 5px;
        max-width: 320px;
    }
    
    .chatbot-widget-cyber-rakshak .chatbot-widget-window {
        bottom: -90px;
    }
    
    .chatbot-widget-harit-shakti .chatbot-widget-window {
        bottom: -158px;   
    }

    .chatbot-widget-toggle {
        width: 60px;
        height: 60px;
        /*bottom: 20px;*/
        /*right: 20px;*/
    }
    
    .chatbot-widget-toggle-title {
        font-size: 12px;
        width: calc(100% + 14px);
    }
    
    .chatbot-widget-cyber-rakshak {
        bottom: 165px;
        right: 30px;
    }
    .chatbot-widget-harit-shakti {
        bottom: 270px;
        right: 30px;
    }
    
    .chatbot-widget-harit-shakti .chatbot-widget-toggle-title {
        width: calc(100% + 30px);
    }
    
    .chatbot-widget-cyber-rakshak .chatbot-widget-toggle-title {
        width: calc(100% + 48px);
    }
}

@keyframes chatbot-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes chatbot-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceBall {
  0% {
    /*transform: translateX(-50%) translateY(-30px);*/
    top: calc(100% + 50px);
    opacity: 1;
  }
  10% {
    /*transform: translateX(-50%) translateY(-10px);*/
    top: calc(100% + 40px);
  }
  30% {
    /*transform: translateX(-50%) translateY(-30px);*/
    top: calc(100% + 50px);
  }
  50% {
    /*transform: translateX(-50%) translateY(10px);*/
    top: calc(100% + 44px);
  }
  70% {
    /*transform: translateX(-50%) translateY(-10px);*/
    top: calc(100% + 50px);
  }
  90% {
    /*transform: translateX(-50%) translateY(5px);*/
    top: calc(100% + 48px);
  }
  100% {
    /*transform: translateX(-50%) translateY(0px);*/
    top: calc(100% + 50px);
  }
}