/* AKJ PaisaGyan - "आशुग्या से पूछो" floating button + chat panel (assets/js/ask-gullu.js) */
.ag-fab { position: fixed; left: 12px; bottom: calc(76px + var(--bn-off, 0px)); z-index: 1405; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border: 2px solid #fff; border-radius: 999px; color: #fff; font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer; background: linear-gradient(135deg, #7c3aed, #ec4899); box-shadow: 0 10px 24px -8px rgba(124, 58, 237, .65); transition: transform .15s, box-shadow .15s; }
.ag-fab:hover, .ag-fab:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(124, 58, 237, .8); outline: none; }
.ag-fab .bi { font-size: 1.15rem; }
.ag-fab[hidden], .ag-panel[hidden] { display: none; }
.ag-on .gl-float { bottom: calc(136px + var(--bn-off, 0px)); }
.ag-panel { position: fixed; left: 12px; bottom: calc(76px + var(--bn-off, 0px)); z-index: 1500; width: min(390px, calc(100vw - 24px)); height: min(560px, calc(100vh - 110px)); height: min(560px, calc(100dvh - 110px)); max-height: calc(100vh - 20px); display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--bs-body-bg, #fff); color: var(--bs-body-color, #1f2937); border: 1px solid rgba(124, 58, 237, .25); box-shadow: 0 24px 60px -16px rgba(30, 20, 80, .55); opacity: 0; transform: translateY(14px) scale(.97); transform-origin: bottom left; transition: opacity .18s, transform .18s; }
.ag-panel.ag-show { opacity: 1; transform: none; }
.ag-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; color: #fff; background: linear-gradient(135deg, #7c3aed, #ec4899); }
.ag-av { border-radius: 50%; background: #fff; padding: 3px; flex: 0 0 auto; }
.ag-ht { flex: 1; min-width: 0; line-height: 1.2; }
.ag-ht b { display: block; font-size: 1rem; }
.ag-ht small { opacity: .9; font-size: .74rem; }
.ag-ic { border: 0; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; }
.ag-ic:hover, .ag-ic:focus-visible { background: rgba(255, 255, 255, .32); outline: none; }
.ag-log { flex: 1 1 0; min-height: 0; overscroll-behavior: contain; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; background: color-mix(in srgb, #7c3aed 4%, transparent); }
.ag-row { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.ag-u { justify-content: flex-end; }
.ag-mini { border-radius: 50%; flex: 0 0 auto; background: #fff; border: 1px solid rgba(124, 58, 237, .25); padding: 2px; }
.ag-b { max-width: 86%; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: #fff; color: #1f2937; border: 1px solid rgba(124, 58, 237, .18); font-size: .9rem; line-height: 1.55; box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .15); }
.ag-u .ag-b { border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; border-color: transparent; }
.ag-lead { font-size: .72rem; font-weight: 800; color: #7c3aed; margin-bottom: 2px; }
.ag-t { margin: 0; white-space: pre-line; }
.ag-src { display: block; margin-top: 8px; font-size: .76rem; font-weight: 700; color: #7c3aed; text-decoration: none; }
.ag-src:hover { text-decoration: underline; }
.ag-more { margin: 10px 0 4px; font-size: .72rem; font-weight: 800; color: #6b7280; letter-spacing: .02em; }
.ag-links { display: grid; gap: 6px; }
.ag-link { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border-radius: 12px; border: 1px solid rgba(124, 58, 237, .22); background: rgba(124, 58, 237, .05); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.ag-link:hover, .ag-link:focus-visible { border-color: #7c3aed; transform: translateY(-1px); outline: none; }
.ag-link .bi { color: #7c3aed; font-size: 1.05rem; margin-top: 2px; }
.ag-link small { display: block; font-size: .66rem; font-weight: 800; color: #7c3aed; text-transform: uppercase; letter-spacing: .03em; }
.ag-link b { display: block; font-size: .84rem; line-height: 1.3; }
.ag-link em { display: block; font-style: normal; font-size: .74rem; color: #6b7280; line-height: 1.35; margin-top: 2px; }
.ag-chips { display: flex; gap: 6px; padding: 8px 12px 2px; overflow-x: auto; flex: 0 0 auto; scrollbar-width: none; }
.ag-chips::-webkit-scrollbar { display: none; }
.ag-chip { flex: 0 0 auto; border: 1px solid rgba(124, 58, 237, .35); background: transparent; color: #7c3aed; border-radius: 999px; padding: 4px 11px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ag-chip:hover, .ag-chip:focus-visible { background: rgba(124, 58, 237, .1); outline: none; }
.ag-form { flex: 0 0 auto; display: flex; gap: 8px; padding: 8px 12px; }
.ag-in { flex: 1; min-width: 0; border: 1.5px solid rgba(124, 58, 237, .35); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: .92rem; background: var(--bs-body-bg, #fff); color: inherit; }
.ag-in:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .2); }
.ag-send { border: 0; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #7c3aed, #ec4899); cursor: pointer; flex: 0 0 auto; }
.ag-send:focus-visible { outline: 3px solid rgba(124, 58, 237, .4); }
.ag-note { flex: 0 0 auto; margin: 0; padding: 0 14px 10px; font-size: .68rem; opacity: .65; text-align: center; }
.ag-dots { display: inline-flex; gap: 4px; }
.ag-dots i { width: 7px; height: 7px; border-radius: 50%; background: #7c3aed; animation: ag-dot 1s infinite ease-in-out; }
.ag-dots i:nth-child(2) { animation-delay: .15s; } .ag-dots i:nth-child(3) { animation-delay: .3s; }
.ag-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes ag-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }
html[data-theme="dark"] .ag-b, html[data-theme="ocean"] .ag-b { background: #1e293b; color: #e2e8f0; border-color: rgba(255, 255, 255, .15); }
html[data-theme="dark"] .ag-link em, html[data-theme="ocean"] .ag-link em, html[data-theme="dark"] .ag-more { color: #94a3b8; }
html[data-theme="dark"] .ag-lead, html[data-theme="dark"] .ag-src, html[data-theme="dark"] .ag-link small, html[data-theme="dark"] .ag-chip { color: #c4b5fd; }
@media (max-width: 640px) {
  .ag-fab { padding: 0; width: 48px; height: 48px; justify-content: center; }
  .ag-fab-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ag-panel { left: 0; right: 0; bottom: 0; width: 100%; height: min(78vh, 640px); height: min(78dvh, 640px); border-radius: 20px 20px 0 0; transform-origin: bottom center; }
  .ag-open .ag-fab, .ag-open .gl-float { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ag-panel, .ag-fab { transition: none; } .ag-dots i { animation: none; } .ag-log { scroll-behavior: auto; } }
@media print { .ag-fab, .ag-panel { display: none !important; } }

.ag-show-gl { border: 0; background: none; color: #7c3aed; font: inherit; font-size: .78rem; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0 14px 10px; }
html[data-theme="dark"] .ag-show-gl { color: #c4b5fd; }

/* panel stays put: the bottom nav appears/disappears while scrolling (--bn-off), so the open panel no longer follows it */
.has-bottom-nav .ag-panel { bottom: 136px; height: min(560px, calc(100vh - 170px)); height: min(560px, calc(100dvh - 170px)); }
@media (max-width: 640px) { .has-bottom-nav .ag-panel { bottom: 0; height: min(78vh, 640px); height: min(78dvh, 640px); } }

/* pretty scrollbar for the chat list, the chips row and any scrolling bubble */
.ag-log { scrollbar-width: thin; scrollbar-color: #a78bfa transparent; }
.ag-log::-webkit-scrollbar { width: 10px; }
.ag-log::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.ag-log::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #7c3aed, #ec4899); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; min-height: 40px; }
.ag-log::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #6d28d9, #db2777); background-clip: padding-box; border: 2px solid transparent; }

/* smaller launcher button (name kept) */
.ag-fab { left: 8px; gap: 6px; padding: 6px 12px 6px 9px; font-size: .76rem; border-width: 1.5px; box-shadow: 0 6px 16px -7px rgba(124, 58, 237, .6); }
.ag-fab .bi { font-size: .95rem; }
@media (max-width: 640px) { .ag-fab { padding: 0; width: 40px; height: 40px; } }

/* round launcher, lined up with the accessibility circle below it (left 30px, 50px wide) */
.ag-fab { left: 30px; width: 50px; height: 50px; padding: 0; gap: 0; justify-content: center; border-width: 2px; }
.ag-fab .bi { font-size: 1.3rem; }
.ag-fab-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .ag-fab { left: 12px; width: 44px; height: 44px; } }
