:root {
    --chatbot-primary: #E7272D;
    --chatbot-primary-dark: #fee2e2;
    --chatbot-bg: #fee2e2;
    --chatbot-user-msg: #E7272D;
    --chatbot-bot-msg: #fee2e2;
    --chatbot-text: #333333;
    --chatbot-text-light: #666666;
    --chatbot-border: #fee2e2;
    --chatbot-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--chatbot-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--chatbot-shadow);
    z-index: 9999;
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    background: var(--chatbot-primary-dark);
    transform: scale(1.05);
}

.chatbot-toggle i {
    color: white;
    font-size: 24px;
}

.chatbot-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

.chatbot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 550px;
    background: var(--chatbot-bg);
    border-radius: 16px;
    box-shadow: var(--chatbot-shadow);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
}

.chatbot-container.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    background: var(--chatbot-primary);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.chatbot-header-info i {
    font-size: 24px;
}

.chatbot-title {
    display: block;
    font-weight: 600;
    font-size: 16px;
}

.chatbot-status {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 6px;
}

.chatbot-close {
    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;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fafafa;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.chat-message {
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    align-self: flex-end;
}

.user-message .message-content {
    background: var(--chatbot-user-msg);
    color: white;
    border-radius: 16px 16px 4px 16px;
    padding: 12px 16px;
}

.bot-message {
    align-self: flex-start;
}

.bot-message .message-content {
    background: var(--chatbot-bot-msg);
    color: var(--chatbot-text);
    border-radius: 16px 16px 16px 4px;
    padding: 12px 16px;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

.message-time {
    display: block;
    font-size: 10px;
    opacity: 0.7;
    margin-top: 6px;
    text-align: right;
}

.message-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.option-btn {
    background: white;
    border: 1px solid var(--chatbot-primary);
    color: var(--chatbot-primary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background: var(--chatbot-primary);
    color: white;
}

.menu-cards-container {
    max-width: 100%;
}

.menu-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-menu-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: row;
    transition: transform 0.2s;
}

.chat-menu-card:hover {
    transform: translateY(-2px);
}

.chat-menu-card .card-image {
    width: 100px;
    min-width: 100px;
    height: 100px;
}

.chat-menu-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-menu-card .card-content {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chat-menu-card .card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--chatbot-text);
    line-height: 1.3;
}

.chat-menu-card .card-description {
    margin: 4px 0;
    font-size: 11px;
    color: var(--chatbot-text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-menu-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0;
}

.chat-menu-card .diet-tag {
    background: #fff3f3;
    color: var(--chatbot-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.chat-menu-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.chat-menu-card .card-price {
    font-weight: 700;
    color: var(--chatbot-primary);
    font-size: 14px;
}

.chat-menu-card .card-add-btn {
    background: var(--chatbot-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.chat-menu-card .card-add-btn:hover {
    background: var(--chatbot-primary-dark);
}

.typing .message-content {
    padding: 16px 20px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s 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);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

.chatbot-quick-options {
    padding: 8px 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: white;
    border-top: 1px solid var(--chatbot-border);
}

.chatbot-quick-options::-webkit-scrollbar {
    display: none;
}

.quick-option {
    background: #fff3f3;
    border: 1px solid #fecaca;
    color: var(--chatbot-primary);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-option:hover {
    background: var(--chatbot-primary);
    border-color: var(--chatbot-primary);
    color: white;
}

.chatbot-input-container {
    display: flex;
    padding: 12px;
    gap: 10px;
    background: white;
    border-top: 1px solid var(--chatbot-border);
}

#chatbot-input {
    flex: 1;
    border: 1px solid var(--chatbot-border);
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: var(--chatbot-primary);
}

#chatbot-input::placeholder {
    color: #999;
}

.chatbot-send {
    width: 44px;
    height: 44px;
    background: var(--chatbot-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-send:hover {
    background: var(--chatbot-primary-dark);
}

.chatbot-send i {
    font-size: 16px;
}

@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100% - 20px);
        height: calc(100% - 100px);
        bottom: 10px;
        right: 10px;
        border-radius: 12px;
    }

    .chatbot-toggle {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .chat-menu-card .card-image {
        width: 80px;
        min-width: 80px;
        height: 80px;
    }
}
