/* ===== Floating widgets: WhatsApp FAB + FAQ Chatbot ===== */
/* Uses the site's existing design tokens (kept in sync with about-us.html):
   --red:#C8102E --red-light:#fef2f4 --red-hover:#a00e24 --dark:#1a1a1a
   --gray-bg:#f8f9fa --text:#333333 --text-muted:#666666 --border:#e8e8e8 */

#mc-widgets * { box-sizing: border-box; }

#mc-widgets .mc-fab {
    position: fixed; right: 20px; width: 56px; height: 56px; border-radius: 50%;
    border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22); transition: transform 0.2s, background 0.25s;
    z-index: 999;
}
#mc-widgets .mc-fab:hover { transform: translateY(-2px); }
#mc-widgets .mc-fab:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 4px rgba(200,16,46,0.35); }

#mc-widgets .mc-fab--whatsapp { bottom: 20px; background: #25D366; color: #fff; text-decoration: none; }
#mc-widgets .mc-fab--whatsapp:hover { background: #1ebe5b; }

#mc-widgets .mc-fab--chat { bottom: 92px; background: var(--red, #C8102E); color: #fff; z-index: 1000; }
#mc-widgets .mc-fab--chat:hover { background: var(--red-hover, #a00e24); }
#mc-widgets .mc-fab--chat .mc-icon-close { display: none; }
#mc-widgets .mc-fab--chat.mc-open .mc-icon-chat { display: none; }
#mc-widgets .mc-fab--chat.mc-open .mc-icon-close { display: block; }

/* ===== Chat window ===== */
#mc-widgets .mc-chat-window {
    position: fixed; right: 20px; bottom: 164px; width: 360px;
    max-height: min(70vh, 560px); height: 500px;
    background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
    display: flex; flex-direction: column;
    z-index: 1001;
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
#mc-widgets .mc-chat-window.mc-open { opacity: 1; visibility: visible; transform: translateY(0); }

#mc-widgets .mc-chat-header {
    background: var(--red, #C8102E); color: #fff; padding: 16px 18px;
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
#mc-widgets .mc-chat-header-text strong { display: block; font-size: 14px; font-weight: 800; letter-spacing: 0.2px; }
#mc-widgets .mc-chat-header-text span { display: block; font-size: 11.5px; opacity: 0.85; margin-top: 2px; }
#mc-widgets .mc-chat-close {
    background: rgba(255,255,255,0.18); border: none; color: #fff; width: 28px; height: 28px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
    flex-shrink: 0; transition: background 0.2s;
}
#mc-widgets .mc-chat-close:hover { background: rgba(255,255,255,0.32); }
#mc-widgets .mc-chat-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

#mc-widgets .mc-chat-messages {
    flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
    background: #fff;
}
#mc-widgets .mc-msg { max-width: 84%; font-size: 13px; line-height: 1.6; padding: 10px 13px; border-radius: 12px; }
#mc-widgets .mc-msg--bot { align-self: flex-start; background: var(--gray-bg, #f8f9fa); color: var(--text, #333); border-bottom-left-radius: 4px; }
#mc-widgets .mc-msg--user { align-self: flex-end; background: var(--red-light, #fef2f4); color: var(--dark, #1a1a1a); border-bottom-right-radius: 4px; }

#mc-widgets .mc-typing { display: flex; align-items: center; gap: 4px; padding: 13px; }
#mc-widgets .mc-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted, #666);
    opacity: 0.5; animation: mc-typing-bounce 1.1s infinite ease-in-out;
}
#mc-widgets .mc-typing span:nth-child(2) { animation-delay: 0.15s; }
#mc-widgets .mc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes mc-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

#mc-widgets .mc-chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 100%; }
#mc-widgets .mc-chip {
    background: var(--red-light, #fef2f4); color: var(--red, #C8102E); border: 1px solid var(--red-light, #fef2f4);
    border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
#mc-widgets .mc-chip:hover { background: var(--red, #C8102E); color: #fff; }
#mc-widgets .mc-chip:focus-visible { outline: 2px solid var(--red, #C8102E); outline-offset: 2px; }

#mc-widgets .mc-chat-footer { border-top: 1px solid var(--border, #e8e8e8); padding: 10px 12px; flex-shrink: 0; background: #fff; }
#mc-widgets .mc-whatsapp-link { display: block; text-align: center; font-size: 11.5px; color: var(--text-muted, #666); margin-bottom: 8px; text-decoration: none; }
#mc-widgets .mc-whatsapp-link:hover { color: var(--red, #C8102E); }
#mc-widgets .mc-chat-form { display: flex; gap: 8px; }
#mc-widgets .mc-chat-input {
    flex: 1; border: 1px solid var(--border, #e8e8e8); border-radius: 8px; padding: 10px 12px;
    font-size: 13px; font-family: inherit; color: var(--text, #333); outline: none;
}
#mc-widgets .mc-chat-input:focus { border-color: var(--red, #C8102E); }
#mc-widgets .mc-chat-send {
    background: var(--red, #C8102E); color: #fff; border: none; border-radius: 8px; width: 40px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s;
}
#mc-widgets .mc-chat-send:hover { background: var(--red-hover, #a00e24); }
#mc-widgets .mc-chat-send:focus-visible { outline: 2px solid var(--red, #C8102E); outline-offset: 2px; }

/* ===== Mobile ===== */
@media (max-width: 640px) {
    #mc-widgets .mc-fab { right: 12px; width: 52px; height: 52px; }
    #mc-widgets .mc-fab--whatsapp { bottom: 12px; }
    #mc-widgets .mc-fab--chat { bottom: 76px; }
    #mc-widgets .mc-chat-window {
        left: 0; right: 0; bottom: 0; width: 100%; height: 88vh; max-height: 88vh;
        border-radius: 16px 16px 0 0;
    }
}
