/* Website chatbot: "Ask" launcher (partials/chatbot.blade.php) + full-page chat (chatbot/page.blade.php) */
:root {
    --fs-brand: #6c2cf2;
    --fs-brand-2: #d946ef;
    --fs-brand-dark: #4c1d95;
    --fs-blue: #3b82f6;
    --fs-bg: #ffffff;
    --fs-page: #f6f5fb;
    --fs-text: #1f2333;
    --fs-muted: #6b7083;
    --fs-border: #e6e3f2;
    --fs-error: #c62828;
}

.fs-chatbot__sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Launcher on the website ---------- */
@keyframes fsLauncherPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(76, 29, 149, 0.22), 0 0 0 0 rgba(108, 44, 242, 0.25);
        border-color: #ece8fb;
    }
    50% {
        box-shadow: 0 12px 34px rgba(76, 29, 149, 0.32), 0 0 0 4px rgba(108, 44, 242, 0.16);
        border-color: #c4b5fd;
    }
}
@keyframes fsLauncherShimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}
.fs-chatbot__launcher {
    position: fixed; right: 20px; bottom: 20px; z-index: 9990;
    display: flex; align-items: center; gap: 10px;
    padding: 6px 18px 6px 6px; border-radius: 999px;
    background: #fff; color: #1f2333 !important; text-decoration: none !important;
    border: 1.5px solid #ece8fb;
    box-shadow: 0 10px 30px rgba(76, 29, 149, 0.22);
    font-family: "Poppins", sans-serif; font-size: 15px; font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    animation: fsLauncherPulse 3s ease-in-out infinite;
}
.fs-chatbot__launcher:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 36px rgba(76, 29, 149, 0.34);
    border-color: #a78bfa;
    animation: none;
}
.fs-chatbot__launcher:focus-visible { outline: 3px solid #b9a3f7; outline-offset: 3px; }
.fs-chatbot__launcher-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.15);
    overflow: hidden;
    flex-shrink: 0;
}
.fs-chatbot__launcher-gif {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.fs-chatbot__launcher-label {
    background: linear-gradient(90deg, #1f2333 0%, #6c2cf2 50%, #1f2333 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fsLauncherShimmer 4s linear infinite;
    letter-spacing: -0.2px;
}
.fs-chatbot__launcher:hover .fs-chatbot__launcher-label {
    animation: none;
    -webkit-text-fill-color: #6c2cf2;
}
@media (max-width: 480px) {
    .fs-chatbot__launcher { right: 14px; bottom: 14px; padding: 5px 14px 5px 5px; font-size: 14px; }
    .fs-chatbot__launcher-icon { width: 36px; height: 36px; }
}

/* ---------- Full-page chat ---------- */
.fs-page {
    margin: 0; min-height: 100vh;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--fs-text);
    background-color: var(--fs-page);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(108, 44, 242, .08), transparent 40%),
        radial-gradient(circle at 88% 82%, rgba(217, 70, 239, .08), transparent 42%);
}
.fs-page *, .fs-page *::before, .fs-page *::after { box-sizing: border-box; }
.fs-page [hidden] { display: none !important; }

.fs-chat { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.fs-chat__column { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }

.fs-chat__topbar {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 20px; background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--fs-border);
}
.fs-chat__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.fs-chat__brand-icon {
    width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, var(--fs-blue), var(--fs-brand), var(--fs-brand-2));
}
.fs-chat__brand-text {
    font-size: 20px; font-weight: 800; letter-spacing: -.5px;
    background: linear-gradient(90deg, var(--fs-brand), var(--fs-brand-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.fs-chat__topbar-actions { display: flex; align-items: center; gap: 10px; }
.fs-chat__new {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--fs-border); background: #fff; color: var(--fs-brand-dark);
    font: 600 13px "Poppins", sans-serif;
}
.fs-chat__new:hover:not(:disabled) { border-color: var(--fs-brand); }
.fs-chat__new:disabled { opacity: .6; cursor: wait; }
.fs-chat__beta {
    padding: 6px 14px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .5px;
    background: linear-gradient(90deg, var(--fs-brand), var(--fs-brand-2));
    box-shadow: 0 4px 12px rgba(108, 44, 242, .3);
}

.fs-chat__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px 0 12px; }

/* Welcome screen */
.fs-chat__welcome { text-align: center; padding: 6vh 0 20px; }
.fs-chat__bot-icon {
    width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, var(--fs-blue), var(--fs-brand), var(--fs-brand-2));
    box-shadow: 0 10px 26px rgba(108, 44, 242, .3);
}
.fs-chat__hello { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.fs-chat__title { margin: 0 0 10px; font-size: 22px; font-weight: 700; line-height: 1.35; }
.fs-chat__subtitle { max-width: 600px; margin: 0 auto 28px; color: #4a4e63; font-size: 15px; line-height: 1.7; }
.fs-chat__actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fs-action {
    display: flex; align-items: center; gap: 10px; text-align: left;
    padding: 10px 14px 10px 10px; border: 0; border-radius: 999px; cursor: pointer;
    font: 600 14px/1.25 "Poppins", sans-serif; color: #fff;
    box-shadow: 0 6px 16px rgba(31, 35, 51, .14);
    transition: transform .15s ease, box-shadow .15s ease;
}
.fs-action:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(31, 35, 51, .2); }
.fs-action:focus-visible { outline: 3px solid #b9a3f7; outline-offset: 2px; }
.fs-action__icon {
    flex: none; width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff;
}
.fs-action--blue { background: #3b82f6; } .fs-action--blue .fs-action__icon { color: #3b82f6; }
.fs-action--sky { background: #06b6d4; } .fs-action--sky .fs-action__icon { color: #0891b2; }
.fs-action--dark { background: #6c2cf2; } .fs-action--dark .fs-action__icon { color: #6c2cf2; }
.fs-action--grey { background: #8b8fa3; } .fs-action--grey .fs-action__icon { color: #6b7083; }

/* Messages */
.fs-chatbot__log { display: flex; flex-direction: column; gap: 16px; }

.fs-row { display: flex; align-items: flex-start; gap: 10px; }
.fs-row--user { justify-content: flex-end; }
.fs-row__body { display: flex; flex-direction: column; min-width: 0; max-width: min(78%, 640px); }
.fs-row--user .fs-row__body { align-items: flex-end; }
.fs-row__body .fs-msg { max-width: 100%; }
.fs-row__time { margin-top: 4px; padding: 0 4px; font-size: 11px; color: #9a9db0; }

.fs-avatar {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.fs-avatar--bot { background: #1f2333; }
.fs-avatar--user { background: linear-gradient(135deg, #22d3ee, #06b6d4); }

.fs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fs-chip {
    padding: 7px 15px; border-radius: 999px; cursor: pointer;
    font: 500 13.5px "Poppins", sans-serif;
    border: 1.5px solid var(--fs-brand); background: #fff; color: var(--fs-brand-dark);
    transition: background .15s ease, color .15s ease;
}
.fs-chip:hover { background: var(--fs-brand); color: #fff; }
.fs-chip:focus-visible { outline: 3px solid #b9a3f7; outline-offset: 2px; }

.fs-thinking { display: inline-flex; align-items: center; gap: 8px; color: var(--fs-muted); font-style: italic; }
.fs-thinking .fs-typing { padding: 0; border: 0; background: transparent; }

.fs-msg {
    max-width: 78%; padding: 11px 15px; border-radius: 16px;
    font-size: 14.5px; line-height: 1.6; word-wrap: break-word; overflow-wrap: anywhere;
}
.fs-msg p { margin: 0 0 6px; }
.fs-msg p:last-child { margin-bottom: 0; }
.fs-msg ul { margin: 4px 0; padding-left: 20px; }
.fs-msg--assistant { align-self: flex-start; background: #fff; border: 1px solid var(--fs-border); border-bottom-left-radius: 4px; }
.fs-msg--user { align-self: flex-end; background: linear-gradient(135deg, var(--fs-brand), #8b3cf0); color: #fff; border-bottom-right-radius: 4px; }
.fs-msg--error { align-self: stretch; max-width: 100%; background: #fdecea; color: var(--fs-error); border: 1px solid #f5c6c2; font-size: 13.5px; }
.fs-msg a { color: var(--fs-brand); font-weight: 600; }

.fs-typing { align-self: flex-start; display: flex; gap: 4px; padding: 13px 15px; background: #fff; border: 1px solid var(--fs-border); border-radius: 16px; }
.fs-typing span { width: 7px; height: 7px; border-radius: 50%; background: #b3a8d8; animation: fs-bounce 1.2s infinite ease-in-out; }
.fs-typing span:nth-child(2) { animation-delay: .15s; }
.fs-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes fs-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fs-typing span { animation: none; } .fs-action, .fs-chatbot__launcher { transition: none; } }

/* Forms inside the chat */
.fs-card {
    align-self: flex-start; width: calc(100% - 48px); max-width: 480px; margin-left: 48px; background: #fff;
    border: 1px solid var(--fs-border); border-radius: 16px; padding: 16px;
    box-shadow: 0 4px 14px rgba(76, 29, 149, .06);
}
.fs-card__title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--fs-brand-dark); }
.fs-card__hint { margin: -4px 0 12px; font-size: 12.5px; color: var(--fs-muted); }
.fs-field { margin-bottom: 11px; }
.fs-field label { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; }
.fs-field .fs-optional { font-weight: 400; color: var(--fs-muted); }
.fs-field input, .fs-field select, .fs-field textarea {
    width: 100%; padding: 10px 11px; font: 14px "Poppins", sans-serif;
    border: 1px solid #d6d2e8; border-radius: 9px; background: #fff; color: var(--fs-text);
}
.fs-field textarea { resize: vertical; min-height: 76px; }
.fs-field input:focus, .fs-field select:focus, .fs-field textarea:focus { outline: none; border-color: var(--fs-brand); box-shadow: 0 0 0 3px rgba(108, 44, 242, .15); }
.fs-field--invalid input, .fs-field--invalid select, .fs-field--invalid textarea { border-color: var(--fs-error); }
.fs-field__error { display: block; margin-top: 3px; font-size: 12px; color: var(--fs-error); }
.fs-field--check { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.fs-field--check input { width: auto; margin-top: 4px; flex: none; accent-color: var(--fs-brand); }
.fs-field--check label { flex: 1; font-weight: 400; font-size: 12px; color: var(--fs-muted); margin: 0; }
.fs-field--check .fs-field__error { flex-basis: 100%; }
.fs-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.fs-card__error { margin: 0 0 10px; font-size: 13px; color: var(--fs-error); }
.fs-card__error:empty { display: none; }
.fs-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fs-btn {
    flex: 1; padding: 11px 14px; border: 0; border-radius: 9px; cursor: pointer;
    font: 600 14px "Poppins", sans-serif; color: #fff;
    background: linear-gradient(90deg, var(--fs-brand), #8b3cf0);
}
.fs-btn:hover:not(:disabled) { filter: brightness(.95); }
.fs-btn:disabled { opacity: .55; cursor: not-allowed; }
.fs-btn--ghost { background: transparent; color: var(--fs-brand); border: 1px solid var(--fs-brand); }
.fs-card--done { opacity: .6; }
.fs-card--done .fs-card__actions { display: none; }
.fs-debug-otp { margin: 0 0 10px; font-size: 12.5px; color: #8a5a00; background: #fff6df; border-radius: 7px; padding: 7px 9px; }

/* Footer: quick chips + composer */
.fs-chat__footer { flex: none; padding: 8px 0 10px; background: linear-gradient(to top, var(--fs-page) 70%, transparent); }
.fs-chatbot__quick { display: flex; gap: 6px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.fs-chatbot__quick::-webkit-scrollbar { display: none; }
.fs-chatbot__quick button {
    flex: none; padding: 6px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
    font: 600 12.5px "Poppins", sans-serif;
    border: 1px solid #d8cdfb; background: #fff; color: var(--fs-brand-dark);
}
.fs-chatbot__quick button:hover { border-color: var(--fs-brand); background: #f3eefe; }
.fs-chatbot__composer {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 6px 6px 18px; border-radius: 999px; background: #fff;
    border: 1px solid #ddd8ee; box-shadow: 0 6px 20px rgba(76, 29, 149, .08);
}
.fs-chatbot__composer:focus-within { border-color: var(--fs-brand); box-shadow: 0 0 0 3px rgba(108, 44, 242, .12); }
.fs-chatbot__composer input {
    flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: none; background: transparent;
    font: 15px "Poppins", sans-serif; color: var(--fs-text);
}
.fs-chatbot__send {
    width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, var(--fs-brand), var(--fs-brand-2));
}
.fs-chatbot__send:disabled { opacity: .5; cursor: not-allowed; }
.fs-chatbot__disclaimer { margin: 8px 0 0; font-size: 11px; color: #8a8ea0; text-align: center; }

/* Tablets / phones */
@media (max-width: 860px) {
    .fs-chat__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .fs-chat__topbar { padding: 10px 14px; }
    .fs-chat__brand-text { font-size: 18px; }
    .fs-chat__new span { display: none; }
    .fs-chat__new { padding: 8px; }
    .fs-chat__welcome { padding-top: 3vh; }
    .fs-chat__title { font-size: 19px; }
    .fs-chat__subtitle { font-size: 14px; }
    .fs-chat__actions { grid-template-columns: 1fr 1fr; gap: 10px; }
    .fs-action { flex-direction: column; text-align: center; border-radius: 16px; padding: 12px 8px; font-size: 13px; }
    .fs-msg { max-width: 88%; }
    .fs-row__body { max-width: calc(100% - 48px); }
    .fs-avatar { width: 32px; height: 32px; }
    .fs-card { margin-left: 0; width: 100%; }
    .fs-chip { font-size: 12.5px; padding: 6px 12px; }
    .fs-chat__footer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

/* Long, structured answers */
.fs-msg__heading { margin: 12px 0 4px; font-size: 15px; font-weight: 700; color: var(--fs-brand-dark); }
.fs-msg__heading:first-child { margin-top: 0; }
.fs-msg ol { margin: 4px 0; padding-left: 22px; }
.fs-msg li { margin: 2px 0; }

/* Document upload card */
.fs-docs { max-width: 620px; }
.fs-progress { height: 8px; border-radius: 999px; background: #ece8f8; overflow: hidden; }
.fs-progress__fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--fs-brand), var(--fs-brand-2)); transition: width .3s ease; }
.fs-progress__text { margin: 6px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--fs-brand-dark); }
.fs-docs__group { margin: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--fs-muted); }
.fs-doc {
    display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
    padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--fs-border); border-radius: 12px; background: #fff;
}
.fs-doc--done { background: #f7fdf9; border-color: #cdeedb; }
.fs-doc--busy { opacity: .75; }
.fs-doc__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.fs-doc__hint { margin-top: 2px; font-size: 12px; color: var(--fs-muted); }
.fs-doc__actions { display: flex; gap: 6px; }
.fs-doc__file { display: none; }
.fs-doc__feedback { grid-column: 1 / -1; font-size: 12.5px; }
.fs-doc__feedback:empty { display: none; }
.fs-doc__feedback p { margin: 0; }
.fs-doc__feedback .fs-doc__note { margin-top: 3px; }
.fs-doc__feedback--ok { color: #1b7f4b; }
.fs-doc__feedback--review { color: #8a5a00; }
.fs-doc__feedback--error { color: var(--fs-error); }
.fs-doc__feedback--busy { color: var(--fs-muted); font-style: italic; }
.fs-badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.fs-badge--ok { background: #dcfce7; color: #166534; }
.fs-badge--todo { background: #fff4e0; color: #8a5a00; }
.fs-badge--muted { background: #f0eff5; color: var(--fs-muted); }
.fs-btn--small { flex: none; padding: 7px 14px; font-size: 13px; }
@media (max-width: 480px) {
    .fs-doc { grid-template-columns: 1fr; }
    .fs-doc__actions .fs-btn { flex: 1; }
}

/* =====================================================================
   Chat page theme: light doodle background, full-width conversation,
   grey assistant bubbles, blue user bubbles (scoped to the chat page only)
   ===================================================================== */
.fs-page {
    --fs-brand: #0056b3;
    --fs-brand-2: #0088fc;
    --fs-brand-dark: #003f85;
    --fs-text: #202124;
    --fs-muted: #6b7280;
    --fs-border: #e3e7ec;
    --fs-bubble: #f1f3f4;
    /* Noto fonts cover Hindi / Gujarati text, which Inter has no glyphs for */
    font-family: "Inter", "Noto Sans Devanagari", "Noto Sans Gujarati", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--fs-text);
    background-color: #f3f8fc;
    background-image:
        linear-gradient(180deg, rgba(234, 244, 252, .55) 0%, rgba(246, 250, 253, .35) 100%),
        url("../images/chatbot/chat-bg-pattern.svg");
    background-size: auto, 560px 560px;
    background-repeat: repeat;
    background-attachment: fixed;
}
.fs-page .fs-chat { background: transparent; }

/* Header */
.fs-page .fs-chat__topbar {
    position: relative; padding: 14px 24px; background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid #e6edf3;
}
/* Before the first message: logo centred, BETA as a pill on the right, nothing to reset yet */
.fs-page .fs-chat.is-empty .fs-chat__topbar {
    justify-content: center; padding: 22px 24px 6px;
    background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.fs-page .fs-chat.is-empty .fs-chat__new { display: none; }
.fs-page .fs-chat.is-empty .fs-chat__brand-text { font-size: 26px; }
.fs-page .fs-chat.is-empty .fs-chat__brand-icon { width: 38px; height: 38px; }
.fs-page .fs-chat.is-empty .fs-chat__beta {
    position: absolute; top: 50%; right: 24px; transform: translateY(-50%);
    padding: 9px 20px; border-radius: 999px; font-size: 13px; letter-spacing: .8px;
    background: linear-gradient(135deg, #22cbff, #0aa6f5); box-shadow: 0 6px 16px rgba(10, 166, 245, .35);
}
.fs-page .fs-chat__brand-wrap { display: flex; align-items: center; gap: 14px; }
.fs-page .fs-chat__brand-icon { background: #111; }
.fs-page .fs-chat__brand-text {
    font-family: "Poppins", sans-serif; font-size: 22px; font-weight: 800;
    background: none; -webkit-text-fill-color: #111; color: #111;
}
.fs-page .fs-chat__beta {
    padding: 3px 9px; border-radius: 4px; box-shadow: none;
    background: #18b4f0; color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .6px;
}
.fs-page .fs-chat__new {
    padding: 10px 20px; border: 0; border-radius: 999px;
    background: #000; color: #fff; font: 700 14px "Inter", sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.fs-page .fs-chat__new:hover:not(:disabled) { background: #222; border: 0; }

/* Conversation spans the full width */
.fs-page .fs-chat__column { max-width: none; padding: 0 24px; }
.fs-page .fs-chat__scroll { padding: 28px 0 16px; }
.fs-page .fs-chatbot__log { gap: 22px; }
.fs-page .fs-row { gap: 12px; }
.fs-page .fs-row__body { max-width: min(76%, 1100px); }
.fs-page .fs-row--user .fs-row__body { max-width: 60%; }
/* Times stay in the markup (screen readers, restored history) but are not shown, like the reference design */
.fs-page .fs-row__time { display: none; }

.fs-page .fs-avatar { width: 40px; height: 40px; }
.fs-page .fs-avatar--bot { background: #202124; }
.fs-page .fs-avatar--user { background: linear-gradient(135deg, #2ee0d0, #12b8e6); }

.fs-page .fs-msg { font-size: 14px; line-height: 1.75; padding: 14px 18px; border-radius: 16px; }
.fs-page .fs-msg--assistant {
    background: var(--fs-bubble); border: 1px solid #e2e5e9; border-top-left-radius: 16px;
    border-bottom-left-radius: 16px; color: var(--fs-text); box-shadow: none;
}
.fs-page .fs-msg--user {
    background: var(--fs-brand); color: #fff; border-top-right-radius: 16px; border-bottom-right-radius: 16px;
    padding: 12px 18px; font-weight: 500;
}
.fs-page .fs-msg p { margin: 0 0 8px; }
.fs-page .fs-msg ul, .fs-page .fs-msg ol { margin: 6px 0 10px; padding-left: 22px; }
.fs-page .fs-msg li { margin: 4px 0; }
.fs-page .fs-msg strong { font-weight: 600; color: #111; }
.fs-page .fs-msg--user strong { color: #fff; }
.fs-page .fs-msg__heading { margin: 16px 0 8px; font-size: 17.5px; font-weight: 500; color: #111; letter-spacing: -.1px; }
.fs-page .fs-msg__heading:first-child { margin-top: 2px; }
.fs-page .fs-msg a { color: var(--fs-brand); }
.fs-page .fs-msg--error { background: #fdecea; border-color: #f5c6c2; }

/* Suggestion buttons under replies */
.fs-page .fs-chips { margin-top: 12px; gap: 10px; }
.fs-page .fs-chip {
    padding: 8px 16px; border: 1.5px solid var(--fs-brand); border-radius: 999px;
    background: #fff; color: var(--fs-brand); font: 400 14px "Inter", "Noto Sans Devanagari", "Noto Sans Gujarati", sans-serif;
}
.fs-page .fs-chip:hover { background: var(--fs-brand); color: #fff; }

/* Loading bubble: "Thinking…" → "Processing your request…" → "Just a moment…" → "Almost there…" */
.fs-page .fs-thinking { gap: 10px; min-width: 132px; padding: 10px 16px; font-size: 13px; color: #6b7280; }
.fs-page .fs-thinking .fs-typing span { width: 5px; height: 5px; background: #9aa3ad; }
.fs-thinking__text.is-in { animation: fs-fade-in .35s ease; }
@keyframes fs-fade-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* "Retry" under the latest answer */
.fs-retry {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 5px;
    margin-top: 8px; padding: 2px 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
    font: 500 12.5px "Inter", sans-serif; color: #80868b;
}
.fs-retry:hover { color: var(--fs-brand); background: rgba(0, 86, 179, .06); }
.fs-retry:focus-visible { outline: 2px solid #9cc3ea; outline-offset: 1px; }
.fs-msg--error .fs-retry { display: flex; margin-top: 6px; color: var(--fs-error); }
@media (prefers-reduced-motion: reduce) { .fs-thinking__text.is-in { animation: none; } }

/* Forms, OTP and document cards */
.fs-page .fs-card { margin-left: 52px; border-color: #e2e5e9; border-radius: 14px; box-shadow: 0 2px 10px rgba(15, 40, 80, .05); }
.fs-page .fs-card__title { color: #111; }
.fs-page .fs-btn { background: var(--fs-brand); font-family: "Inter", sans-serif; }
.fs-page .fs-btn:hover:not(:disabled) { background: var(--fs-brand-dark); filter: none; }
.fs-page .fs-btn--ghost { background: #fff; color: var(--fs-brand); border-color: var(--fs-brand); }
.fs-page .fs-btn--ghost:hover:not(:disabled) { background: #eef5fc; }
.fs-page .fs-field input, .fs-page .fs-field select, .fs-page .fs-field textarea { font-family: "Inter", sans-serif; }
.fs-page .fs-field input:focus, .fs-page .fs-field select:focus, .fs-page .fs-field textarea:focus { box-shadow: 0 0 0 3px rgba(0, 86, 179, .15); }
.fs-page .fs-field--check input { accent-color: var(--fs-brand); }
.fs-page .fs-progress { background: #e4edf6; }
.fs-page .fs-progress__fill { background: linear-gradient(90deg, var(--fs-brand), var(--fs-brand-2)); }

/* Welcome screen: compact centred greeting, one row of pill buttons */
.fs-page .fs-chat__welcome { max-width: 1060px; margin: 0 auto; padding: 1vh 0 20px; }
.fs-page .fs-chat__hello { margin-bottom: 2px; font-size: 20px; font-weight: 600; }
.fs-page .fs-chat__title { margin-bottom: 8px; font-size: 20px; font-weight: 600; }
.fs-page .fs-chat__subtitle { max-width: 600px; margin-bottom: 22px; color: #3c4043; font-size: 15px; line-height: 1.75; }
.fs-page .fs-chat__languages { margin: -14px auto 22px; max-width: 600px; color: #5f6b7a; font-size: 13px; }
.fs-page .fs-chat__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: none; margin: 0 auto; }
.fs-page .fs-action--slate { background: #5f6b7a; }
.fs-page .fs-action--slate .fs-action__icon { color: #5f6b7a; }
.fs-page .fs-action {
    flex: 0 0 196px; min-height: 56px; padding: 8px 10px 8px 8px; gap: 10px; border-radius: 999px;
    text-align: left; font: 700 13.5px/1.25 "Inter", "Noto Sans Devanagari", "Noto Sans Gujarati", sans-serif;
    box-shadow: 0 6px 14px rgba(15, 40, 80, .16);
}
.fs-page .fs-action__icon { width: 40px; height: 40px; flex: none; }
.fs-page .fs-action--blue { background: #0088fc; }
.fs-page .fs-action--blue .fs-action__icon { color: #0088fc; }
.fs-page .fs-action--sky { background: #00b6ff; }
.fs-page .fs-action--sky .fs-action__icon { color: #00a2e8; }
.fs-page .fs-action--dark { background: #212121; }
.fs-page .fs-action--dark .fs-action__icon { color: #212121; }
.fs-page .fs-action--grey { background: #898989; }
.fs-page .fs-action--grey .fs-action__icon { color: #6b6b6b; }

/* Message bar */
.fs-page .fs-chat__footer { padding: 10px 24px 8px; background: transparent; }
.fs-page .fs-chatbot__composer {
    padding: 6px 8px; gap: 10px;
    background: #fff; border: 1px solid #8db7f0; border-radius: 999px;
    box-shadow: 0 2px 12px rgba(15, 40, 80, .06);
}
.fs-page .fs-chatbot__composer:focus-within { border-color: #3d84e8; box-shadow: 0 0 0 3px rgba(61, 132, 232, .12); }
.fs-page .fs-chat.is-empty .fs-chatbot__composer {
    max-width: 780px; margin: 0 auto; background: #f1f3f5; border-color: #e3e7eb; box-shadow: 0 2px 10px rgba(15, 40, 80, .05);
}
.fs-page .fs-chat.is-empty .fs-chatbot__composer:focus-within { border-color: #c9d6e3; box-shadow: 0 2px 12px rgba(15, 40, 80, .08); }
.fs-page .fs-chatbot__composer input { padding: 11px 4px; font: 15px "Inter", "Noto Sans Devanagari", "Noto Sans Gujarati", sans-serif; }
.fs-page .fs-chatbot__composer input::placeholder { color: #9aa3ad; }
.fs-chatbot__mic {
    width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #22c6ff, #1170e8); color: #fff;
    box-shadow: 0 0 0 4px rgba(34, 150, 255, .14);
}
.fs-chatbot__mic:focus-visible { outline: 3px solid #9cc3ea; outline-offset: 2px; }
.fs-chatbot__mic.is-listening { background: #e53935; animation: fs-pulse 1.2s infinite; }
@keyframes fs-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(229, 57, 53, .25); } 50% { box-shadow: 0 0 0 10px rgba(229, 57, 53, .08); } }
.fs-page .fs-chatbot__send { width: 40px; height: 40px; background: #e2e6eb; color: #8a96a3; }
/* Send turns blue once there is something to send */
.fs-page .fs-chatbot__composer:has(input:not(:placeholder-shown)) .fs-chatbot__send,
.fs-page .fs-chatbot__send:hover:not(:disabled) { background: var(--fs-brand); color: #fff; }
.fs-page .fs-chatbot__disclaimer { margin: 10px auto 0; text-align: center; font-size: 11.5px; color: #80868b; }
.fs-page .fs-chat.is-empty .fs-chatbot__disclaimer { max-width: 780px; }


@media (prefers-reduced-motion: reduce) { .fs-chatbot__mic.is-listening { animation: none; } }

@media (max-width: 1080px) {
    .fs-page .fs-chat__actions { max-width: 600px; }
}
@media (max-width: 860px) {
    .fs-page .fs-row__body, .fs-page .fs-row--user .fs-row__body { max-width: calc(100% - 52px); }
}
@media (max-width: 640px) {
    .fs-page .fs-chat__actions { max-width: 420px; }
    .fs-page .fs-action { flex: 1 1 calc(50% - 5px); }
    /* Five buttons in two columns: the last one spans the row instead of sitting alone */
    .fs-page .fs-chat__actions .fs-action:last-child { flex-basis: 100%; justify-content: center; }
    .fs-page .fs-chat.is-empty .fs-chat__topbar { justify-content: flex-start; padding: 14px 14px 4px; }
    .fs-page .fs-chat.is-empty .fs-chat__beta { right: 14px; padding: 7px 14px; font-size: 11.5px; }
}
@media (max-width: 480px) {
    .fs-page .fs-chat__topbar { padding: 10px 14px; }
    .fs-page .fs-chat__brand-text { font-size: 18px; }
    .fs-page .fs-chat__new { padding: 8px 14px; font-size: 13px; }
    .fs-page .fs-chat__column { padding: 0 12px; }
    .fs-page .fs-chat__footer { padding: 8px 12px max(8px, env(safe-area-inset-bottom)); }
    .fs-page .fs-avatar { width: 32px; height: 32px; }
    .fs-page .fs-row__body, .fs-page .fs-row--user .fs-row__body { max-width: calc(100% - 44px); }
    .fs-page .fs-card { margin-left: 0; }
    .fs-page .fs-msg__heading { font-size: 16px; }
    .fs-page { background-size: auto, 420px 420px; }
}

/* Aadhaar: "Front / Back  or  PDF (both sides)" */
.fs-doc__actions { flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.fs-doc__or { font-size: 12px; color: var(--fs-muted); padding: 0 2px; }
.fs-btn--pdf { white-space: nowrap; }
.fs-btn--pdf::before { content: "PDF"; display: inline-block; margin-right: 6px; padding: 1px 4px; border-radius: 3px; background: #e53935; color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: .3px; vertical-align: 1px; }
@media (max-width: 480px) { .fs-doc__actions { justify-content: flex-start; } }

/* Batch upload: drop zone + file list */
.fs-dropzone {
    display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 14px 16px;
    border: 2px dashed #b9cce0; border-radius: 12px; background: #f7fafd; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.fs-dropzone:hover, .fs-dropzone:focus-visible, .fs-dropzone.is-dragover { border-color: var(--fs-brand); background: #eef5fc; outline: none; }
.fs-dropzone__icon {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--fs-brand); color: #fff; font-size: 18px; font-weight: 700;
}
.fs-dropzone__text { display: flex; flex-direction: column; font-size: 13px; color: var(--fs-muted); line-height: 1.45; }
.fs-dropzone__text strong { color: var(--fs-text); font-size: 13.5px; }
.fs-dropzone__link { color: var(--fs-brand); font-weight: 600; text-decoration: underline; }
.fs-dropzone__text span:nth-child(2), .fs-dropzone__text .fs-dropzone__link { display: inline; }

.fs-batch { margin: 10px 0 6px; padding: 12px; border: 1px solid var(--fs-border); border-radius: 12px; background: #fff; }
.fs-batch__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; font-size: 13.5px; }
.fs-batch__sub { font-size: 12px; color: var(--fs-muted); }
.fs-batch__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fs-batch__item {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1fr) 26px; gap: 8px; align-items: center;
    padding: 8px 10px; border: 1px solid #edf0f4; border-radius: 10px; font-size: 12.5px;
}
.fs-batch__item--uploading { background: #f5f9fe; }
.fs-batch__item--done { background: #f4fbf6; border-color: #d3eedc; }
.fs-batch__item--failed { background: #fff6f5; border-color: #f6d3cf; }
.fs-batch__file { display: flex; flex-direction: column; min-width: 0; }
.fs-batch__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-batch__size { color: var(--fs-muted); font-size: 11.5px; }
.fs-batch__select { width: 100%; padding: 6px 8px; border: 1px solid #d6dbe3; border-radius: 8px; font-size: 12.5px; font-family: inherit; background: #fff; }
.fs-batch__type { color: var(--fs-text); }
.fs-batch__status { color: var(--fs-muted); }
.fs-batch__status--problem, .fs-batch__item--failed .fs-batch__status { color: var(--fs-error); }
.fs-batch__item--done .fs-batch__status { color: #1b7f4b; font-weight: 600; }
.fs-batch__item--uploading .fs-batch__status { font-style: italic; }
.fs-batch__remove {
    width: 26px; height: 26px; border: 0; border-radius: 50%; cursor: pointer;
    background: #f0f2f5; color: #5f6773; font-size: 16px; line-height: 1;
}
.fs-batch__remove:hover { background: #fde2e0; color: var(--fs-error); }
.fs-batch__note { margin: 8px 0 0; font-size: 12.5px; color: var(--fs-text); }
.fs-batch__note:empty { display: none; }
.fs-batch__actions { display: flex; gap: 8px; margin-top: 10px; }
.fs-batch__actions .fs-btn { flex: none; }

/* Next document to upload, and rows accepting a dropped file */
.fs-doc--next { box-shadow: 0 0 0 3px rgba(0, 136, 252, .35); border-color: #7fb8f0; transition: box-shadow .3s ease; }
.fs-doc.is-dragover { border-color: var(--fs-brand); background: #eef5fc; border-style: dashed; }
.fs-doc__feedback--ok p:first-child { font-weight: 600; }

@media (max-width: 640px) {
    .fs-batch__item { grid-template-columns: minmax(0, 1fr) 26px; }
    .fs-batch__file { grid-column: 1; }
    .fs-batch__remove { grid-column: 2; grid-row: 1; }
    .fs-batch__select, .fs-batch__type, .fs-batch__status { grid-column: 1 / -1; }
}

/* ---- Loan status: progress steps ---- */
.fs-page .fs-msg ul.fs-steps { list-style: none; padding-left: 0; margin: 6px 0 8px; }
.fs-page .fs-step { position: relative; display: flex; align-items: center; gap: 10px; padding: 3px 0; color: #6b7280; }
.fs-page .fs-step:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 24px; height: calc(100% - 18px); width: 2px; background: #d1d5db; }
.fs-page .fs-step__dot { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; line-height: 1; position: relative; z-index: 1; }
.fs-page .fs-step--done { color: #374151; }
.fs-page .fs-step--done .fs-step__dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.fs-page .fs-step--done:not(:last-child)::after { background: #16a34a; }
.fs-page .fs-step--current { color: #111827; }
.fs-page .fs-step--current .fs-step__dot { border-color: #0056b3; box-shadow: inset 0 0 0 4px #fff; background: #0056b3; }

/* ---- "I'm not a robot" gate shown before the chat opens (ChatbotCaptcha) ---- */
.fs-captcha {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(246, 245, 251, 0.92);
    backdrop-filter: blur(4px);
}
.fs-captcha__card {
    width: 100%;
    max-width: 380px;
    padding: 28px 24px 22px;
    text-align: center;
    background: var(--fs-bg);
    border: 1px solid var(--fs-border);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(76, 29, 149, 0.14);
}
.fs-captcha__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--fs-brand), var(--fs-blue));
    border-radius: 50%;
}
.fs-captcha__title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; color: var(--fs-text); }
.fs-captcha__text { margin: 0 0 18px; font-size: 0.92rem; line-height: 1.5; color: var(--fs-muted); }
/* The Google widget is 304px wide; scale it down on very narrow phones */
.fs-captcha__widget { display: flex; justify-content: center; min-height: 78px; }
@media (max-width: 360px) {
    .fs-captcha__widget { transform: scale(0.88); transform-origin: center top; }
}
.fs-captcha__status { min-height: 1.3em; margin: 12px 0 0; font-size: 0.85rem; color: var(--fs-muted); }
.fs-captcha__status.is-error { color: var(--fs-error); }
.fs-chat.is-locked .fs-chat__actions,
.fs-chat.is-locked .fs-chatbot__composer { pointer-events: none; opacity: 0.5; }

/* ---- Confirmation popup (chatbot.js confirmDialog, replaces window.confirm) ---- */
.fs-dialog {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .16s ease;
}
.fs-dialog.is-open { opacity: 1; }
.fs-dialog__card {
    width: 100%;
    max-width: 400px;
    padding: 26px 24px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--fs-border);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    transform: translateY(8px) scale(.98);
    transition: transform .16s ease;
}
.fs-dialog.is-open .fs-dialog__card { transform: none; }
.fs-dialog__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--fs-brand), var(--fs-brand-2));
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.25);
}
.fs-dialog__title { margin: 0 0 6px; font-size: 1.15rem; font-weight: 700; color: var(--fs-text); }
.fs-dialog__text { margin: 0 0 22px; font-size: 0.92rem; line-height: 1.55; color: var(--fs-muted); }
.fs-dialog__actions { display: flex; gap: 10px; }
.fs-dialog__btn {
    flex: 1;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.fs-dialog__btn--ghost { color: var(--fs-text); background: #fff; border: 1px solid var(--fs-border); }
.fs-dialog__btn--ghost:hover { border-color: var(--fs-brand); color: var(--fs-brand-dark); }
.fs-dialog__btn--primary { color: #fff; background: var(--fs-brand); border: 1px solid var(--fs-brand); }
.fs-dialog__btn--primary:hover { background: var(--fs-brand-dark); border-color: var(--fs-brand-dark); }
.fs-dialog__btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 136, 252, 0.35); }
@media (max-width: 420px) {
    .fs-dialog__card { padding: 22px 18px 18px; }
    .fs-dialog__actions { flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) {
    .fs-dialog, .fs-dialog__card { transition: none; }
}
