/**
 * Chat CSS for AI Smart Chat Pro
 */
.ai-chat-widget {
    position: fixed;
    bottom: 80px;
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ai-chat-widget-right {
    right: 20px;
}

.ai-chat-widget-left {
    left: 20px;
}

.ai-chat-widget-closed {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.ai-chat-widget-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ai-chat-widget-header {
    padding: 15px;
    background-color: #4e44ce;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-widget-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.ai-chat-widget-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ai-chat-widget-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.ai-chat-widget-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f5f7fb;
}

.ai-chat-widget-footer {
    padding: 10px 15px;
    border-top: 1px solid #e2e8f0;
}

.ai-chat-widget-form {
    display: flex;
}

.ai-chat-widget-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    font-size: 14px;
    outline: none;
}

.ai-chat-widget-input:focus {
    border-color: #4e44ce;
    box-shadow: 0 0 0 2px rgba(78, 68, 206, 0.2);
}

.ai-chat-widget-send {
    margin-left: 10px;
    padding: 8px 16px;
    background-color: #4e44ce;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ai-chat-widget-send:hover {
    background-color: #3d35a1;
}

.ai-chat-widget-toggle {
    position: fixed;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4e44ce;
    color: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    transition: transform 0.2s ease;
}

.ai-chat-widget-toggle:hover {
    transform: scale(1.05);
}

.ai-chat-widget-toggle-right {
    right: 20px;
}

.ai-chat-widget-toggle-left {
    left: 20px;
}

.ai-chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.ai-chat-message-user {
    align-items: flex-end;
}

.ai-chat-message-ai {
    align-items: flex-start;
}

.ai-chat-message-content {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.ai-chat-message-user .ai-chat-message-content {
    background-color: #4e44ce;
    color: #fff;
    border-top-right-radius: 4px;
}

.ai-chat-message-ai .ai-chat-message-content {
    background-color: #e2e8f0;
    color: #1e293b;
    border-top-left-radius: 4px;
}

.ai-chat-loading-dots {
    display: flex;
    justify-content: center;
}

.ai-chat-loading-dots span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #a0aec0;
    border-radius: 50%;
    animation: ai-chat-loading 1.4s infinite ease-in-out both;
}

.ai-chat-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-chat-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes ai-chat-loading {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Shortcode styles */
.ai-chat-shortcode {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
}

.ai-chat-shortcode-header {
    padding: 15px;
    background-color: #4e44ce;
    color: #fff;
}

.ai-chat-shortcode-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.ai-chat-shortcode-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f5f7fb;
    min-height: 300px;
}

.ai-chat-shortcode-footer {
    padding: 10px 15px;
    border-top: 1px solid #e2e8f0;
}

.ai-chat-shortcode-form {
    display: flex;
}

.ai-chat-shortcode-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    font-size: 14px;
    outline: none;
}

.ai-chat-shortcode-input:focus {
    border-color: #4e44ce;
    box-shadow: 0 0 0 2px rgba(78, 68, 206, 0.2);
}

.ai-chat-shortcode-send {
    margin-left: 10px;
    padding: 8px 16px;
    background-color: #4e44ce;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ai-chat-shortcode-send:hover {
    background-color: #3d35a1;
}

/* Responsive styles */
@media (max-width: 480px) {
    .ai-chat-widget {
        width: calc(100% - 40px);
        height: 60vh;
    }
}
