/* iSOFT "Ask about Isuru" chat widget — v1.0.0
   Neon theme matching the site. No dependencies. */

.isoft-chat-btn {
  position: fixed;
  right: 25px;
  bottom: 100px; /* stacked above the WhatsApp float (bottom 25px, 60px tall) */
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--neon-cyan);
  background: linear-gradient(135deg, #091224, #131c33);
  color: var(--neon-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px var(--neon-cyan-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.isoft-chat-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 28px var(--neon-cyan-glow);
}
.isoft-chat-btn .isoft-chat-btn-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #27c93f;
  box-shadow: 0 0 8px #27c93f;
}

.isoft-chat-panel {
  position: fixed;
  right: 25px;
  bottom: 172px;
  width: min(380px, calc(100vw - 40px));
  height: min(540px, calc(100vh - 200px));
  min-height: 380px;
  display: none;
  flex-direction: column;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 24px var(--neon-cyan-glow);
  z-index: 9999;
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
}
.isoft-chat-panel.open {
  display: flex;
  animation: isoft-chat-in 0.25s ease;
}
@keyframes isoft-chat-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.isoft-chat-header {
  padding: 14px 16px 10px;
  background: linear-gradient(135deg, #091224, #131c33);
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
}
.isoft-chat-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.isoft-chat-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.isoft-chat-title span { color: var(--neon-cyan); }
.isoft-chat-close {
  background: none;
  border: none;
  color: #9fb3c8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.isoft-chat-close:hover { color: #fff; }
.isoft-chat-disclaimer {
  margin-top: 4px;
  font-size: 11.5px;
  color: #9fb3c8;
}

.isoft-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.isoft-chat-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}
.isoft-chat-msg.user {
  align-self: flex-end;
  background: rgba(0, 240, 255, 0.16);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: #e6fbff;
  border-bottom-right-radius: 4px;
}
.isoft-chat-msg.bot {
  align-self: flex-start;
  background: rgba(14, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}
.isoft-chat-msg.bot .isoft-chat-msg-name {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--neon-cyan);
  margin-bottom: 3px;
}
.isoft-chat-typing {
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(14, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-cyan);
  letter-spacing: 2px;
}

.isoft-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 10px;
}
.isoft-chat-chip {
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--neon-cyan);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}
.isoft-chat-chip:hover {
  background: rgba(0, 240, 255, 0.12);
}

.isoft-chat-wa {
  display: block;
  margin: 0 14px 10px;
  text-align: center;
  text-decoration: none;
  border: 1px solid rgba(37, 211, 102, 0.6);
  color: #25d366;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
}
.isoft-chat-wa:hover { background: rgba(37, 211, 102, 0.1); }

.isoft-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.isoft-chat-input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.isoft-chat-input:focus { border-color: var(--neon-cyan); }
.isoft-chat-send {
  background: var(--neon-cyan);
  border: none;
  color: #04121a;
  font-weight: 700;
  border-radius: 10px;
  padding: 0 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.isoft-chat-send:disabled { opacity: 0.5; cursor: default; }

/* Mobile: bottom sheet */
@media (max-width: 520px) {
  .isoft-chat-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 72vh;
    min-height: 0;
    border-radius: 18px 18px 0 0;
  }
  .isoft-chat-btn {
    right: 20px;
    bottom: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .isoft-chat-panel.open { animation: none; }
  .isoft-chat-btn, .isoft-chat-send, .isoft-chat-chip { transition: none; }
}
