/* Logistik & Sicherheit AI Chatbot Styles */

#ls-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* Toggle Button */
.ls-chatbot-toggle {
    width: auto;
    min-width: 60px;
    height: 60px;
    border-radius: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 600;
    font-size: 0.95rem;
}

.ls-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.ls-chatbot-toggle .ls-chat-icon,
.ls-chatbot-toggle .ls-chat-text {
    display: block;
}

.ls-chatbot-toggle .ls-close-icon,
.ls-chatbot-toggle .ls-close-text {
    display: none;
}

.ls-chatbot-open .ls-chatbot-toggle .ls-chat-icon,
.ls-chatbot-open .ls-chatbot-toggle .ls-chat-text {
    display: none;
}

.ls-chatbot-open .ls-chatbot-toggle .ls-close-icon,
.ls-chatbot-open .ls-chatbot-toggle .ls-close-text {
    display: block;
}

/* Chat Window */
.ls-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.ls-chatbot-open .ls-chatbot-window {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.ls-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ls-chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ls-chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ls-chatbot-title {
    font-weight: 600;
    font-size: 1rem;
}

.ls-chatbot-status {
    font-size: 0.75rem;
    opacity: 0.9;
}

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

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

/* Messages */
.ls-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f7fafc;
}

.ls-message {
    margin-bottom: 1rem;
    display: flex;
}

.ls-message-bot {
    justify-content: flex-start;
}

.ls-message-user {
    justify-content: flex-end;
}

.ls-message-content {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ls-message-bot .ls-message-content {
    background: white;
    color: #1a202c;
    border-bottom-left-radius: 4px;
}

.ls-message-user .ls-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.ls-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
}

.ls-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typing 1.4s infinite;
}

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

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

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

/* Input */
.ls-chatbot-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
}

.ls-chatbot-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.ls-chatbot-input:focus {
    outline: none;
    border-color: #667eea;
}

.ls-chatbot-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.ls-chatbot-send-btn:hover {
    transform: scale(1.05);
}

.ls-chatbot-send-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #ls-chatbot-container {
        bottom: 0;
        right: 0;
        left: 0;
    }

    .ls-chatbot-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .ls-chatbot-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
    }
}
