/* ===== SMART WAITER CHATBOT - PROFESSIONAL ===== */

/* Floating Button */
.chatbot-btn {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 9000;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: none;
    border: 3px solid #3db8a8;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(61, 184, 168, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: chatBtnFloat 3s ease-in-out infinite;
    overflow: hidden;
    padding: 0;
}

.chatbot-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chatbot-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 40px rgba(61, 184, 168, 0.55);
}

@keyframes chatBtnFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.chatbot-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #e05252, #c0392b);
    color: #fff;
    font-size: 11px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #1a1f2e;
    animation: badgePop 0.4s ease;
}

@keyframes badgePop {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 108px;
    left: 28px;
    z-index: 9001;
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 600px;
    max-height: calc(100vh - 130px);
    background: #12162280;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(61, 184, 168, 0.2);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(61, 184, 168, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.open {
    display: flex;
    animation: chatOpen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes chatOpen {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, rgba(61, 184, 168, 0.9), rgba(45, 138, 126, 0.95));
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.chatbot-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.chatbot-header .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chatbot-header .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-header .info {
    flex: 1;
}

.chatbot-header .info h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chatbot-header .info span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.chatbot-header .info span::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.chatbot-header .close-chat {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-header .close-chat:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, rgba(18, 22, 34, 0.95), rgba(26, 31, 46, 0.98));
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(61, 184, 168, 0.25);
    border-radius: 4px;
}

.chat-msg {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.7;
    animation: msgSlide 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes msgSlide {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-msg.bot {
    background: linear-gradient(135deg, #1e2436, #252b3b);
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(61, 184, 168, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.chat-msg.user {
    background: linear-gradient(135deg, #3db8a8, #2d8a7e);
    color: #fff;
    align-self: flex-end;
    border-bottom-left-radius: 4px;
    box-shadow: 0 3px 12px rgba(61, 184, 168, 0.3);
}

.chat-msg.bot .bot-label {
    font-size: 10px;
    color: #3db8a8;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Item Card */
.chat-item-card {
    background: linear-gradient(135deg, #1a2030, #1e2640);
    border: 1px solid rgba(61, 184, 168, 0.15);
    border-radius: 14px;
    overflow: hidden;
    margin: 6px 0;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chat-item-card:hover {
    border-color: rgba(61, 184, 168, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.chat-item-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.4s;
}

.chat-item-card:hover img {
    transform: scale(1.05);
}

.chat-item-card .card-body {
    padding: 12px 14px;
}

.chat-item-card .card-body h4 {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}

.chat-item-card .card-body .price {
    color: #3db8a8;
    font-weight: 900;
    font-size: 16px;
}

.chat-item-card .card-body .desc {
    color: #888;
    font-size: 11px;
    margin-top: 4px;
    line-height: 1.4;
}

.chat-item-card .card-body .add-btn {
    background: linear-gradient(135deg, #3db8a8, #2d8a7e);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    font-family: inherit;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(61, 184, 168, 0.25);
}

.chat-item-card .card-body .add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(61, 184, 168, 0.4);
}

/* Quick Buttons */
.chat-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chat-quick-btn {
    background: rgba(61, 184, 168, 0.1);
    border: 1px solid rgba(61, 184, 168, 0.25);
    color: #3db8a8;
    padding: 7px 14px;
    border-radius: 22px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.25s;
}

.chat-quick-btn:hover {
    background: linear-gradient(135deg, #3db8a8, #2d8a7e);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61, 184, 168, 0.3);
}

/* Input Area */
.chatbot-input {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(21, 26, 40, 0.95);
}

.chatbot-input input {
    flex: 1;
    background: rgba(37, 43, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.chatbot-input input::placeholder {
    color: #555;
}

.chatbot-input input:focus {
    border-color: rgba(61, 184, 168, 0.5);
    box-shadow: 0 0 15px rgba(61, 184, 168, 0.1);
}

.chatbot-input button {
    background: linear-gradient(135deg, #3db8a8, #2d8a7e);
    border: none;
    border-radius: 12px;
    width: 44px;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    transition: all 0.25s;
    box-shadow: 0 3px 10px rgba(61, 184, 168, 0.25);
}

.chatbot-input button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(61, 184, 168, 0.4);
}

/* Typing indicator */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #3db8a8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite both;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile */
@media(max-width:640px) {
    .chatbot-window {
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
    }

    .chatbot-btn {
        bottom: 20px;
        left: 20px;
        width: 60px;
        height: 60px;
    }

    .chat-item-card img {
        height: 120px;
    }
}

/* Tablet */
@media(min-width:641px) and (max-width:1024px) {
    .chatbot-window {
        width: 400px;
        height: 560px;
    }
}

/* Large Desktop */
@media(min-width:1400px) {
    .chatbot-window {
        width: 480px;
        height: 650px;
    }
}