/* Elite Kortex AI Chat Widget */
.ek-chat-fab{position:fixed;bottom:22px;right:22px;width:60px;height:60px;border-radius:50%;background:#9DD13F;color:#0A1628;border:none;cursor:pointer;box-shadow:0 12px 32px rgba(10,22,40,0.25),0 4px 12px rgba(157,209,63,0.4);display:flex;align-items:center;justify-content:center;z-index:9998;transition:transform 0.2s ease,background 0.2s}
.ek-chat-fab:hover{background:#7FB82E;transform:translateY(-2px)}
.ek-chat-fab svg{width:26px;height:26px}
.ek-chat-fab .ek-chat-pulse{position:absolute;top:-3px;right:-3px;width:14px;height:14px;background:#ef4444;border:2px solid #fff;border-radius:50%;animation:ek-pulse 2s infinite}
@keyframes ek-pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.2);opacity:0.8}}
.ek-chat-fab.open .ek-chat-pulse{display:none}

.ek-chat-panel{position:fixed;bottom:96px;right:22px;width:380px;max-width:calc(100vw - 32px);height:560px;max-height:calc(100vh - 120px);background:#fafbf3;border:1px solid rgba(14,26,46,0.12);border-radius:18px;box-shadow:0 24px 64px rgba(10,22,40,0.28);display:flex;flex-direction:column;overflow:hidden;z-index:9999;font-family:'Inter',system-ui,sans-serif;opacity:0;transform:translateY(12px) scale(0.98);pointer-events:none;transition:opacity 0.18s ease,transform 0.18s ease}
.ek-chat-panel.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}

.ek-chat-header{background:#0A1628;color:#fff;padding:1rem 1.15rem;display:flex;align-items:center;gap:0.75rem;flex-shrink:0}
.ek-chat-avatar{width:38px;height:38px;border-radius:50%;background:#9DD13F;color:#0A1628;display:flex;align-items:center;justify-content:center;font-family:'Sora','Inter',sans-serif;font-weight:800;font-size:0.95rem;flex-shrink:0}
.ek-chat-titlewrap{flex:1;min-width:0}
.ek-chat-title{font-family:'Sora','Inter',sans-serif;font-weight:700;font-size:0.98rem;line-height:1.2;color:#fff}
.ek-chat-status{font-size:0.72rem;color:rgba(255,255,255,0.65);display:flex;align-items:center;gap:0.35rem;margin-top:2px}
.ek-chat-dot{width:7px;height:7px;border-radius:50%;background:#9DD13F;box-shadow:0 0 0 0 rgba(157,209,63,0.7);animation:ek-online 2.4s infinite}
@keyframes ek-online{0%{box-shadow:0 0 0 0 rgba(157,209,63,0.6)}70%{box-shadow:0 0 0 8px rgba(157,209,63,0)}100%{box-shadow:0 0 0 0 rgba(157,209,63,0)}}
.ek-chat-close{background:rgba(255,255,255,0.1);border:none;color:#fff;width:30px;height:30px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1.05rem;transition:background 0.2s}
.ek-chat-close:hover{background:rgba(255,255,255,0.2)}

.ek-chat-body{flex:1;overflow-y:auto;padding:1.1rem;display:flex;flex-direction:column;gap:0.7rem;background:#fafbf3;scroll-behavior:smooth}
.ek-chat-body::-webkit-scrollbar{width:6px}
.ek-chat-body::-webkit-scrollbar-thumb{background:rgba(14,26,46,0.18);border-radius:3px}

.ek-msg{max-width:82%;padding:0.7rem 0.95rem;border-radius:14px;font-size:0.86rem;line-height:1.5;color:#0E1A2E;word-wrap:break-word;white-space:pre-wrap;animation:ek-fade-in 0.22s ease}
@keyframes ek-fade-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.ek-msg.bot{background:#fff;border:1px solid rgba(14,26,46,0.1);align-self:flex-start;border-bottom-left-radius:4px}
.ek-msg.user{background:#0A1628;color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.ek-msg.error{background:#fee2e2;border:1px solid #fecaca;color:#991b1b;align-self:flex-start;border-bottom-left-radius:4px}

.ek-typing{align-self:flex-start;display:flex;gap:4px;padding:0.85rem 0.95rem;background:#fff;border:1px solid rgba(14,26,46,0.1);border-radius:14px;border-bottom-left-radius:4px}
.ek-typing span{width:7px;height:7px;border-radius:50%;background:rgba(14,26,46,0.4);animation:ek-bounce 1.2s infinite}
.ek-typing span:nth-child(2){animation-delay:0.15s}
.ek-typing span:nth-child(3){animation-delay:0.3s}
@keyframes ek-bounce{0%,80%,100%{transform:translateY(0);opacity:0.5}40%{transform:translateY(-5px);opacity:1}}

.ek-chat-suggest{display:flex;flex-wrap:wrap;gap:0.4rem;padding:0 1.1rem 0.5rem}
.ek-chat-chip{background:rgba(157,209,63,0.12);border:1px solid rgba(157,209,63,0.3);color:#5a8a18;font-size:0.74rem;font-weight:600;padding:0.4rem 0.75rem;border-radius:999px;cursor:pointer;transition:background 0.15s;font-family:inherit}
.ek-chat-chip:hover{background:rgba(157,209,63,0.22)}

.ek-chat-input-wrap{padding:0.85rem 1rem 1rem;border-top:1px solid rgba(14,26,46,0.1);background:#fff;flex-shrink:0}
.ek-chat-form{display:flex;gap:0.5rem;align-items:flex-end}
.ek-chat-input{flex:1;border:1px solid rgba(14,26,46,0.15);background:#fafbf3;border-radius:12px;padding:0.7rem 0.85rem;font-size:0.86rem;font-family:inherit;color:#0E1A2E;resize:none;max-height:110px;line-height:1.4;outline:none;transition:border-color 0.15s,background 0.15s}
.ek-chat-input:focus{border-color:#9DD13F;background:#fff}
.ek-chat-send{background:#9DD13F;color:#0A1628;border:none;width:40px;height:40px;border-radius:10px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.15s,opacity 0.15s;flex-shrink:0}
.ek-chat-send:hover:not(:disabled){background:#7FB82E}
.ek-chat-send:disabled{opacity:0.4;cursor:not-allowed}
.ek-chat-send svg{width:18px;height:18px}
.ek-chat-foot{font-size:0.66rem;color:rgba(14,26,46,0.45);text-align:center;margin-top:0.5rem;letter-spacing:0.02em}
.ek-chat-foot a{color:#7FB82E;font-weight:600}

@media (max-width:480px){
  .ek-chat-panel{width:100vw;max-width:100vw;height:100vh;max-height:100vh;bottom:0;right:0;border-radius:0}
  .ek-chat-fab{bottom:16px;right:16px}
}
