.kemplox-chat-container {
    position: fixed;
    z-index: 9998;
}

.kemplox-chat-toggle {
    padding: 10px;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.kemplox-chat-widget {
    width: 400px;
    height: 500px;
    background: white;
    border: 2px solid;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.kemplox-chat-header {
    padding: 15px;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.kemplox-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
}

.kemplox-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kemplox-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 90%;
    word-wrap: break-word;
}

.kemplox-message-user {
    background: #007bff;
    color: white;
    align-self: flex-end;
}

.kemplox-message-bot {
    background: #f1f3f4;
    color: #333;
    align-self: flex-start;
}

.kemplox-loading-message {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kemplox-loading-dots {
    display: flex;
    gap: 3px;
}

.kemplox-loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #666;
    animation: kemplox-pulse 1.5s ease-in-out infinite;
}

.kemplox-loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.kemplox-loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes kemplox-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.kemplox-message-bot p {
    margin: 5px 0;
}

.kemplox-message-bot ul, .kemplox-message-bot ol {
    margin: 5px 0;
    padding-left: 20px;
}

.kemplox-message-bot li {
    margin: 3px 0;
}

.kemplox-message-bot strong, .kemplox-message-bot b {
    font-weight: bold;
}

.kemplox-message-bot em, .kemplox-message-bot i {
    font-style: italic;
}

.kemplox-message-bot code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

.kemplox-message-bot pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 5px 0;
}

.kemplox-message-bot a {
    color: #007bff;
    text-decoration: underline;
}

.kemplox-message-bot a:hover {
    color: #0056b3;
}

.kemplox-message-bot blockquote {
    border-left: 3px solid #007bff;
    padding-left: 10px;
    margin: 5px 0;
    color: #6c757d;
}

.kemplox-retry-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 5px;
    display: inline-block;
}

.kemplox-retry-link:hover {
    color: #0056b3;
}

.kemplox-chat-input {
    padding: 15px;
    display: flex;
    gap: 10px;
}

.kemplox-chat-message {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.kemplox-chat-send {
    padding: 10px 10px;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kemplox-loading-wave {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kemplox-loading-bar {
    width: 3px;
    height: 12px;
    background-color: #666;
    border-radius: 2px;
    animation: kemplox-wave 1.2s ease-in-out infinite;
}

.kemplox-loading-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.kemplox-loading-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.kemplox-loading-bar:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes kemplox-wave {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.8);
    }
}

@media(max-width:767px) {
    .kemplox-chat-widget {
        width: 300px;
    }
}

.kemplox-chat-container.inline-mode {
    position: relative;
    top: 0!important;
    right: 0!important;
    left: 0!important;
    bottom: 0!important;
    margin-bottom: 30px;
}

.kemplox-chat-container.inline-mode .kemplox-chat-widget {
    height: 300px;
    width: 100%!important;
}