#aica-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#aica-chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--aica-primary-color, #2563eb);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#aica-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#aica-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#aica-chat-header {
    background-color: var(--aica-primary-color, #2563eb);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.aica-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aica-bot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.aica-bot-name {
    font-weight: 600;
    font-size: 16px;
}

.aica-header-actions {
    display: flex;
    gap: 8px;
}

.aica-header-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.aica-header-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#aica-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #f9fafb;
}

.aica-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aica-message.user {
    align-items: flex-end;
}

.aica-message.bot {
    align-items: flex-start;
}

.aica-message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.5;
}

.aica-message.user .aica-message-content {
    background-color: var(--aica-primary-color, #2563eb);
    color: white;
    border-bottom-right-radius: 4px;
    text-align: right;
}

.aica-message.bot .aica-message-content {
    background-color: white;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aica-message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
}

.aica-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background-color: white;
    border-radius: 12px;
    width: fit-content;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.aica-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9ca3af;
    animation: typingDot 1.4s infinite;
}

.aica-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.aica-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

#aica-chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    background-color: white;
    border-top: 1px solid #e5e7eb;
}

#aica-chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    max-height: 120px;
    transition: border-color 0.2s;
}

#aica-chat-input:focus {
    border-color: var(--aica-primary-color, #2563eb);
}

#aica-send-btn {
    background-color: var(--aica-primary-color, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

#aica-send-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

#aica-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #aica-chatbot-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    #aica-chat-window {
        width: 100%;
        height: calc(100vh - 100px);
        max-height: 600px;
    }

    #aica-chat-bubble {
        width: 56px;
        height: 56px;
        position: absolute;
        right: 0;
    }
}

#aica-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#aica-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#aica-chat-messages::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}

#aica-chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}
