/* AI Chat Widget Styles */

.ai-chat-button {
    position: fixed;
    z-index: 9999;
    background: #111318;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
    transition: all 0.3s ease;
}

.ai-chat-button:hover {
    background: #ffffff;
    color: #111318;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17, 19, 24, 0.5);
}

.ai-chat-button.bottom-right {
    bottom: 20px;
    right: 20px;
}

.ai-chat-button.bottom-left {
    bottom: 20px;
    left: 20px;
}

.ai-chat-window {
    position: fixed;
    z-index: 9998;
    width: 400px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(17, 19, 24, 0.3);
    display: none;
    flex-direction: column;
    transition: all 0.3s ease;
    color: #111318;
}

.ai-chat-window.open {
    display: flex;
}

.ai-chat-window.bottom-right {
    bottom: 90px;
    right: 20px;
}

.ai-chat-window.bottom-left {
    bottom: 90px;
    left: 20px;
}

.ai-chat-header {
    background: #111318;
    color: #ffffff;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ffffff !important;
    font-weight: 600;
}

.ai-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ai-chat-close:hover {
    background: #ffffff;
    color: #111318;
    transform: scale(1.1);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
    color: #111318;
}

.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-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    word-wrap: break-word;
}

.ai-chat-message.user .ai-chat-bubble {
    background: #111318;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.ai-chat-message.ai .ai-chat-bubble {
    background: #ffffff;
    color: #111318;
    border: 1px solid #111318;
    border-bottom-left-radius: 4px;
}

.ai-chat-message.system .ai-chat-bubble {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    max-width: 100%;
    text-align: center;
}

.ai-chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.ai-chat-typing span {
    width: 8px;
    height: 8px;
    background: #111318;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ai-chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.ai-chat-input-area {
    padding: 15px 20px;
    background: #ffffff;
    border-top: 1px solid #111318;
    border-radius: 0 0 16px 16px;
}

.ai-chat-input-form {
    display: flex;
    gap: 10px;
}

.ai-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #111318;
    border-radius: 24px;
    font-size: 14px;
    color: #111318;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chat-input:focus {
    border-color: #111318;
    box-shadow: 0 0 0 2px rgba(17, 19, 24, 0.2);
}

.ai-chat-send {
    background: #111318;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-send:hover {
    background: #ffffff;
    color: #111318;
    border: 2px solid #111318;
    transform: scale(1.05);
}

.ai-chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-chat-window {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        border-radius: 0;
    }
    
    .ai-chat-button {
        bottom: 15px;
        right: 15px;
    }
}

/* Unread indicator */
.ai-chat-unread {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Offline indicator */
.ai-chat-offline-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #dc3545;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

/* Chat Integration Buttons */
.ai-chat-integration-btn,
.ai-chat-shortcode-btn {
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.ai-chat-integration-btn:hover,
.ai-chat-shortcode-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Shortcode Button Styles */
.ai-chat-style-primary {
    background: #111318;
    color: #ffffff;
    border: 2px solid #111318;
}

.ai-chat-style-primary:hover {
    background: #ffffff;
    color: #111318;
}

.ai-chat-style-secondary {
    background: #ffffff;
    color: #111318;
    border: 2px solid #111318;
}

.ai-chat-style-secondary:hover {
    background: #111318;
    color: #ffffff;
}

.ai-chat-style-outline {
    background: transparent;
    color: #111318;
    border: 2px solid #111318;
}

.ai-chat-style-outline:hover {
    background: #111318;
    color: #ffffff;
}

/* Button Sizes */
.ai-chat-size-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
}

.ai-chat-size-medium {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
}

.ai-chat-size-large {
    padding: 16px 32px;
    font-size: 18px;
    border-radius: 8px;
}

/* Image Support */
.ai-chat-image-container {
    margin: 8px 0;
    text-align: center;
}

.ai-chat-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ai-chat-image:hover {
    transform: scale(1.02);
}

.ai-chat-image-error {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    color: #6c757d;
    font-size: 14px;
}

/* Image Modal (for clicking to view larger) */
.ai-image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.ai-image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.ai-image-modal img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* Feedback Buttons */
.ai-chat-feedback {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.ai-chat-message:hover .ai-chat-feedback {
    opacity: 1;
}

.ai-feedback-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.ai-feedback-btn:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.ai-feedback-btn.thumbs-up:hover {
    background: #e8f5e9;
    border-color: #4caf50;
}

.ai-feedback-btn.thumbs-down:hover {
    background: #ffebee;
    border-color: #f44336;
}

.ai-feedback-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback-thanks {
    color: #4caf50;
    font-size: 14px;
    font-weight: 500;
}

