#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999; /* Erhöht, um Menüs zu überlagern */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.chatbot-button {
    background: var(--primary-color, #3b82f6);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

.chatbot-button svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eee;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.chatbot-window.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.chatbot-header {
    background: var(--primary-color, #3b82f6);
    color: white;
    padding: 15px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    flex-shrink: 0;
}

.chatbot-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    font-size: 13px;
    line-height: 1.4;
    display: none; /* Erst nach Consent zeigen */
    flex-direction: column;
    gap: 10px;
}

.chatbot-main-content.consent-given .chatbot-messages {
    display: flex;
}

.bot-message, .user-message {
    padding: 10px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    animation: message-fade-in 0.3s ease forwards;
    flex-shrink: 0;
}

.bot-message {
    background: #eee;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-message {
    background: var(--primary-color, #3b82f6);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

@keyframes message-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatbot-input-area {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #eee;
    display: none; /* Erst nach Consent zeigen */
    gap: 10px;
    flex-shrink: 0;
}

.chatbot-main-content.consent-given .chatbot-input-area {
    display: flex;
}

.chatbot-input-area input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 13px;
}

.chatbot-input-area button {
    background: var(--primary-color, #3b82f6);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
}

/* Thinking Bubble Animation */
.thinking-bubble .dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: thinking-dot 1.4s infinite ease-in-out both;
}

.thinking-bubble .dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-bubble .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinking-dot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Consent Styles */
.chatbot-consent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    z-index: 10;
}

.chatbot-consent-content p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #333;
}

.chatbot-consent-content a {
    color: var(--primary-color, #3b82f6);
    text-decoration: underline;
}

.chatbot-consent-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.chatbot-consent-buttons button {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.chatbot-consent-accept {
    background: var(--primary-color, #3b82f6);
    color: white;
}

.chatbot-consent-decline {
    background: #eee;
    color: #666;
}
