/* DineBot Styles - Lightweight and Mobile Responsive */

/* ========== GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ========== CONTAINER ========== */
.container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    max-height: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========== HEADER ========== */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bot-avatar {
    font-size: 40px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.header-text h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========== QUICK SUGGESTIONS ========== */
.quick-suggestions {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
}

.suggestion-btn {
    background: white;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.suggestion-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

/* ========== CHAT CONTAINER ========== */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

/* Custom scrollbar */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========== MESSAGES ========== */
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

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

.message-avatar {
    font-size: 32px;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: 15px;
    border-radius: 12px;
    max-width: 70%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    line-height: 1.6;
}

.message-content p {
    margin-bottom: 10px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin-left: 20px;
    margin-top: 8px;
}

.message-content li {
    margin-bottom: 5px;
}

/* User message styling */
.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
}

/* ========== MENU ITEMS DISPLAY ========== */
.menu-items {
    margin-top: 10px;
}

.menu-item {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.menu-item-name {
    font-weight: 600;
    color: #2d3748;
}

.menu-item-price {
    color: #667eea;
    font-weight: 600;
}

.menu-item-description {
    font-size: 14px;
    color: #718096;
    margin-top: 5px;
}

.menu-item-tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.tag {
    background: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

/* ========== TYPING INDICATOR ========== */
.typing-indicator {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px 20px;
    background: #f8f9fa;
}

.typing-dots {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

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

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

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

/* ========== INPUT AREA ========== */
.input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

#chatForm {
    display: flex;
    gap: 10px;
}

#userInput {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#userInput:focus {
    border-color: #667eea;
}

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

#sendBtn:hover {
    transform: scale(1.1);
}

#sendBtn:active {
    transform: scale(0.95);
}

.send-icon {
    font-size: 20px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .chat-header {
        padding: 15px;
    }

    .header-text h1 {
        font-size: 20px;
    }

    .bot-avatar {
        font-size: 32px;
    }

    .message-content {
        max-width: 85%;
    }

    .quick-suggestions {
        padding: 10px;
    }

    .suggestion-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .message-content {
        max-width: 90%;
        padding: 12px;
    }

    .message-avatar {
        font-size: 28px;
    }

    #userInput {
        font-size: 14px;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.error-message {
    color: #e53e3e;
    font-weight: 500;
}