:root {
    --ai-chatbot-primary: #4a90e2;
    --ai-chatbot-secondary: #f5f5f5;
    --ai-chatbot-text: #333333;
    --ai-chatbot-text-light: #ffffff;
    --ai-chatbot-shadow: rgba(0, 0, 0, 0.1);
    --ai-chatbot-border: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ai-chatbot-primary: #2d5a8e;
        --ai-chatbot-secondary: #2c2c2c;
        --ai-chatbot-text: #ffffff;
        --ai-chatbot-text-light: #ffffff;
        --ai-chatbot-shadow: rgba(0, 0, 0, 0.3);
        --ai-chatbot-border: #404040;
    }
}

.ai-chatbot-container {
    position: fixed;
    z-index: 9999;
    bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    display: flex;
    justify-content: flex-end;
}

.ai-chatbot-container.bottom-right {
    right: 20px;
}
.ai-chatbot-container.bottom-left {
    left: 20px;
}

.ai-chatbot-button {
    background-color: var(--ai-chatbot-primary);
    color: var(--ai-chatbot-text-light);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--ai-chatbot-shadow);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chatbot-icon {
    font-size: 1px;
    line-height: 1;
}

.ai-chatbot-button:hover {
    transform: scale(1.1);
}

.ai-chatbot-widget {
    position: absolute;
    bottom: 80px;
    width: 350px;
    height: 500px;
    background-color: var(--ai-chatbot-secondary);
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--ai-chatbot-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

/* Position variants */
.ai-chatbot-container.bottom-left .ai-chatbot-widget {
    left: 0;
}

.ai-chatbot-container.bottom-right .ai-chatbot-widget {
    right: 0;
}

.ai-chatbot-widget.active {
    display: flex;
}

.ai-chatbot-header {
    background-color: var(--ai-chatbot-primary);
    color: var(--ai-chatbot-text-light);
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chatbot-close {
    background: none;
    border: none;
    color: var(--ai-chatbot-text-light);
    cursor: pointer;
    font-size: 20px;
    padding: 0;
}

.ai-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 13px;
}

.ai-chatbot-message {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.ai-chatbot-message.user {
    flex-direction: row-reverse;
}

.ai-chatbot-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ai-chatbot-primary);
    color: var(--ai-chatbot-text-light);
    font-size: 14px;
}

.ai-chatbot-message.user .ai-chatbot-avatar {
    background-color: var(--ai-chatbot-text);
}

.ai-chatbot-bubble {
    background-color: var(--ai-chatbot-primary);
    color: var(--ai-chatbot-text-light);
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 70%;
    word-wrap: break-word;
    font-size: 13px;
}

.ai-chatbot-message.user .ai-chatbot-bubble {
    background-color: var(--ai-chatbot-text);
}

.ai-chatbot-input-container {
    padding: 15px;
    border-top: 1px solid var(--ai-chatbot-border);
    background-color: var(--ai-chatbot-secondary);
}

.ai-chatbot-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--ai-chatbot-border);
    border-radius: 20px;
    outline: none;
    background-color: var(--ai-chatbot-secondary);
    color: var(--ai-chatbot-text);
}

.ai-chatbot-typing {
    display: none;
    padding: 10px 15px;
    color: var(--ai-chatbot-text);
    font-style: italic;
}

.ai-chatbot-typing.active {
    display: block;
}

@media (max-width: 480px) {
    .ai-chatbot-widget {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .ai-chatbot-button {
        width: 50px;
        height: 50px;
    }
}

/* Link styles */
.ai-chatbot-bubble a {
    color: var(--ai-chatbot-text-light);
    text-decoration: underline;
}

/* Button styles in messages */
.ai-chatbot-bubble .button {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background-color: var(--ai-chatbot-text-light);
    color: var(--ai-chatbot-primary);
    text-decoration: none;
    border-radius: 15px;
    transition: background-color 0.3s ease;
}

.ai-chatbot-bubble .button:hover {
    background-color: var(--ai-chatbot-border);
}


