/**
 * Chatbot Widget Styles
 * Styling für den schwebenden Chatbot
 */

/* Chatbot Container */
.chatbot-widget {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

/* Positionierung */
.chatbot-bottom-right {
    bottom: 20px;
    right: 20px;
}

.chatbot-bottom-left {
    bottom: 20px;
    left: 20px;
}

.chatbot-top-right {
    top: 20px;
    right: 20px;
}

.chatbot-top-left {
    top: 20px;
    left: 20px;
}

/* Chat Icon */
.chatbot-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.chatbot-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.chatbot-icon-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Notification Badge */
.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ff4757;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    animation: pulse 2s infinite;
}

.chatbot-notification.show {
    display: flex;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.chatbot-window.show {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.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: 20px;
}

.chatbot-info {
    flex: 1;
}

.chatbot-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close,
.chatbot-minimize {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s ease;
    font-size: 16px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close:hover,
.chatbot-minimize:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Body */
.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatbot-message.bot {
    display: flex;
    gap: 10px;
}

.chatbot-message.user {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.chatbot-message.bot .chatbot-message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chatbot-message.user .chatbot-message-avatar {
    background: #e9ecef;
    color: #6c757d;
}

.chatbot-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.chatbot-message.bot .chatbot-message-content {
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-message.user .chatbot-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chatbot-message-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.chatbot-message-text {
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Options */
.chatbot-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.chatbot-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 14px;
    color: #495057;
}

.chatbot-option:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-1px);
}

.chatbot-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* Chat Footer */
.chatbot-footer {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: none;
}

.chatbot-footer.show {
    display: block;
}

.chatbot-input-group {
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chatbot-input:focus {
    border-color: #667eea;
}

.chatbot-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chatbot-send:hover {
    transform: scale(1.05);
}

.chatbot-send svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Loading Animation */
.chatbot-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
}

.chatbot-loading-dots {
    display: flex;
    gap: 4px;
}

.chatbot-loading-dot {
    width: 6px;
    height: 6px;
    background: #6c757d;
    border-radius: 50%;
    animation: loadingDot 1.4s infinite ease-in-out;
}

.chatbot-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.chatbot-loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Form Elements */
.chatbot-form {
    margin-top: 15px;
}

.chatbot-form-group {
    margin-bottom: 15px;
}

.chatbot-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.chatbot-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.chatbot-form-input:focus {
    outline: none;
    border-color: #667eea;
}

.chatbot-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.chatbot-form-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
}

.chatbot-form-submit:hover {
    transform: translateY(-1px);
}

/* Success Message */
.chatbot-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #c3e6cb;
}

/* Error Message */
.chatbot-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: 20px;
        left: 20px;
    }
    
    .chatbot-icon {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Theme Variations */
.chatbot-dark .chatbot-window {
    background: #2c3e50;
    color: white;
}

.chatbot-dark .chatbot-body {
    background: #34495e;
}

.chatbot-dark .chatbot-message.bot .chatbot-message-content {
    background: #34495e;
    color: white;
}

.chatbot-dark .chatbot-option {
    background: #34495e;
    border-color: #4a5f7a;
    color: white;
}

.chatbot-dark .chatbot-option:hover {
    background: #4a5f7a;
}

.chatbot-dark .chatbot-input {
    background: #34495e;
    border-color: #4a5f7a;
    color: white;
}

.chatbot-light .chatbot-window {
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.chatbot-light .chatbot-header {
    background: #f8f9fa;
    color: #333;
}

.chatbot-light .chatbot-avatar {
    background: #e9ecef;
    color: #6c757d;
}

/* Accessibility */
.chatbot-widget:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.chatbot-option:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .chatbot-widget {
        display: none !important;
    }
}
