/* ================= META FUTURE SMART CHATBOT ================= */
.mfc-chat-root {
    --mfc-navy: #0A2540;
    --mfc-navy-mid: #002E5B;
    --mfc-emerald: #10B981;
    --mfc-emerald-dark: #059669;
    --mfc-surface: #FFFFFF;
    --mfc-bg: #F4F7FB;
    --mfc-border: #E2E8F0;
    --mfc-text: #0F172A;
    --mfc-muted: #475569;
    font-family: 'Geologica', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: fixed;
    bottom: 94px;
    right: 24px;
    z-index: 10000;
}

.mfc-chat-root.mfc-no-wa {
    bottom: 24px;
}

.mfc-chat-launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--mfc-navy) 0%, var(--mfc-navy-mid) 100%);
    color: #FFFFFF;
    border: 1px solid rgba(110, 231, 183, 0.38);
    border-radius: 999px;
    padding: 11px 18px 11px 13px;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(10, 37, 64, 0.34);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.mfc-chat-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(10, 37, 64, 0.44);
}

.mfc-launcher-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mfc-emerald-dark) 0%, var(--mfc-emerald) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.mfc-launcher-icon svg {
    width: 17px;
    height: 17px;
    fill: #FFFFFF;
}

.mfc-launcher-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34D399;
    border: 2px solid var(--mfc-navy);
}

.mfc-chat-window {
    position: fixed;
    bottom: 94px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 24px);
    height: min(550px, calc(100vh - 116px));
    padding: 0;
    margin: 0;
    background: var(--mfc-surface);
    border: 1px solid var(--mfc-border);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(10, 37, 64, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 10001;
}

.mfc-chat-root.mfc-no-wa .mfc-chat-window {
    bottom: 24px;
}

.mfc-chat-root.is-open .mfc-chat-window {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mfc-chat-root.is-open .mfc-chat-launcher {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.mfc-chat-header {
    background: linear-gradient(135deg, #071A2E 0%, var(--mfc-navy-mid) 100%);
    color: #FFFFFF;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.mfc-chat-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mfc-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--mfc-emerald-dark) 0%, var(--mfc-emerald) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 15px;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.mfc-chat-title-wrap strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.25;
}

.mfc-chat-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #A7F3D0;
}

.mfc-chat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34D399;
}

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

.mfc-header-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.2s ease;
}

.mfc-header-btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

.mfc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: var(--mfc-bg);
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.mfc-msg {
    display: flex;
    flex-direction: column;
    max-width: 88%;
    animation: mfcFadeIn 0.2s ease;
}

.mfc-msg.is-bot {
    align-self: flex-start;
}

.mfc-msg.is-user {
    align-self: flex-end;
}

.mfc-bubble {
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    word-wrap: break-word;
}

.mfc-msg.is-bot .mfc-bubble {
    background: #FFFFFF;
    color: var(--mfc-text);
    border: 1px solid var(--mfc-border);
    border-top-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(10, 37, 64, 0.04);
}

.mfc-msg.is-user .mfc-bubble {
    background: linear-gradient(135deg, var(--mfc-navy) 0%, var(--mfc-navy-mid) 100%);
    color: #FFFFFF;
    border-top-right-radius: 4px;
}

.mfc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.mfc-chip {
    background: #FFFFFF;
    color: var(--mfc-navy);
    border: 1px solid #CBD5E1;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12.2px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.mfc-chip:hover {
    background: #ECFDF5;
    border-color: var(--mfc-emerald);
    color: var(--mfc-emerald-dark);
}

.mfc-chip.is-primary {
    background: var(--mfc-emerald-dark);
    border-color: var(--mfc-emerald-dark);
    color: #FFFFFF;
}

.mfc-chip.is-primary:hover {
    background: var(--mfc-navy);
    border-color: var(--mfc-navy);
    color: #FFFFFF;
}

.mfc-svc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.mfc-svc-item {
    background: #F8FAFC;
    border: 1px solid var(--mfc-border);
    border-radius: 10px;
    padding: 9px 11px;
}

.mfc-svc-item strong {
    display: block;
    font-size: 13px;
    color: var(--mfc-navy);
    margin-bottom: 2px;
}

.mfc-svc-item span {
    display: block;
    font-size: 12px;
    color: var(--mfc-muted);
    line-height: 1.4;
    margin-bottom: 7px;
}

.mfc-svc-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mfc-svc-links a,
.mfc-svc-links button {
    font-size: 11.8px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid transparent;
}

.mfc-svc-links a {
    background: #EFF6FF;
    color: var(--mfc-navy);
    border-color: #DBEAFE;
}

.mfc-svc-links a:hover {
    background: var(--mfc-navy);
    color: #FFFFFF;
}

.mfc-svc-links button {
    background: #ECFDF5;
    color: var(--mfc-emerald-dark);
    border-color: #A7F3D0;
}

.mfc-svc-links button:hover {
    background: var(--mfc-emerald-dark);
    color: #FFFFFF;
}

/* Interactive FAQ Question List & Answer Card */
.mfc-faq-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.mfc-faq-btn {
    width: 100%;
    text-align: left;
    background: #F8FAFC;
    border: 1px solid var(--mfc-border);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--mfc-navy);
    font-size: 12.6px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.18s ease;
}

.mfc-faq-btn:hover {
    background: #ECFDF5;
    border-color: var(--mfc-emerald);
    color: var(--mfc-emerald-dark);
    transform: translateX(2px);
}

.mfc-faq-btn .mfc-q-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    background: #EFF6FF;
    color: var(--mfc-navy);
    font-size: 11px;
    font-weight: 700;
    margin-top: 1px;
}

.mfc-faq-btn:hover .mfc-q-badge {
    background: var(--mfc-emerald-dark);
    color: #FFFFFF;
}

.mfc-faq-btn .mfc-q-text {
    flex: 1;
}

.mfc-faq-btn .mfc-q-arrow {
    color: var(--mfc-emerald-dark);
    font-weight: 700;
    flex-shrink: 0;
}

.mfc-faq-q-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--mfc-emerald-dark);
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid #F1F5F9;
}

.mfc-faq-answer-body ul {
    margin: 6px 0 2px 16px;
    padding: 0;
}

.mfc-faq-answer-body li {
    margin-bottom: 4px;
}

.mfc-faq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.mfc-faq-actions a,
.mfc-faq-actions button {
    font-size: 11.8px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid transparent;
}

.mfc-faq-actions a {
    background: #EFF6FF;
    color: var(--mfc-navy);
    border-color: #DBEAFE;
}

.mfc-faq-actions a:hover {
    background: var(--mfc-navy);
    color: #FFFFFF;
}

.mfc-faq-actions button {
    background: #ECFDF5;
    color: var(--mfc-emerald-dark);
    border-color: #A7F3D0;
}

.mfc-faq-actions button:hover {
    background: var(--mfc-emerald-dark);
    color: #FFFFFF;
}

/* Live Typing Question Suggestions */
.mfc-suggest-bar {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: #F8FAFC;
    border-top: 1px solid var(--mfc-border);
    max-height: 132px;
    overflow-y: auto;
    flex-shrink: 0;
}

.mfc-suggest-bar.is-visible {
    display: flex;
}

.mfc-suggest-item {
    width: 100%;
    text-align: left;
    background: #FFFFFF;
    border: 1px solid var(--mfc-border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12.4px;
    font-weight: 500;
    color: var(--mfc-navy);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.15s ease;
}

.mfc-suggest-item:hover {
    background: #ECFDF5;
    border-color: var(--mfc-emerald);
    color: var(--mfc-emerald-dark);
}

.mfc-guide-next {
    margin-top: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #F0FDF4;
    border-left: 3px solid var(--mfc-emerald);
    font-size: 12.4px;
    color: #065F46;
}

.mfc-guide-next strong {
    display: block;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

/* AI Formatted Lists, Links, Document Checklists & Typing Indicator */
.mfc-bubble ul {
    margin: 6px 0 4px 18px;
    padding: 0;
}

.mfc-bubble li {
    margin-bottom: 4px;
}

.mfc-bubble a.mfc-inline-link {
    color: var(--mfc-emerald-dark);
    font-weight: 600;
    text-decoration: underline;
}

.mfc-doc-card {
    margin-top: 8px;
    background: #F8FAFC;
    border: 1px solid var(--mfc-border);
    border-radius: 10px;
    padding: 10px 12px;
}

.mfc-doc-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.mfc-doc-card-head strong {
    font-size: 13px;
    color: var(--mfc-navy);
}

.mfc-doc-timeline {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
    white-space: nowrap;
}

.mfc-doc-card ul {
    margin: 4px 0 0 16px;
    padding: 0;
    font-size: 12.4px;
    color: var(--mfc-muted);
}

.mfc-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
}

.mfc-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94A3B8;
    animation: mfcBounce 1.2s infinite ease-in-out;
}

.mfc-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.mfc-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes mfcBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Lead Callback Form inside Chat */
.mfc-lead-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.mfc-lead-form input,
.mfc-lead-form select,
.mfc-lead-form textarea {
    width: 100%;
    padding: 8px 10px;
    margin: 0;
    min-height: 0;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 12.8px;
    font-family: inherit;
    color: var(--mfc-text);
    background: #FFFFFF;
    outline: none;
    box-sizing: border-box;
}

.mfc-lead-form input:focus,
.mfc-lead-form select:focus,
.mfc-lead-form textarea:focus {
    border-color: var(--mfc-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.mfc-lead-submit {
    background: linear-gradient(135deg, var(--mfc-emerald-dark) 0%, var(--mfc-emerald) 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.mfc-lead-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.mfc-form-err {
    color: #B91C1C;
    font-size: 12px;
    font-weight: 600;
}

.mfc-handoff-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 14px;
    background: #FFFFFF;
    border-top: 1px solid var(--mfc-border);
    font-size: 12px;
}

.mfc-handoff-bar a {
    color: var(--mfc-navy);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mfc-handoff-bar a.wa-link {
    color: #059669;
}

.mfc-handoff-bar a:hover {
    text-decoration: underline;
}

.mfc-chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #FFFFFF;
    border-top: 1px solid var(--mfc-border);
    flex-shrink: 0;
}

.mfc-chat-input-bar input {
    flex: 1;
    margin: 0;
    min-height: 0;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--mfc-text);
    background: #F8FAFC;
    outline: none;
    min-width: 0;
}

.mfc-chat-input-bar input:focus {
    background: #FFFFFF;
    border-color: var(--mfc-emerald);
}

.mfc-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--mfc-navy) 0%, var(--mfc-navy-mid) 100%);
    color: #FFFFFF;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.mfc-send-btn:hover {
    background: linear-gradient(135deg, var(--mfc-emerald-dark) 0%, var(--mfc-emerald) 100%);
}

.mfc-send-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

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

@media (max-width: 600px) {
    .mfc-chat-root {
        bottom: 90px;
        right: 16px;
    }
    .mfc-chat-launcher span.mfc-launcher-label {
        display: none;
    }
    .mfc-chat-launcher {
        padding: 10px;
    }
    .mfc-chat-window {
        right: 12px;
        bottom: 84px;
        width: calc(100vw - 24px);
        height: 72vh;
        max-height: calc(100vh - 104px);
    }
}
