/* OmadSavdo — AI yordamchi vidjeti */
.oscb { --b-p: #6D28D9; --b-p2: #7C3AED; --b-bg: #fff; --b-ink: #1C1530; --b-mut: #6E6888; --b-line: #ECE9F3; --b-soft: #F5F3FF; position: fixed; right: 22px; bottom: 22px; z-index: 99990; font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; }
.oscb[hidden] { display: none; }
:root[data-theme="dark"] .oscb, .dark .oscb { --b-bg: #231C38; --b-ink: #F4F1FF; --b-mut: #B2A9D1; --b-line: #3A3158; --b-soft: #2D2447; }
.oscb *, .oscb *::before, .oscb *::after { box-sizing: border-box; }
.oscb button, .oscb input, .oscb textarea { font-family: inherit; }
.oscb-fab { position: relative; display: block; width: 68px; height: 68px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 12px 30px -6px rgba(76, 29, 149, .55), 0 0 0 0 rgba(124, 58, 237, .5); animation: oscbPulse 2.8s ease-out infinite; transition: transform .2s; }
.oscb-fab:hover { transform: translateY(-3px) scale(1.04); }
.oscb-fab img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.oscb-dot { position: absolute; right: 2px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; background: #22C55E; border: 3px solid #fff; }
@keyframes oscbPulse { 0% { box-shadow: 0 12px 30px -6px rgba(76,29,149,.55), 0 0 0 0 rgba(124,58,237,.45); } 70% { box-shadow: 0 12px 30px -6px rgba(76,29,149,.55), 0 0 0 16px rgba(124,58,237,0); } 100% { box-shadow: 0 12px 30px -6px rgba(76,29,149,.55), 0 0 0 0 rgba(124,58,237,0); } }
.oscb.is-open .oscb-fab { display: none; }
.oscb-bubble { position: absolute; right: 80px; bottom: 14px; max-width: 250px; width: max-content; padding: 11px 16px; border-radius: 18px 18px 4px 18px; background: var(--b-bg); color: var(--b-ink); font-size: 14px; font-weight: 700; line-height: 1.35; box-shadow: 0 14px 34px -10px rgba(40, 20, 90, .4); cursor: pointer; animation: oscbIn .4s ease-out; }
.oscb-bubble[hidden] { display: none; }
@keyframes oscbIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

.oscb-panel { position: absolute; right: 0; bottom: 0; width: 392px; height: min(640px, calc(100vh - 44px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: var(--b-bg); color: var(--b-ink); box-shadow: 0 30px 80px -20px rgba(40, 20, 90, .55), 0 0 0 1px var(--b-line); animation: oscbPop .28s cubic-bezier(.2, .9, .3, 1.2); transform-origin: bottom right; }
.oscb-panel[hidden] { display: none; }
@keyframes oscbPop { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
.oscb-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; color: #fff; background: radial-gradient(120% 160% at 0% 0%, #8B5CF6 0%, #5B21B6 60%, #3B1A86 100%); }
.oscb-av { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; background: #fff; padding: 2px; }
.oscb-av img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.oscb-av .oscb-dot { right: -1px; bottom: 0; width: 13px; height: 13px; border-color: #5B21B6; }
.oscb-who { flex: 1; min-width: 0; line-height: 1.2; } .oscb-who b { display: block; font-size: 17px; font-weight: 800; } .oscb-who small { font-size: 12.5px; opacity: .85; font-weight: 600; }
.oscb-ib { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; transition: background .15s; }
.oscb-ib:hover { background: rgba(255, 255, 255, .3); } .oscb-ib svg { width: 18px; height: 18px; }

.oscb-msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; background: var(--b-soft); scroll-behavior: smooth; overscroll-behavior: contain; }
.oscb-row { display: flex; align-items: flex-end; gap: 8px; animation: oscbIn .3s ease-out; } .oscb-row.is-now { animation: none; }
.oscb-row.is-user { justify-content: flex-end; }
.oscb-mini { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(40, 20, 90, .2); }
.oscb-sp { background: none !important; box-shadow: none !important; }
.oscb-col { min-width: 0; max-width: calc(100% - 38px); display: grid; gap: 8px; }
.oscb-b { padding: 10px 14px; border-radius: 18px 18px 18px 5px; background: var(--b-bg); color: var(--b-ink); font-size: 14.5px; font-weight: 500; line-height: 1.5; word-wrap: break-word; box-shadow: 0 1px 2px rgba(40, 20, 90, .08); }
.is-user .oscb-b { max-width: 82%; border-radius: 18px 18px 5px 18px; background: linear-gradient(135deg, #7C3AED, #5B21B6); color: #fff; font-weight: 600; }
.oscb-typing { display: inline-flex; gap: 4px; padding: 13px 15px; } .oscb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #A78BFA; animation: oscbDot 1.1s infinite ease-in-out; } .oscb-typing i:nth-child(2) { animation-delay: .16s; } .oscb-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes oscbDot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.oscb-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.oscb-cl { width: 100%; font-size: 12px; font-weight: 800; color: var(--b-mut); }
.oscb-chip { padding: 8px 13px; border: 1.5px solid #DDD6FE; border-radius: 99px; background: var(--b-bg); color: var(--b-p); font-size: 13px; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer; transition: all .15s; }
.oscb-chip:hover { background: var(--b-p2); border-color: var(--b-p2); color: #fff; transform: translateY(-1px); }
.oscb-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border: 1.5px solid #DDD6FE; border-radius: 14px; background: var(--b-bg); color: var(--b-p); font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer; transition: all .15s; }
.oscb-btn:hover { background: var(--b-soft); border-color: var(--b-p2); }
.oscb-btn.is-pri { border: 0; background: linear-gradient(135deg, #7C3AED, #5B21B6); color: #fff; } .oscb-btn.is-pri:disabled { opacity: .6; }
.oscb-cards { display: grid; gap: 8px; margin: 0; padding: 0; }
.oscb-card { display: grid; grid-template-columns: 78px 1fr; column-gap: 12px; row-gap: 3px; align-items: center; align-content: center; padding: 8px; border-radius: 16px; background: var(--b-bg); color: var(--b-ink); text-decoration: none; box-shadow: 0 1px 3px rgba(40, 20, 90, .12); transition: transform .15s, box-shadow .15s; }
.oscb-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(76, 29, 149, .4); }
.oscb-ci { grid-row: 1 / 3; display: block; width: 78px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--b-soft); } .oscb-ci img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oscb-card b { align-self: end; font-size: 13.5px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oscb-pr { align-self: start; font-size: 15px; font-weight: 800; color: var(--b-p); } .oscb-pr s { font-size: 11.5px; font-weight: 600; color: var(--b-mut); margin-left: 3px; }
.oscb-lead { display: grid; gap: 8px; width: 100%; padding: 12px; border-radius: 16px; background: var(--b-bg); box-shadow: 0 1px 3px rgba(40, 20, 90, .12); }
.oscb-lead input, .oscb-lead textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--b-line); border-radius: 12px; background: var(--b-bg); color: var(--b-ink); font-size: 14px; resize: none; }
.oscb-lead input:focus, .oscb-lead textarea:focus { outline: 0; border-color: var(--b-p2); box-shadow: 0 0 0 3px rgba(124, 58, 237, .15); }
.oscb-in { flex: none; display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--b-line); background: var(--b-bg); }
.oscb-in input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border: 1.5px solid var(--b-line); border-radius: 99px; background: var(--b-soft); color: var(--b-ink); font-size: 15px; }
.oscb-in input:focus { outline: 0; border-color: var(--b-p2); background: var(--b-bg); }
.oscb-in button { flex: none; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, #7C3AED, #5B21B6); color: #fff; cursor: pointer; transition: transform .15s; } .oscb-in button:hover { transform: scale(1.08); } .oscb-in button svg { width: 21px; height: 21px; margin-left: 2px; }
.oscb-note { flex: none; padding: 0 12px 10px; background: var(--b-bg); color: var(--b-mut); font-size: 11.5px; font-weight: 600; text-align: center; }

@media (max-width: 640px) {
  .oscb { right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .oscb-fab { width: 60px; height: 60px; }
  .oscb-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; }
  .oscb-head { padding-top: max(14px, env(safe-area-inset-top)); }
  .oscb-bubble { right: 72px; }
}
@media (prefers-reduced-motion: reduce) { .oscb-fab, .oscb-panel, .oscb-row, .oscb-bubble { animation: none; } }
