/* Claude AI Chatbot Widget CSS */
/* Nahrajte do: /user/documents/upload/css/chatbot-widget.css */

#chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8bc34a 0%, #2e7d32 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: transform 0.3s ease;
}

#chatbot-button:hover {
    transform: scale(1.1);
}

#chatbot-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

#chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

#chatbot-container.open {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chatbot-header {
    background: linear-gradient(135deg, #8bc34a 0%, #2e7d32 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#chatbot-close:hover {
    background: rgba(255,255,255,0.2);
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    word-wrap: break-word;
    line-height: 1.5;
}

.message.user .message-bubble {
    background: #8bc34a;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-bubble {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 8px;
}

.loading {
    display: flex;
    gap: 4px;
    padding: 12px;
}

.loading span {
    width: 8px;
    height: 8px;
    background: #8bc34a;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

#chatbot-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
}

#chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

#chatbot-input:focus {
    border-color: #8bc34a;
}

#chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #8bc34a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#chatbot-send:hover {
    background: #2e7d32;
}

#chatbot-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.welcome-message {
    background: #e8f5e8;
    border: 1px solid #8bc34a;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    color: #2e7d32;
}

@media (max-width: 480px) {
    #chatbot-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        right: 10px;
        bottom: 80px;
    }
}