/* Indian OncoCare — self-hosted website chat widget */
:root {
  --ioc-chat-accent: #0e7c66;      /* medical teal — change to your brand colour */
  --ioc-chat-accent-dark: #0a5d4c;
  --ioc-chat-bg: #ffffff;
  --ioc-chat-text: #1f2937;
  --ioc-chat-muted: #6b7280;
  --ioc-chat-visitor: #0e7c66;
  --ioc-chat-agent: #eef2f1;
}

#iocChatLauncher {
  position: fixed;
  right: 24px;                     /* if this overlaps your WhatsApp float, change to: left: 24px; */
  bottom: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--ioc-chat-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  display: flex; align-items: center; justify-content: center;
  z-index: 99998;
  transition: transform .15s ease, background .15s ease;
}
#iocChatLauncher:hover { transform: scale(1.06); background: var(--ioc-chat-accent-dark); }
#iocChatLauncher svg { width: 28px; height: 28px; }

#iocChatPanel {
  position: fixed;
  right: 24px; bottom: 96px;
  width: 340px; max-width: calc(100vw - 32px);
  height: 480px; max-height: calc(100vh - 130px);
  background: var(--ioc-chat-bg);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
  display: none; flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  font-family: inherit;
}
#iocChatPanel.open { display: flex; }

.ioc-chat-head {
  background: var(--ioc-chat-accent);
  color: #fff; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.ioc-chat-head h4 { margin: 0; font-size: 1rem; }
.ioc-chat-head span { font-size: .75rem; opacity: .9; display: block; }
.ioc-chat-close { margin-left: auto; background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; }

.ioc-chat-body {
  flex: 1; padding: 14px; overflow-y: auto;
  background: #f7faf9; color: var(--ioc-chat-text);
  display: flex; flex-direction: column; gap: 10px;
}
.ioc-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: .9rem; line-height: 1.4; word-wrap: break-word; }
.ioc-msg.visitor { align-self: flex-end; background: var(--ioc-chat-visitor); color: #fff; border-bottom-right-radius: 4px; }
.ioc-msg.agent, .ioc-msg.bot { align-self: flex-start; background: var(--ioc-chat-agent); color: var(--ioc-chat-text); border-bottom-left-radius: 4px; }
.ioc-msg a { color: inherit; text-decoration: underline; }

.ioc-prechat { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ioc-prechat p { margin: 0 0 4px; font-size: .88rem; color: var(--ioc-chat-muted); }
.ioc-prechat input {
  padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; font-size: .9rem; width: 100%;
}
.ioc-prechat button, .ioc-chat-send button {
  background: var(--ioc-chat-accent); color: #fff; border: none; border-radius: 10px;
  padding: 10px 14px; font-size: .9rem; cursor: pointer;
}
.ioc-prechat button:hover, .ioc-chat-send button:hover { background: var(--ioc-chat-accent-dark); }

.ioc-chat-send { display: none; padding: 10px; border-top: 1px solid #eee; gap: 8px; }
.ioc-chat-send.show { display: flex; }
.ioc-chat-send input {
  flex: 1; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 20px; font-size: .9rem;
}
.ioc-chat-send button { border-radius: 50%; width: 42px; height: 42px; padding: 0; display: flex; align-items: center; justify-content: center; }

.ioc-chat-foot { text-align: center; font-size: .68rem; color: var(--ioc-chat-muted); padding: 6px; }