/* ===== REGULAR CHATBOT STYLES ===== */
.muegli-chatbot-container {
    border: 2px solid #006699;
    padding: 20px;
    max-width: 600px;
    background: #f9f9f9;
    font-family: Arial, sans-serif;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.muegli-header {
    font-size: 20px;
    margin-bottom: 10px;
    color: #006699;
    font-weight: bold;
}

.muegli-questions {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.muegli-questions li {
    background: #e0f0ff;
    margin: 5px 0;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    border: 1px solid #cce4ff;
}

.muegli-questions li:hover {
    background: #cce4ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.muegli-input {
    margin-top: 20px;
    position: relative;
}

#muegli-user-question {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

#muegli-submit {
    margin-top: 10px;
    padding: 12px 20px;
    background-color: #006699;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

#muegli-submit:hover {
    background-color: #005577;
}

#muegli-answer {
    margin-top: 15px;
    font-weight: bold;
    color: #333;
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#muegli-feedback {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.muegli-feedback-btn {
    margin: 0 5px;
    padding: 8px 12px;
    background: #e0f0ff;
    border: 1px solid #006699;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.muegli-feedback-btn:hover {
    background: #006699;
    color: white;
}

#muegli-speak {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #009933;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#muegli-speak:hover {
    background-color: #007722;
}

#muegli-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 1000;
    max-height: 150px;
    overflow-y: auto;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.muegli-suggestion {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.muegli-suggestion:hover {
    background-color: #f0f8ff;
}

.muegli-suggestion:last-child {
    border-bottom: none;
}

/* ===== POPUP CHATBOT STYLES ===== */

/* Chat Button (always visible) */
#muegli-popup-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.muegli-chat-btn {
    background: linear-gradient(135deg, #006699, #0088cc);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,102,153,0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.muegli-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,153,0.4);
    background: linear-gradient(135deg, #005577, #0077bb);
}

.muegli-chat-icon {
    font-size: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Popup Overlay */
.muegli-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

/* Popup Container */
.muegli-popup-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Popup Header */
.muegli-popup-header {
    background: linear-gradient(135deg, #006699, #0088cc);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.muegli-popup-title {
    font-size: 18px;
    font-weight: bold;
}

.muegli-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.muegli-popup-close:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Popup Body */
.muegli-popup-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    max-height: 50vh;
}

.muegli-welcome-message {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #006699;
}

.muegli-welcome-message p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.muegli-quick-questions h4 {
    color: #006699;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.muegli-popup-body .muegli-questions {
    margin-bottom: 20px;
}

.muegli-popup-body .muegli-questions li {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 14px;
    padding: 8px 12px;
}

.muegli-popup-body .muegli-questions li:hover {
    background: #e9ecef;
    border-color: #006699;
}

.muegli-popup-body .muegli-input {
    margin-top: 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.muegli-popup-body #muegli-user-question {
    flex: 1;
    margin: 0;
}

.muegli-submit-btn {
    background: #006699;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.muegli-submit-btn:hover {
    background: #005577;
}

/* Chat History */
#muegli-chat-history {
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
}

.muegli-chat-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
}

.muegli-chat-user {
    background: #e3f2fd;
    text-align: right;
    margin-left: 20%;
}

.muegli-chat-bot {
    background: #f5f5f5;
    margin-right: 20%;
}

/* Actions */
.muegli-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.muegli-action-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.muegli-action-btn:hover {
    background: #218838;
}

.muegli-feedback-label {
    font-size: 14px;
    color: #666;
}

.muegli-popup-body .muegli-feedback-btn {
    padding: 6px 10px;
    margin: 0 3px;
    font-size: 12px;
    min-width: 40px;
}

.muegli-feedback-yes:hover {
    background: #28a745;
    border-color: #28a745;
}

.muegli-feedback-no:hover {
    background: #dc3545;
    border-color: #dc3545;
}

/* Popup Footer */
.muegli-popup-footer {
    padding: 10px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    text-align: center;
}

.muegli-powered-by {
    font-size: 12px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .muegli-popup-container {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 90vh;
    }
    
    .muegli-popup-body {
        padding: 15px;
    }
    
    .muegli-chat-btn {
        min-width: 60px;
        padding: 12px;
        border-radius: 50%;
    }
    
    .muegli-chat-text {
        display: none;
    }
    
    .muegli-popup-body .muegli-input {
        flex-direction: column;
        gap: 10px;
    }
    
    .muegli-submit-btn {
        width: 100%;
    }
    
    .muegli-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    #muegli-popup-trigger {
        bottom: 15px;
        right: 15px;
    }
    
    .muegli-popup-body .muegli-questions li {
        font-size: 13px;
        padding: 6px 10px;
    }
}