/* assets/css/chatbot.css - Namespaced Mayur Creation Chatbot Styling */

/* ── Container & Floating Trigger ──────────────────────────────── */
.mc-chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.mc-chatbot-launcher {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8E3A7C 0%, #5D2457 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(142, 58, 124, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.mc-chatbot-launcher:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 30px -4px rgba(142, 58, 124, 0.5), 0 10px 12px -5px rgba(0, 0, 0, 0.15);
}

.mc-chatbot-launcher:active {
    transform: scale(0.95);
}

.mc-chatbot-pulse {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid #FF7EB6;
    animation: mcPulse 2s infinite;
    opacity: 0.7;
    pointer-events: none;
}

@keyframes mcPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0.2; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.mc-chatbot-launcher-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mc-chatbot-launcher-badge {
    position: absolute;
    top: -8px;
    right: -6px;
    background: #D4AF37;
    color: #111111;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* ── Modal Main Window ─────────────────────────────────────────── */
.mc-chatbot-modal {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: mcSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999999;
}

.mc-chatbot-modal.hidden {
    display: none !important;
}

@keyframes mcSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Header ────────────────────────────────────────────────────── */
.mc-chatbot-header {
    background: linear-gradient(135deg, #5D2457 0%, #8E3A7C 100%);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(93, 36, 87, 0.15);
}

.mc-chatbot-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-chatbot-title {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #ffffff;
}

.mc-chatbot-subtitle {
    font-size: 10px;
    color: #FFD8E7;
    margin: 2px 0 0 0;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.mc-chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mc-chatbot-header-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mc-chatbot-header-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ── Chat Stream Body ──────────────────────────────────────────── */
.mc-chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #FDF6F8;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

.mc-chatbot-body::-webkit-scrollbar {
    width: 5px;
}
.mc-chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}
.mc-chatbot-body::-webkit-scrollbar-thumb {
    background: rgba(142, 58, 124, 0.2);
    border-radius: 4px;
}

.mc-chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Message Bubbles ───────────────────────────────────────────── */
.mc-chatbot-msg-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: mcFadeIn 0.3s ease-out forwards;
}

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

.mc-chatbot-msg-group.bot {
    align-items: flex-start;
}

.mc-chatbot-msg-group.user {
    align-items: flex-end;
}

.mc-chatbot-bubble {
    max-width: 86%;
    padding: 12px 15px;
    font-size: 12.5px;
    line-height: 1.5;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.mc-chatbot-bubble.bot-bubble {
    background: #ffffff;
    color: #333333;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(142, 58, 124, 0.1);
}

.mc-chatbot-bubble.user-bubble {
    background: linear-gradient(135deg, #8E3A7C 0%, #5D2457 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.mc-chatbot-bubble p {
    margin: 0 0 6px 0;
}
.mc-chatbot-bubble p:last-child {
    margin-bottom: 0;
}
.mc-chatbot-bubble strong {
    color: #8E3A7C;
}
.mc-chatbot-bubble.user-bubble strong {
    color: #FFD8E7;
}

/* ── Typing Indicator ──────────────────────────────────────────── */
.mc-chatbot-typing {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.typing-bubble {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
}

.mc-typing-dot {
    width: 6px;
    height: 6px;
    background: #8E3A7C;
    border-radius: 50%;
    animation: mcTyping 1.4s infinite ease-in-out both;
}

.mc-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.mc-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes mcTyping {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.mc-typing-text {
    font-size: 11px;
    color: #8E3A7C;
    margin-left: 4px;
    font-weight: 500;
}

/* ── Options / Buttons Panel ──────────────────────────────────── */
.mc-chatbot-options-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
    width: 100%;
}

.mc-option-btn {
    background: #ffffff;
    color: #5D2457;
    border: 1px solid rgba(142, 58, 124, 0.25);
    border-radius: 12px;
    padding: 9px 13px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.mc-option-btn:hover {
    background: #8E3A7C;
    color: #ffffff;
    border-color: #8E3A7C;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(142, 58, 124, 0.2);
}

.mc-option-btn:active {
    transform: translateY(0);
}

.mc-option-btn.back-btn {
    background: #F3E8EE;
    color: #5D2457;
    border-color: rgba(93, 36, 87, 0.15);
}
.mc-option-btn.back-btn:hover {
    background: #5D2457;
    color: #ffffff;
}

.mc-option-btn.main-menu-btn {
    background: #FFF5FA;
    color: #8E3A7C;
    border-color: rgba(142, 58, 124, 0.3);
}

/* ── Product Cards Container ──────────────────────────────────── */
.mc-product-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
}

.mc-product-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(142, 58, 124, 0.15);
    padding: 10px;
    display: flex;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mc-product-card:hover {
    border-color: #8E3A7C;
    transform: translateY(-2px);
}

.mc-product-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    background: #FDF6F8;
    flex-shrink: 0;
}

.mc-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mc-product-name {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.mc-product-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.mc-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #8E3A7C;
}

.mc-product-mrp {
    font-size: 10px;
    color: #888888;
    text-decoration: line-through;
}

.mc-product-specs {
    font-size: 10px;
    color: #555555;
    line-height: 1.4;
    margin-bottom: 8px;
}

.mc-product-actions {
    display: flex;
    gap: 6px;
}

.mc-btn-view {
    background: #8E3A7C;
    color: #ffffff;
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.2s ease;
}

.mc-btn-view:hover {
    background: #5D2457;
}

.mc-btn-wa {
    background: #25D366;
    color: #ffffff;
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mc-btn-wa:hover {
    background: #128C7E;
}

/* ── Footer Quick Actions Bar ──────────────────────────────────── */
.mc-chatbot-footer-actions {
    padding: 10px 14px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mc-quick-btn {
    flex: 1;
    background: #FDF6F8;
    color: #5D2457;
    border: 1px solid rgba(142, 58, 124, 0.2);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mc-quick-btn:hover {
    background: #8E3A7C;
    color: #ffffff;
}

.mc-quick-btn.whatsapp-btn {
    background: #E8F8EF;
    color: #128C7E;
    border-color: rgba(37, 211, 102, 0.3);
}

.mc-quick-btn.whatsapp-btn:hover {
    background: #25D366;
    color: #ffffff;
}

/* ── Mobile Responsive Adjustments ────────────────────────────── */
@media (max-width: 480px) {
    .mc-chatbot-widget {
        bottom: 16px;
        right: 16px;
    }
    .mc-chatbot-modal {
        bottom: 84px;
        right: 16px;
        width: calc(100vw - 32px);
        height: 500px;
        border-radius: 16px;
    }
    .mc-chatbot-bubble {
        max-width: 90%;
        font-size: 12px;
    }
    .mc-option-btn {
        padding: 8px 11px;
        font-size: 11px;
    }
}
