/* Jake - Softverses chat assistant + WhatsApp float. No dependencies. */
:root { --jk-accent: #a837bf; --jk-accent-2: #e37af8; --jk-bg: #0f0f12; --jk-card: #1a1a20; --jk-text: #f3f3f6; --jk-muted: #a8a8b3; --jk-wa: #25d366; }

.jk-fab {
  position: fixed; bottom: 24px; z-index: 1040; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); transition: transform .2s ease, box-shadow .2s ease; padding: 0;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.jk-fab { right: 24px; background: linear-gradient(135deg, var(--jk-accent), var(--jk-accent-2)); color: #fff; }
.jk-fab:hover { transform: scale(1.08); }
.jk-wa:focus-visible, .jk-fab:focus-visible, .jk-chip:focus-visible, .jk-send:focus-visible, .jk-x:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--jk-accent); }
.jk-fab svg { width: 28px; height: 28px; fill: currentColor; pointer-events: none; }
.jk-fab.jk-open { display: none; }
/* attention: glow-and-fade, plus a small wiggle every few seconds */
.jk-fab { animation: jk-glow 2.4s ease-in-out infinite, jk-wiggle 7s ease-in-out infinite; }
.jk-fab:hover, .jk-fab:focus-visible { animation-play-state: paused; }
@keyframes jk-glow {
  0%, 100% { box-shadow: 0 6px 20px rgba(0,0,0,.35), 0 0 6px 1px rgba(227,122,248,.25); }
  50%      { box-shadow: 0 6px 20px rgba(0,0,0,.35), 0 0 26px 10px rgba(227,122,248,.85); }
}
@keyframes jk-wiggle {
  0%, 82%, 100% { transform: none; }
  86% { transform: rotate(-12deg) scale(1.06); } 90% { transform: rotate(10deg) scale(1.06); }
  94% { transform: rotate(-6deg); } 97% { transform: rotate(3deg); }
}
.jk-snd { background: transparent; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.jk-snd:hover { background: rgba(255,255,255,.18); }
.jk-snd:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.jk-snd svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jk-snd .jk-off { display: none; } .jk-snd.jk-muted .jk-off { display: inline; } .jk-snd.jk-muted .jk-on { display: none; }

/* WhatsApp: slim sticky tab docked to the right screen edge (beside the scrollbar), clear of the cookie banner (bottom-left) and Jake (bottom-right) */
.jk-wa {
  position: fixed; right: 0; top: 50%; z-index: 1040; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 9px 14px 11px;
  background: var(--jk-wa); color: #fff !important; text-decoration: none; border-radius: 14px 0 0 14px;
  box-shadow: -3px 4px 16px rgba(0,0,0,.35); font: 700 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .06em; transition: padding .2s ease, background .2s ease, box-shadow .2s ease;
  animation: jk-wa-in .5s ease .8s both; -webkit-tap-highlight-color: transparent;
}
.jk-wa svg { width: 24px; height: 24px; fill: currentColor; pointer-events: none; }
.jk-wa span { writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); white-space: nowrap; }
.jk-wa:hover, .jk-wa:focus-visible { padding-right: 16px; background: #1ebe5b; box-shadow: -5px 5px 22px rgba(37,211,102,.55); }
@keyframes jk-wa-in { from { transform: translate(100%, -50%); } to { transform: translate(0, -50%); } }

.jk-hint {
  position: fixed; right: 92px; bottom: 36px; z-index: 1040; background: #fff; color: #111; font: 600 14px/1.3 system-ui, sans-serif;
  padding: 10px 14px; border-radius: 14px 14px 4px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: none; max-width: 200px;
}
.jk-hint.jk-show { display: block; animation: jk-in .3s ease; }

.jk-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 1041; width: 344px; max-width: calc(100vw - 32px);
  height: 515px; max-height: calc(100vh - 48px); background: var(--jk-bg); color: var(--jk-text);
  border: 1px solid rgba(255,255,255,.12); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.5);
  display: none; flex-direction: column; overflow: hidden; font: 14.5px/1.42 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.jk-panel.jk-show { display: flex; animation: jk-in .25s ease; }
.jk-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: linear-gradient(135deg, var(--jk-accent), #6f2a85); }
.jk-av { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--jk-accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.jk-title { flex: 1; min-width: 0; }
.jk-title strong { display: block; font-size: 15px; color: #fff; }
.jk-title span { font-size: 11px; color: rgba(255,255,255,.85); }
.jk-x { background: transparent; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.jk-x:hover { background: rgba(255,255,255,.18); }

.jk-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.jk-msg { max-width: 88%; padding: 8px 11px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; animation: jk-in .25s ease; }
.jk-bot { background: var(--jk-card); align-self: flex-start; border-bottom-left-radius: 4px; }
.jk-me { background: var(--jk-accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.jk-typing { display: inline-flex; gap: 4px; padding: 14px; }
.jk-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--jk-muted); animation: jk-dot 1s infinite; }
.jk-typing i:nth-child(2) { animation-delay: .15s; } .jk-typing i:nth-child(3) { animation-delay: .3s; }

.jk-foot { padding: 9px 11px 11px; border-top: 1px solid rgba(255,255,255,.08); background: var(--jk-bg); }
.jk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.jk-chip { background: transparent; color: var(--jk-text); border: 1.5px solid var(--jk-accent-2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; transition: background .15s; }
.jk-chip:hover { background: var(--jk-accent); border-color: var(--jk-accent); }
.jk-form { display: flex; gap: 8px; }
.jk-form input, .jk-form textarea { flex: 1; min-width: 0; background: var(--jk-card); color: var(--jk-text); border: 1.5px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; resize: none; }
.jk-form input:focus, .jk-form textarea:focus { outline: none; border-color: var(--jk-accent-2); }
.jk-send { background: var(--jk-accent); color: #fff; border: 0; border-radius: 12px; padding: 0 16px; font: inherit; font-weight: 600; cursor: pointer; }
.jk-send:disabled { opacity: .5; cursor: default; }
.jk-err { color: #ff8a8a; font-size: 13px; margin: 0 0 6px; }
.jk-skip { background: none; border: 0; color: var(--jk-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; margin-top: 8px; padding: 4px 0; }
.jk-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--jk-wa); color: #fff !important; font-weight: 700; padding: 11px 16px; border-radius: 12px; text-decoration: none; margin-top: 4px; }
.jk-cta svg { width: 20px; height: 20px; fill: #fff; }
.jk-links a { color: var(--jk-accent-2); }
.jk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

@keyframes jk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes jk-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

@media (max-width: 576px) {
  .jk-fab { width: 52px; height: 52px; bottom: 18px; right: 16px; }
  .jk-wa { padding: 12px 7px 12px 9px; gap: 8px; font-size: 12px; }
  .jk-wa svg { width: 22px; height: 22px; }
  .jk-hint { right: 80px; bottom: 28px; }
  .jk-panel { right: 0; bottom: 0; left: 0; width: 100%; max-width: 100%; height: 80vh; max-height: 80vh; border-radius: 18px 18px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .jk-fab, .jk-wa { animation: none !important; } .jk-panel, .jk-msg, .jk-hint, .jk-typing i { animation: none !important; } .jk-body { scroll-behavior: auto; } }
