/* ======================================================================
   IELTS AI Engine chatbot — DeshiPOS-style design (timeless theme),
   recolored to the IELTS brand (#635bff -> #8b5cf6).
   Light window + brand header + white avatar + gray AI bubbles +
   circular brand send button.  (DeshiPOS uses the same timeless theme.)
   Doubled class raises specificity over the bundled theme.
   ====================================================================== */
.mwai-timeless-theme.mwai-timeless-theme {
    --mwai-borderRadius: 12px;
    --mwai-fontColor: #1a1f2e;
    --mwai-backgroundPrimaryColor: #ffffff;
    --mwai-headerColor: #ffffff;
    --mwai-accentColor: #635bff;
    --mwai-backgroundHeaderColor: linear-gradient(130deg, #635bff 0%, #8b5cf6 100%);
    --mwai-backgroundUserColor: linear-gradient(130deg, #635bff 0%, #8b5cf6 100%);
    --mwai-backgroundAiColor: #f1f3f7;
    --mwai-borderColor: #e6e8f0;
}

/* Soft rounded window + shadow — only when OPEN, so the closed launcher
   bubble is never clipped by overflow:hidden. */
.mwai-timeless-theme.mwai-window.mwai-open {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 20px 55px rgba(20,16,60,.28) !important;
}

/* Keep the chatbot (launcher bubble + window) above all page content. */
.mwai-chatbot-container,
.mwai-chatbot-container .mwai-window,
.mwai-chatbot-container .mwai-trigger {
    z-index: 2147483000 !important;
}

/* Brand-colored launcher bubble (overrides the theme's default blue). */
.mwai-chatbot-container .mwai-icon-container {
    background: linear-gradient(130deg, #635bff 0%, #8b5cf6 100%) !important;
}

/* Remove per-message download button */
.mwai-download-button { display: none !important; }

/* Always show the send icon */
.mwai-timeless-theme .mwai-input .mwai-input-submit { opacity: 1 !important; }
.mwai-timeless-theme .mwai-input .mwai-input-submit svg { opacity: 1 !important; display: block !important; }

/* ======================================================================
   WhatsApp escalation button — WhatsApp's own brand green.
   ====================================================================== */
.mwai-chatbot-container a[href*="wa.me"],
.mwai-window a[href*="wa.me"],
.mwai-text a[href*="wa.me"] {
    display: inline-flex !important; align-items: center; gap: 9px;
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%) !important;
    color: #fff !important;
    padding: 10px 18px; border-radius: 12px; font-weight: 600;
    text-decoration: none !important; line-height: 1.2; margin-top: 8px;
    box-shadow: 0 4px 14px rgba(37,211,102,.40);
    transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.mwai-chatbot-container a[href*="wa.me"]:hover,
.mwai-window a[href*="wa.me"]:hover,
.mwai-text a[href*="wa.me"]:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37,211,102,.52);
}
.mwai-chatbot-container a[href*="wa.me"]::before,
.mwai-window a[href*="wa.me"]::before,
.mwai-text a[href*="wa.me"]::before {
    content: ""; width: 18px; height: 18px; flex: 0 0 18px;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27white%27%3E%3Cpath%20d%3D%27M12.04%202C6.58%202%202.13%206.45%202.13%2011.91c0%201.75.46%203.45%201.32%204.95L2%2022l5.25-1.38c1.45.79%203.08%201.21%204.79%201.21h.01c5.46%200%209.91-4.45%209.91-9.91C21.95%206.45%2017.5%202%2012.04%202zm5.8%2013.99c-.25.69-1.45%201.32-1.99%201.4-.51.08-1.15.11-1.86-.12-.43-.14-.98-.32-1.69-.62-2.97-1.28-4.91-4.27-5.06-4.47-.15-.2-1.21-1.61-1.21-3.07%200-1.46.77-2.18%201.04-2.48.27-.3.59-.37.79-.37.2%200%20.39.002.56.01.18.008.42-.07.66.5.25.59.84%202.04.91%202.19.07.15.12.32.02.52-.1.2-.15.32-.3.5-.15.17-.31.39-.45.52-.15.15-.3.31-.13.6.17.3.76%201.25%201.63%202.02%201.12%201%202.07%201.31%202.36%201.46.3.15.47.12.64-.07.17-.2.74-.86.94-1.16.2-.3.39-.25.66-.15.27.1%201.71.81%202%20.96.3.15.5.22.57.35.07.12.07.69-.18%201.38z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

/* ======================================================================
   General polish
   ====================================================================== */
/* Hide the elapsed-time counter inside the send button (kept the timestamps). */
.mwai-timer { display: none !important; }

/* Normal chat font; code blocks stay monospace. */
.mwai-chatbot-container, .mwai-window,
.mwai-chatbot-container .mwai-text,
.mwai-chatbot-container textarea, .mwai-chatbot-container input {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}
.mwai-chatbot-container pre, .mwai-chatbot-container pre code, .mwai-chatbot-container code {
    font-family: "SF Mono", Monaco, Consolas, "Courier New", monospace !important;
}
