/* Asistent sajta „Pitaj nas“ (assets/js/assistant.js). Boje iz teme (--ifu-*), sa rezervom. */
.ifm-ai { position: fixed; right: 20px; bottom: 20px; z-index: 900; font-family: var(--ifu-font, system-ui, sans-serif); }
.ifm-ai__fab { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--ifu-ink, #16150F); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 12px 30px rgba(22, 21, 15, .22); transition: transform .2s, background .2s; }
.ifm-ai__fab:hover { transform: translateY(-2px); background: var(--ifu-accent, #2A3BD6); }
.ifm-ai.is-open .ifm-ai__fab { background: var(--ifu-accent, #2A3BD6); }
/* Znak po logotipu „if.“: oblačić + plava tačka (na plavoj podlozi tačka postaje bela). */
.ifm-ai__logo { flex: none; display: block; }
/* Obrub u boji podloge odvaja tačku od oblačića, kao tačka posle „if“. */
.ifm-ai__dot { fill: var(--ifu-accent, #2A3BD6); stroke: var(--ifu-ink, #16150F); stroke-width: 2.6; paint-order: stroke; transition: fill .2s, stroke .2s; }
.ifm-ai__fab:hover .ifm-ai__dot, .ifm-ai.is-open .ifm-ai__fab .ifm-ai__dot { fill: #fff; stroke: var(--ifu-accent, #2A3BD6); }
.ifm-ai__av .ifm-ai__dot { stroke: #2d2c27; }
/* Na dugmetu bez tačke: plava tačka koja pulsira liči na „nova poruka“, a poruke nema. */
.ifm-ai__fab .ifm-ai__dot { display: none; }
.ifm-ai__av { flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin-right: 4px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; }
.ifm-ai__av .ifm-ai__logo { width: 24px; height: 24px; }
.ifm-ai__box { position: absolute; right: 0; bottom: 64px; display: flex; flex-direction: column; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); overflow: hidden; border: 1px solid var(--ifu-line, #DDD5C7); border-radius: 22px; background: var(--ifu-paper, #FBF9F5); box-shadow: 0 24px 60px rgba(22, 21, 15, .22); }
.ifm-ai__box[hidden] { display: none; }
.ifm-ai__head { display: flex; align-items: center; gap: 6px; padding: 14px 12px 12px 18px; background: var(--ifu-ink, #16150F); color: #fff; }
.ifm-ai__ht { flex: 1; min-width: 0; }
.ifm-ai__ht strong { display: block; font-size: 16px; }
.ifm-ai__ht small { display: block; opacity: .75; font-size: 12.5px; }
.ifm-ai__icon { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.ifm-ai__icon:hover { background: rgba(255, 255, 255, .24); }
.ifm-ai__list { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.ifm-ai__msg { align-self: flex-start; max-width: 92%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--ifu-line, #DDD5C7); color: var(--ifu-ink, #16150F); font-size: 14.5px; line-height: 1.5; }
.ifm-ai__msg p { margin: 0 0 6px; }
.ifm-ai__msg p:last-child { margin: 0; }
.ifm-ai__msg a { color: var(--ifu-accent, #2A3BD6); text-decoration: underline; text-underline-offset: 2px; }
.ifm-ai__msg.is-me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--ifu-accent, #2A3BD6); border-color: transparent; color: #fff; }
.ifm-ai__prod { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px; border: 1px solid var(--ifu-line, #DDD5C7); border-radius: 12px; background: var(--ifu-paper, #FBF9F5); color: inherit !important; text-decoration: none !important; }
.ifm-ai__prod:hover { border-color: var(--ifu-accent, #2A3BD6); }
.ifm-ai__prod img { flex: none; width: 54px; height: 54px; object-fit: contain; border-radius: 8px; background: #fff; }
.ifm-ai__pt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ifm-ai__pt strong { font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ifm-ai__pt small { color: var(--ifu-muted, #4A463E); font-size: 12.5px; }
.ifm-ai__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ifm-ai__pt em { padding: 1px 8px; border-radius: 999px; background: #EEF0FF; color: var(--ifu-accent, #2A3BD6); font-style: normal; font-size: 11.5px; font-weight: 700; }
.ifm-ai__pt em.is-ok { background: #E6F4EA; color: #1E6B34; }
.ifm-ai__pt em.is-tight { background: #FFF3DC; color: #8A5A00; }
.ifm-ai__tips { margin: 4px 0 8px; padding-left: 18px; }
.ifm-ai__tips li { margin: 2px 0; }
.ifm-ai__tips small, .ifm-ai__hint { color: var(--ifu-muted, #4A463E); font-size: 12.5px; }
.ifm-ai__quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ifm-ai__quick .ifm-ai__chip { padding: 6px 11px; font-size: 12.5px; }
.ifm-ai__links { margin-top: 8px !important; font-size: 13px; color: var(--ifu-muted, #4A463E); }
.ifm-ai__msg.is-typing { display: flex; gap: 4px; padding: 14px 16px; }
.ifm-ai__msg.is-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ifu-muted, #4A463E); opacity: .35; animation: ifm-ai-dot 1s infinite; }
.ifm-ai__msg.is-typing i:nth-child(2) { animation-delay: .15s; }
.ifm-ai__msg.is-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ifm-ai-dot { 50% { opacity: 1; transform: translateY(-2px); } }
.ifm-ai__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ifm-ai__chips[hidden] { display: none; }
.ifm-ai__chip { padding: 7px 12px; border: 1px solid var(--ifu-line, #DDD5C7); border-radius: 999px; background: #fff; color: var(--ifu-ink, #16150F); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ifm-ai__chip:hover { border-color: var(--ifu-accent, #2A3BD6); color: var(--ifu-accent, #2A3BD6); }
.ifm-ai__form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 6px 6px 6px 14px; border: 1px solid var(--ifu-line, #DDD5C7); border-radius: 18px; background: #fff; }
.ifm-ai__form:focus-within { border-color: var(--ifu-accent, #2A3BD6); box-shadow: 0 0 0 3px rgba(42, 59, 214, .12); }
.ifm-ai__input { flex: 1; min-width: 0; min-height: 36px; max-height: 120px; padding: 8px 0; border: 0; outline: 0; resize: none; background: transparent; font: inherit; font-size: 15px; line-height: 1.4; color: var(--ifu-ink, #16150F); }
.ifm-ai__send { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--ifu-accent, #2A3BD6); color: #fff; cursor: pointer; }
.ifm-ai__note { margin: 6px 14px 10px; color: var(--ifu-muted, #4A463E); font-size: 11.5px; text-align: center; }

/* Ikonica u zaglavlju (telefon): ista ikonica, bez tačke; na računaru je skrivena — tamo je plutajuće dugme. */
.ifm-ai__bar { display: none; }
.ifm-ai__bar .ifm-ai__dot { display: none; }
/* Telefon: dugme iznad donje trake aplikacije; prozor preko celog ekrana. */
@media (max-width: 900px) {
	.ifm-ai__bar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ifu-ink, #16150F); cursor: pointer; }
	.ifm-ai__bar .ifm-ai__logo { width: 23px; height: 23px; }
	.ifm-ai.has-bar .ifm-ai__fab { display: none; }
	.ifm-ai { right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); }
	/* Strana proizvoda: traka za kupovinu je na dnu (tema, app.css) — dugme odmah iznad nje. */
	body.ifu-has-buybar .ifm-ai { bottom: calc(86px + env(safe-area-inset-bottom)); }
	/* Telefon: samo ikona (natpis ostaje za čitače ekrana) — „Uporedi“ je levo, ne preklapaju se. */
	.ifm-ai__fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
	.ifm-ai__fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 640px) {
	.ifm-ai.is-open { inset: 0; right: 0; bottom: 0; z-index: 1000; }
	.ifm-ai.is-open .ifm-ai__fab { display: none; }
	.ifm-ai__box { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
	.ifm-ai__note { margin-bottom: calc(10px + env(safe-area-inset-bottom)); }
	html.ifm-ai-lock { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
	.ifm-ai__fab { transition: none; }
	.ifm-ai__msg.is-typing i { animation: none; opacity: .7; }
}
@media print { .ifm-ai { display: none; } }
