#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: var(--raiko-font-family, inherit);
    --raiko-primary: #4169E1;
    --raiko-surface: #F3F4F5;
    --raiko-panel: #FFFFFF;
    --raiko-text: #0C0C0C;
    --raiko-border: #333333;
    --raiko-font-header: 1.1rem;
    --raiko-font-message: 15px;
    --raiko-font-input: 0.9rem;
    --raiko-font-badge: 0.85rem;
    --raiko-font-credit: 0.7rem;
    --raiko-font-suggest: 0.7rem;
}

#chatbot-icon {
    width: 55px;
    height: 55px;
    background: var(--raiko-primary);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 24px;
    transition: transform 0.2s;
}

#chatbot-icon:hover {
    transform: scale(1.05);
}

#chatbot-badge {
    position: absolute;
    right: 70px;
    bottom: 8px;
    background: var(--raiko-panel);
    color: var(--raiko-text);
    border: 1px solid var(--raiko-border);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: var(--raiko-font-badge);
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 220px;
    z-index: 1001;
    align-items: center;
    gap: 10px;
}

#chatbot-badge #chatbot-badge-close {
    cursor: pointer;
    margin-left: auto;
    font-weight: bold;
}

#chatbot-window {
    width: 350px;
    height: 500px;
    background: var(--raiko-surface);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 50px;
    right: 0;
}

#chatbot-header {
    background: var(--raiko-primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-header h3 {
    font-size: var(--raiko-font-header);
    font-weight: 700;
    margin: 0;
    color: white;
}

#chatbot-header-buttons {
    display: flex;
    gap: 20px;
}

#chatbot-header-buttons i {
    cursor: pointer;
    font-size: 1rem;
}

#chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: var(--raiko-panel);
}

.chatbot-message {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: var(--raiko-font-message);
    line-height: 1.5;
}

.chatbot-message.user {
    margin-left: 20%;
    background: var(--raiko-surface);
    text-align: right;
    color: var(--raiko-text);
}

.chatbot-message.bot {
    margin-right: 20%;
    background: var(--raiko-surface);
    text-align: left;
    color: var(--raiko-text);
}

#chatbot-input-container {
    padding: 15px;
    background: var(--raiko-panel);
    border-top: 1px solid var(--raiko-border);
}

#chatbot-input-wrapper {
    display: flex;
    gap: 10px;
}

#chatbot-user-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--raiko-border);
    border-radius: 25px;
    outline: none;
    font-size: var(--raiko-font-input);
    background: var(--raiko-surface);
    color: var(--raiko-text);
}

#chatbot-send {
    width: 45px;
    height: 45px;
    background: var(--raiko-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#chatbot-send:hover {
    background: #3158d1;
}

#chatbot-send:disabled {
    background: var(--raiko-surface);
    cursor: not-allowed;
}

.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    justify-content: flex-end;
}

.chatbot-suggestion {
    background: var(--raiko-panel);
    color: var(--raiko-text);
    border: 1px solid var(--raiko-text);
    border-radius: 15px;
    padding: 5px 10px;
    font-size: var(--raiko-font-suggest);
    cursor: pointer;
    font-weight: normal;
}

.typing {
    position: relative;
}

.typing::after {
    content: '...';
    position: absolute;
    animation: typing 1s infinite;
}

@keyframes typing {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

#chatbot-credit {
    text-align: center;
    padding: 10px;
    font-size: var(--raiko-font-credit);
    color: var(--raiko-text);
    border-top: 1px solid var(--raiko-border);
}

#chatbot-credit a {
    color: var(--raiko-primary);
    text-decoration: none;
}

#chatbot-credit a:hover {
    text-decoration: underline;
}

#chatbot-messages a {
    color: var(--raiko-primary);
    text-decoration: underline;
}

@media (max-width: 600px) {
    #chatbot-container {
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: auto;
        width: auto;
        padding: 0;
    }

    #chatbot-icon {
        width: 55px;
        height: 55px;
        font-size: 25px;
    }

    #chatbot-window {
        width: calc(100vw - 40px);
        max-width: 350px;
        height: 70vh;
        max-height: 70vh;
        bottom: 50px;
        right: 0;
        left: auto;
        transform: none;
        border-radius: 16px;
    }

    .chatbot-message {
        max-width: 90%;
    }

    .chatbot-message.user {
        margin-left: 10%;
    }

    .chatbot-message.bot {
        margin-right: 10%;
    }

    .chatbot-suggestions {
        justify-content: flex-end;
    }

    .chatbot-suggestion {
        font-size: var(--raiko-font-suggest);
        padding: 5px 10px;
        font-weight: normal;
    }
}
