@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700&display=swap');

/* ── ZynIQ AI Chat Widget ─────────────────────────────────────────────── */
#zyniq-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(0,224,255,0.45);
  background: linear-gradient(145deg, rgba(0,224,255,0.18), rgba(11,15,20,0.95));
  box-shadow: 0 0 24px rgba(0,224,255,0.30), 0 8px 24px rgba(0,0,0,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  color: #00e0ff;
}
#zyniq-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(0,224,255,0.50), 0 10px 30px rgba(0,0,0,0.6);
}
#zyniq-fab .zcw-ic-chat { display: block; }
#zyniq-fab .zcw-ic-x   { display: none; }
#zyniq-fab.open .zcw-ic-chat { display: none; }
#zyniq-fab.open .zcw-ic-x   { display: block; }
#zyniq-fab svg { width: 24px; height: 24px; flex: none; }

/* Panel */
#zyniq-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 1300;
  width: min(380px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 110px));
  display: none;
  flex-direction: column;
  background: #0d1520;
  border: 1px solid rgba(0,224,255,0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,224,255,0.08);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#zyniq-panel.open {
  display: flex;
  opacity: 1;
  transform: none;
}

/* Header */
.zcw-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 13px;
  background: #101720;
  border-bottom: 1px solid rgba(0,224,255,0.12);
  flex-shrink: 0;
}
.zcw-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(0,224,255,0.9), rgba(0,194,255,0.3), rgba(11,15,20,1));
  box-shadow: 0 0 14px rgba(0,224,255,0.4);
  flex-shrink: 0;
}
.zcw-name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #e6f0ff;
  line-height: 1.2;
}
.zcw-dot { color: #00e0ff; }
.zcw-sub {
  font-size: 0.72rem;
  color: #9db2c7;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}
.zcw-sub i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e0ff;
  box-shadow: 0 0 6px rgba(0,224,255,0.8);
  flex-shrink: 0;
}
.zcw-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #9db2c7;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s;
}
.zcw-close:hover { color: #e6f0ff; }
.zcw-close svg { width: 16px; height: 16px; }

/* Body */
.zcw-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,224,255,0.2) transparent;
}
.zcw-body::-webkit-scrollbar { width: 4px; }
.zcw-body::-webkit-scrollbar-track { background: transparent; }
.zcw-body::-webkit-scrollbar-thumb { background: rgba(0,224,255,0.2); border-radius: 4px; }

/* Messages */
.zcw-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.zcw-msg.bot {
  align-self: flex-start;
  background: #101720;
  border: 1px solid rgba(0,224,255,0.12);
  color: #e6f0ff;
  border-radius: 4px 12px 12px 12px;
}
.zcw-msg.user {
  align-self: flex-end;
  background: rgba(0,224,255,0.1);
  border: 1px solid rgba(0,224,255,0.25);
  color: #e6f0ff;
  border-radius: 12px 4px 12px 12px;
}

/* Typing indicator */
.zcw-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 14px;
  background: #101720;
  border: 1px solid rgba(0,224,255,0.12);
  border-radius: 4px 12px 12px 12px;
}
.zcw-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e0ff;
  opacity: 0.5;
  animation: zcwBounce 1.2s infinite ease-in-out;
}
.zcw-typing span:nth-child(2) { animation-delay: 0.2s; }
.zcw-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes zcwBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%            { transform: translateY(-5px); opacity: 1; }
}

/* Footer input */
.zcw-foot {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #101720;
  border-top: 1px solid rgba(0,224,255,0.1);
  flex-shrink: 0;
}
#zcw-input {
  flex: 1;
  background: #0b0f14;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.875rem;
  color: #e6f0ff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
#zcw-input::placeholder { color: #4a6070; }
#zcw-input:focus { border-color: rgba(0,224,255,0.4); }
#zcw-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #00e0ff, #0078ff);
  color: #01030a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.2s;
}
#zcw-send:hover { opacity: 0.85; transform: translateY(-1px); }
#zcw-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
#zcw-send svg { width: 16px; height: 16px; }

/* Powered by */
.zcw-powered {
  text-align: center;
  padding: 6px 0 8px;
  background: #101720;
  border-top: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.zcw-powered a {
  font-size: 0.68rem;
  color: #4a6070;
  text-decoration: none;
  transition: color 0.2s;
}
.zcw-powered a:hover { color: #9db2c7; }
.zcw-powered a b { color: #00e0ff; font-weight: 600; }

/* Mobile */
@media (max-width: 520px) {
  #zyniq-panel {
    top: calc(8px + env(safe-area-inset-top, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    right: 8px;
    width: auto;
    height: auto;
    border-radius: 14px;
  }
}
