#csc-chatbot-sitewide, #csc-chatbot-inline { position: relative; z-index: 999999; }

/* Elementor isolation */
#csc-chatbot-sitewide .csc-widget,
#csc-chatbot-inline .csc-widget{
  all: initial;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#csc-chatbot-sitewide .csc-widget *,
#csc-chatbot-inline .csc-widget *{ box-sizing: border-box; font-family: inherit; }

#csc-chatbot-sitewide .csc-launcher,
#csc-chatbot-inline .csc-launcher{
  all: unset;
  width: 56px; height: 56px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 30px rgba(2,6,23,.18);
  position: relative;
}
#csc-chatbot-sitewide .csc-launcher svg,
#csc-chatbot-inline .csc-launcher svg{ width: 26px; height: 26px; fill: #fff; opacity: .95; }

#csc-chatbot-sitewide .csc-launcher-dot,
#csc-chatbot-inline .csc-launcher-dot{
  position:absolute; top: 10px; right: 10px;
  width: 10px; height: 10px; border-radius: 999px;
  background: #22c55e;
  border: 2px solid rgba(255,255,255,.9);
}

#csc-chatbot-sitewide .csc-panel,
#csc-chatbot-inline .csc-panel{
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(380px, calc(100vw - 24px));
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(148,163,184,.35);
  box-shadow: 0 24px 70px rgba(2,6,23,.22);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: all .16s ease;
}
#csc-chatbot-sitewide .csc-panel.is-open,
#csc-chatbot-inline .csc-panel.is-open{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#csc-chatbot-sitewide .csc-header,
#csc-chatbot-inline .csc-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  background:
    radial-gradient(900px 220px at 20% 0%, rgba(59,130,246,.22), transparent 55%),
    linear-gradient(180deg, #0f172a, #111827);
  color:#fff;
}

#csc-chatbot-sitewide .csc-brand,
#csc-chatbot-inline .csc-brand{ display:flex; align-items:center; gap:10px; }

#csc-chatbot-sitewide .csc-logo,
#csc-chatbot-inline .csc-logo{
  width:38px; height:38px; border-radius: 12px; overflow:hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  display:flex; align-items:center; justify-content:center;
}
#csc-chatbot-sitewide .csc-logo img,
#csc-chatbot-inline .csc-logo img{ width:100%; height:100%; object-fit: cover; display:block; }

#csc-chatbot-sitewide .csc-logo-ph,
#csc-chatbot-inline .csc-logo-ph{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-weight: 800; letter-spacing:.5px; font-size: 13px;
  color:#fff;
  background: linear-gradient(135deg, #2563eb, #6366f1);
}

#csc-chatbot-sitewide .csc-title,
#csc-chatbot-inline .csc-title{ font-weight: 800; font-size: 13px; line-height: 1; color:#fff; }
#csc-chatbot-sitewide .csc-subtitle,
#csc-chatbot-inline .csc-subtitle{ font-size: 11px; opacity:.85; margin-top: 3px; color:#fff; }

#csc-chatbot-sitewide .csc-headbtns,
#csc-chatbot-inline .csc-headbtns{ display:flex; gap:8px; align-items:center; }

#csc-chatbot-sitewide .csc-headbtn,
#csc-chatbot-inline .csc-headbtn{
  all: unset;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color:#fff;
  padding: 7px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-size: 12px;
  line-height: 1;
}

#csc-chatbot-sitewide .csc-chatlog,
#csc-chatbot-inline .csc-chatlog{
  height: 360px;
  overflow-y:auto;
  padding: 12px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

#csc-chatbot-sitewide .csc-row,
#csc-chatbot-inline .csc-row{ display:flex; margin: 9px 0; }
#csc-chatbot-sitewide .csc-user,
#csc-chatbot-inline .csc-user{ justify-content:flex-end; }
#csc-chatbot-sitewide .csc-bot,
#csc-chatbot-inline .csc-bot{ justify-content:flex-start; }

#csc-chatbot-sitewide .csc-msg,
#csc-chatbot-inline .csc-msg{
  max-width: 84%;
  padding: 9px 11px;
  border-radius: 14px;
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid rgba(148,163,184,.25);
  color: #0f172a;
  background: #fff;
}

#csc-chatbot-sitewide .csc-user-msg,
#csc-chatbot-inline .csc-user-msg{
  background: linear-gradient(180deg, rgba(37,99,235,.14), rgba(37,99,235,.08));
}

#csc-chatbot-sitewide .csc-system,
#csc-chatbot-inline .csc-system{
  margin: 10px 0;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
  background: rgba(2,6,23,.04);
  border: 1px dashed rgba(148,163,184,.6);
  padding: 8px 10px;
  border-radius: 12px;
}

#csc-chatbot-sitewide .csc-actions,
#csc-chatbot-inline .csc-actions{
  padding: 10px 12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  border-top: 1px solid rgba(148,163,184,.18);
  background: #fff;
}

/* ✅ readable buttons (no white-on-white) */
#csc-chatbot-sitewide .csc-btn,
#csc-chatbot-inline .csc-btn{
  all: unset;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12.5px;
  line-height: 1;
  cursor:pointer;
  border: 1px solid rgba(148,163,184,.45);
  background: #f8fafc;
  color: #0f172a;
}
#csc-chatbot-sitewide .csc-btn-primary,
#csc-chatbot-inline .csc-btn-primary{
  border: 1px solid rgba(37,99,235,.55);
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color:#fff;
}
#csc-chatbot-sitewide .csc-btn-chip,
#csc-chatbot-inline .csc-btn-chip{ background: rgba(2,6,23,.03); }

#csc-chatbot-sitewide .csc-upload,
#csc-chatbot-inline .csc-upload{
  padding: 10px 12px;
  display:flex;
  align-items:center;
  gap:10px;
  border-top: 1px solid rgba(148,163,184,.18);
  background: #fff;
}
#csc-chatbot-sitewide .csc-uploadbtn,
#csc-chatbot-inline .csc-uploadbtn{
  all: unset;
  display:inline-flex; align-items:center; gap:6px;
  padding: 8px 10px;
  border: 1px solid rgba(148,163,184,.45);
  border-radius: 12px;
  background: #f8fafc;
  cursor:pointer;
  font-size: 12.5px;
  line-height: 1;
  color: #0f172a;
}
#csc-chatbot-sitewide .csc-uploadhint,
#csc-chatbot-inline .csc-uploadhint{ font-size: 12px; color: #475569; }

#csc-chatbot-sitewide .csc-chatform,
#csc-chatbot-inline .csc-chatform{
  display:flex;
  gap:8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(148,163,184,.18);
  background: #f8fafc;
}
#csc-chatbot-sitewide .csc-input,
#csc-chatbot-inline .csc-input{
  all: unset;
  flex:1;
  padding: 10px 11px;
  border: 1px solid rgba(148,163,184,.55);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.2;
  background:#fff;
  color:#0f172a;
}
#csc-chatbot-sitewide .csc-send,
#csc-chatbot-inline .csc-send{
  all: unset;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color:#fff;
  cursor:pointer;
  font-size: 13px;
  line-height: 1;
}
#csc-chatbot-sitewide .csc-send:disabled,
#csc-chatbot-inline .csc-send:disabled{ opacity:.6; cursor:not-allowed; }

#csc-chatbot-sitewide .csc-hp,
#csc-chatbot-inline .csc-hp{
  position:absolute !important;
  left:-9999px !important;
  top:-9999px !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
}
/* ==== HARD OVERRIDES (Elementor/theme) ==== */
#csc-chatbot-sitewide .csc-btn,
#csc-chatbot-inline  .csc-btn{
  color:#0f172a !important;
  background:#f8fafc !important;
  border:1px solid rgba(148,163,184,.55) !important;
}

#csc-chatbot-sitewide .csc-btn:hover,
#csc-chatbot-inline  .csc-btn:hover{
  filter: brightness(.98) !important;
}

/* Primary stays blue */
#csc-chatbot-sitewide .csc-btn-primary,
#csc-chatbot-inline  .csc-btn-primary{
  color:#fff !important;
  background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
  border:1px solid rgba(37,99,235,.55) !important;
}

/* Chip / ghost variants get explicit styling so they never go white-on-white */
#csc-chatbot-sitewide .csc-btn-chip,
#csc-chatbot-inline  .csc-btn-chip,
#csc-chatbot-sitewide .csc-btn-ghost,
#csc-chatbot-inline  .csc-btn-ghost{
  color:#0f172a !important;
  background:#ffffff !important;
  border:1px solid rgba(148,163,184,.55) !important;
}
