/* Festival-Chatbot Styling */

/* Chat-Icon */
.chatbot-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #dcad61;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 9999;
}

.chatbot-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chatbot-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Chat-Container */
.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 400px;
    height: 500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 9998;
}

.chatbot-container.open {
    display: flex;
}

/* Header */
.chatbot-header {
    background-color: #5B5B66;
    color: white;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-title {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
}

.chatbot-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Privacy Consent */
.chatbot-consent {
    padding: 24px;
    text-align: center;
}

.chatbot-consent h3 {
    margin: 0 0 12px 0;
    color: #5B5B66;
    font-size: 18px;
}

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

.chatbot-consent a {
    color: #dcad61;
    text-decoration: none;
}

.chatbot-consent a:hover {
    text-decoration: underline;
}

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

.chatbot-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.chatbot-btn-accept {
    background-color: #dcad61;
    color: white;
}

.chatbot-btn-accept:hover {
    background-color: #c89a4f;
}

.chatbot-btn-decline {
    background-color: #e0e0e0;
    color: #666;
}

.chatbot-btn-decline:hover {
    background-color: #d0d0d0;
}

/* Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8f8f8;
}

.chatbot-message {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
}

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

.chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chatbot-message.user .chatbot-message-avatar {
    background: #dcad61;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.chatbot-message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.4;
    font-size: 14px;
}

.chatbot-message.bot .chatbot-message-bubble {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
}

.chatbot-message.user .chatbot-message-bubble {
    background: #dcad61;
    color: white;
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    max-width: fit-content;
}

.chatbot-typing-text {
    font-size: 14px;
    color: #666;
}

.chatbot-typing-dots {
    display: flex;
    gap: 4px;
}

.chatbot-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #666;
    animation: typing 1.4s infinite;
}

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

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

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

/* Input */
.chatbot-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 8px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.chatbot-input:focus {
    border-color: #dcad61;
}

.chatbot-send {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background-color: #dcad61;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-send:hover {
    background-color: #c89a4f;
}

.chatbot-send:disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-icon {
        width: 60px;
        height: 60px;
    }
    
    .chatbot-container {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 90vh;
        border-radius: 12px 12px 0 0;
    }
    
    .chatbot-input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .chatbot-icon {
        width: 55px;
        height: 55px;
    }
    
    .chatbot-container {
        width: 380px;
        height: 80vh;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .chatbot-icon {
        width: 50px;
        height: 50px;
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Links in Messages */
.chatbot-message-bubble a {
    color: inherit;
    text-decoration: underline;
}

.chatbot-message.bot .chatbot-message-bubble a {
    color: #dcad61;
}