/* ChatBot Interface Styles */

.chatbot-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.chatbot-header {
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-header .model-selector {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.chatbot-header .model-selector:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.message {
    display: flex;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-user {
    justify-content: flex-end;
}

.message-bot {
    justify-content: flex-start;
}

.message p {
    margin: 0;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 70%;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
}

.message-user p {
    background-color: #667eea;
    color: white;
    border-bottom-right-radius: 2px;
}

.message-bot p {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 2px;
}

.chatbot-input-area {
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    background-color: white;
    border-radius: 0 0 8px 8px;
}

.chatbot-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chatbot-send-btn {
    padding: 10px 20px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.chatbot-send-btn:hover:not(:disabled) {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chatbot-send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 16px;
    flex-wrap: wrap;
}

.chatbot-quick-btn {
    padding: 6px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    white-space: nowrap;
}

.chatbot-quick-btn:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        height: 600px;
    }

    .message p {
        max-width: 85%;
    }

    .chatbot-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .chatbot-header .model-selector {
        width: 100%;
    }
}

/* Floating Chat Widget */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 600px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    background: white;
}

.chatbot-widget-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 999;
}

.chatbot-widget-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chatbot-widget-toggle.active {
    display: none;
}

/* Order Summary Widget */
.order-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 8px;
    margin: 12px;
}

.order-summary h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 8px;
    font-weight: 600;
    font-size: 16px;
}

/* Loading State */
.chatbot-loading {
    display: flex;
    gap: 4px;
    padding: 12px;
}

.chatbot-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #667eea;
    animation: bounce 1.4s infinite;
}

.chatbot-loading span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-loading span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Error State */
.message-error {
    background-color: #f8d7da !important;
    border-left: 4px solid #f5c6cb;
}

.message-error p {
    color: #721c24;
}

/* Success State */
.message-success {
    background-color: #d4edda !important;
    border-left: 4px solid #c3e6cb;
}

.message-success p {
    color: #155724;
}
