/* OplixoAi Chat widget (Nov 2026). All rules are scoped to #oplixo-chat. Brand: #0b0b0b / #ffc82a. */
#oplixo-chat { --oc-y: #ffc82a; --oc-k: #0b0b0b; position: fixed; right: 22px; bottom: 22px; z-index: 9990; font-family: 'Montserrat', sans-serif; color: #1a1a1a; }
#oplixo-chat *, #oplixo-chat *::before, #oplixo-chat *::after { box-sizing: border-box; }

/* launcher */
#oplixo-chat .oc-launch { position: relative; display: block; width: 74px; height: 74px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--oc-y);
    box-shadow: 0 14px 34px rgba(0,0,0,.3); transition: transform .2s ease; animation: ocPop .5s cubic-bezier(.3,1.5,.5,1) both; overflow: visible; }
#oplixo-chat .oc-launch:hover { transform: translateY(-2px) scale(1.04); }
/* the figure pops out of the circle: everything above the circle's centre is shown whole (head + shoulders),
   below that the picture is clipped to the circle, so nothing is cut off at the top or the sides */
#oplixo-chat .oc-launch img { position: absolute; left: 50%; bottom: 0; width: 96px; height: 96px; transform: translateX(-50%); object-fit: contain; object-position: 50% 100%;
    -webkit-mask: linear-gradient(#000 0 0) top / 100% 62% no-repeat, radial-gradient(circle 37px at 50% calc(100% - 37px), #000 99%, transparent 100%);
    mask: linear-gradient(#000 0 0) top / 100% 62% no-repeat, radial-gradient(circle 37px at 50% calc(100% - 37px), #000 99%, transparent 100%);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); animation: ocBob 4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes ocBob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-3px); } }
#oplixo-chat .oc-launch::after { content: ""; position: absolute; right: 0; bottom: 6px; width: 16px; height: 16px; border-radius: 50%; background: #3ddc84; border: 3px solid #fff; animation: ocLive 2s ease-out infinite; z-index: 2; }
#oplixo-chat .oc-launch .oc-ring { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; border-radius: 50%; border: 2px solid rgba(255,200,42,.6); animation: ocRing 2.6s ease-out infinite; pointer-events: none; }
@keyframes ocPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes ocLive { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.7); } 80%, 100% { box-shadow: 0 0 0 8px rgba(61,220,132,0); } }
@keyframes ocRing { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }

/* teaser bubble */
#oplixo-chat .oc-teaser { position: absolute; right: 88px; bottom: 18px; width: 250px; padding: 13px 34px 13px 15px; border-radius: 18px 18px 4px 18px; background: #fff; color: #1a1a1a;
    font-size: 13.5px; line-height: 1.45; font-weight: 600; box-shadow: 0 16px 40px rgba(0,0,0,.18); cursor: pointer; animation: ocTeaser .45s cubic-bezier(.22,.8,.3,1) both; }
#oplixo-chat .oc-teaser b { color: var(--oc-k); }
#oplixo-chat .oc-teaser button { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #f2f2f2; color: #555; font-size: 15px; line-height: 1; cursor: pointer; }
@keyframes ocTeaser { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

/* panel */
#oplixo-chat .oc-panel { position: absolute; right: 0; bottom: 0; width: 392px; height: min(640px, calc(100vh - 44px)); display: flex; flex-direction: column; overflow: hidden;
    border-radius: 24px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.28); animation: ocOpen .35s cubic-bezier(.22,.8,.3,1) both; }
@keyframes ocOpen { from { opacity: 0; transform: translateY(16px) scale(.97); transform-origin: 100% 100%; } to { opacity: 1; transform: none; } }
#oplixo-chat .oc-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 14px; background: var(--oc-k); color: #fff; overflow: hidden; }
#oplixo-chat .oc-head::before { content: ""; position: absolute; width: 260px; height: 260px; right: -110px; top: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(255,200,42,.35) 0%, rgba(255,200,42,0) 70%); }
#oplixo-chat .oc-head > * { position: relative; }
#oplixo-chat .oc-ava { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; background: #1c1c1c; box-shadow: 0 0 0 2px var(--oc-y); overflow: hidden; }
#oplixo-chat .oc-ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
#oplixo-chat .oc-who { flex: 1; min-width: 0; }
#oplixo-chat .oc-who strong { display: block; font-size: 15px; font-weight: 800; line-height: 1.2; }
#oplixo-chat .oc-who span { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: #bdbdbd; }
#oplixo-chat .oc-who span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; }
#oplixo-chat .oc-x { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #1f1f1f; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
#oplixo-chat .oc-x:hover { background: #333; }

#oplixo-chat .oc-body { flex: 1; overflow-y: auto; padding: 18px 14px 8px; background: #fafafa; background-image: radial-gradient(rgba(0,0,0,.045) 1px, transparent 1.2px); background-size: 20px 20px; scroll-behavior: smooth; }
#oplixo-chat .oc-msg { display: flex; gap: 8px; margin-bottom: 12px; animation: ocMsg .3s ease both; }
@keyframes ocMsg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#oplixo-chat .oc-msg .oc-mini { flex: 0 0 28px; height: 28px; border-radius: 50%; overflow: hidden; background: #1c1c1c; align-self: flex-end; }
#oplixo-chat .oc-msg .oc-mini img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
#oplixo-chat .oc-bubble { max-width: 82%; padding: 11px 14px; border-radius: 18px 18px 18px 6px; background: #fff; border: 1px solid #eee; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 4px 14px rgba(0,0,0,.04); }
#oplixo-chat .oc-bubble a { color: #8a6400; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
#oplixo-chat .oc-msg--me { justify-content: flex-end; }
#oplixo-chat .oc-msg--me .oc-bubble { background: var(--oc-k); color: #fff; border-color: var(--oc-k); border-radius: 18px 18px 6px 18px; }
#oplixo-chat .oc-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
#oplixo-chat .oc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #c9c9c9; animation: ocDot 1.2s ease-in-out infinite; }
#oplixo-chat .oc-typing i:nth-child(2) { animation-delay: .15s; } #oplixo-chat .oc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ocDot { 0%, 60%, 100% { transform: translateY(0); background: #c9c9c9; } 30% { transform: translateY(-5px); background: var(--oc-y); } }

#oplixo-chat .oc-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 12px 36px; }
#oplixo-chat .oc-chips button { padding: 8px 13px; border-radius: 999px; border: 1.5px solid #e3e3e3; background: #fff; color: #1a1a1a; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s; }
#oplixo-chat .oc-chips button:hover { border-color: var(--oc-y); background: #fff7d6; }

/* offer cards under an assistant reply: first photo, title, specs, price, "Zobacz" */
#oplixo-chat .oc-offers { display: grid; gap: 8px; margin: -4px 0 14px 36px; }
#oplixo-chat .oc-offer { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid #eee; color: #1a1a1a; text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.05); transition: border-color .15s, transform .15s; animation: ocMsg .35s ease both; }
#oplixo-chat .oc-offer:nth-child(2) { animation-delay: .08s; } #oplixo-chat .oc-offer:nth-child(3) { animation-delay: .16s; }
#oplixo-chat .oc-offer:hover { border-color: var(--oc-y); transform: translateY(-1px); color: #1a1a1a; text-decoration: none; }
#oplixo-chat .oc-offer-img { flex: 0 0 84px; height: 64px; border-radius: 11px; overflow: hidden; background: #eee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 4l9 6.5'/%3E%3Cpath d='M5 9.5V20h14V9.5'/%3E%3C/svg%3E") center / 26px no-repeat; }
#oplixo-chat .oc-offer-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
#oplixo-chat .oc-offer-txt { flex: 1; min-width: 0; }
#oplixo-chat .oc-offer-txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
#oplixo-chat .oc-offer-txt small { display: block; margin-top: 2px; font-size: 11px; color: #8c8c8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#oplixo-chat .oc-offer-txt strong { display: block; margin-top: 2px; font-size: 13px; font-weight: 800; }
#oplixo-chat .oc-offer-btn { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: var(--oc-y); color: var(--oc-k); font-size: 12px; font-weight: 800; }
#oplixo-chat .oc-offer:hover .oc-offer-btn { background: var(--oc-k); color: var(--oc-y); }

#oplixo-chat .oc-agent { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px 36px; padding: 12px; border-radius: 16px; background: #fff7d6; border: 1px solid #ffe08a; }
#oplixo-chat .oc-agent img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #eee; }
#oplixo-chat .oc-agent b { display: block; font-size: 14px; }
#oplixo-chat .oc-agent small { display: block; font-size: 12px; color: #6b5a1d; }
#oplixo-chat .oc-agent a { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--oc-k); text-decoration: none; border-bottom: 2px solid var(--oc-y); }

#oplixo-chat .oc-foot { padding: 10px 12px 12px; background: #fff; border-top: 1px solid #eee; }
#oplixo-chat .oc-form { display: flex; align-items: flex-end; gap: 8px; }
#oplixo-chat .oc-form textarea { flex: 1; min-height: 46px; max-height: 120px; padding: 12px 14px; border: 1.5px solid #e3e3e3; border-radius: 16px; resize: none; font: inherit; font-size: 14px; line-height: 1.4; color: #111; outline: none; background: #fff; }
#oplixo-chat .oc-form textarea:focus { border-color: var(--oc-y); }
#oplixo-chat .oc-send { flex: 0 0 46px; height: 46px; border: 0; border-radius: 50%; background: var(--oc-y); color: var(--oc-k); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .15s; }
#oplixo-chat .oc-send:hover { transform: scale(1.06); }
#oplixo-chat .oc-send:disabled { background: #eee; color: #aaa; transform: none; cursor: default; }
#oplixo-chat .oc-send svg { width: 20px; height: 20px; }
#oplixo-chat .oc-legal { margin: 8px 2px 0; font-size: 10.5px; line-height: 1.4; color: #8c8c8c; }
#oplixo-chat .oc-legal a { color: #555; }
#oplixo-chat .oc-brand { float: right; font-weight: 700; color: #b5b5b5; }
#oplixo-chat .oc-end { display: block; margin: 0 0 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 700; color: #8a6400; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
#oplixo-chat .oc-end:hover { color: #0b0b0b; text-decoration-color: #ffc82a; }
#oplixo-chat .oc-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px 36px; padding: 10px 12px; border-radius: 14px; background: #fff7d6; border: 1px solid #ffe08a; font-size: 13px; }
#oplixo-chat .oc-confirm span { flex: 1 1 100%; font-weight: 600; }
#oplixo-chat .oc-confirm button { padding: 7px 14px; border-radius: 999px; border: 0; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; background: #0b0b0b; color: #ffc82a; }
#oplixo-chat .oc-confirm button[data-a="no"] { background: #fff; color: #1a1a1a; border: 1.5px solid #e3e3e3; }

@media (max-width: 575px) {
    #oplixo-chat { right: 14px; bottom: 14px; }
    #oplixo-chat .oc-launch { width: 64px; height: 64px; }
    #oplixo-chat .oc-launch img { width: 84px; height: 84px;
        -webkit-mask: linear-gradient(#000 0 0) top / 100% 62% no-repeat, radial-gradient(circle 32px at 50% calc(100% - 32px), #000 99%, transparent 100%);
        mask: linear-gradient(#000 0 0) top / 100% 62% no-repeat, radial-gradient(circle 32px at 50% calc(100% - 32px), #000 99%, transparent 100%); }
    #oplixo-chat .oc-launch .oc-ring { height: 64px; }
    #oplixo-chat .oc-teaser { right: 74px; width: min(230px, calc(100vw - 110px)); font-size: 13px; }
    #oplixo-chat.is-open { inset: 0; right: 0; bottom: 0; }
    #oplixo-chat.is-open .oc-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
    #oplixo-chat .oc-form textarea { font-size: 16px; } /* no iOS zoom */
}
@media (prefers-reduced-motion: reduce) { #oplixo-chat *, #oplixo-chat *::before, #oplixo-chat *::after { animation: none !important; } }
