/* Choice1 AI Chat – FULL CSS (Bot-logo bubble style)
   After updating, empty WHMCS template cache.
*/

/* ---------- Root / Placement ---------- */
#c1e-chat-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* ---------- Bubble ---------- */
.c1e-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #111;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.38);
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
  user-select: none;
}
.c1e-bubble:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(0,0,0,.42); background:#000; }
.c1e-bubble:active { transform: translateY(0); box-shadow: 0 7px 20px rgba(0,0,0,.28); }

/* Inline SVG icon inside the bubble */
.c1e-bubble .c1e-icon {
  width: 34px;
  height: 34px;
  display: block;
  fill: #fff;
}

/* Small label under the bubble */
.c1e-label {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #000;
  text-shadow: 0 1px 0 rgba(255,255,255,.3);
}

/* ---------- Panel (Drawer) ---------- */
.c1e-panel {
  position: fixed;
  bottom: 104px; /* a bit higher to account for 64px bubble + label */
  right: 24px;
  width: 360px;
  max-width: 92vw;
  max-height: 72vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,.3);
  display: none;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,.06);
}

/* ---------- Header ---------- */
.c1e-header {
  background: #111;
  color: #fff;
  padding: 10px 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.c1e-header button {
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.c1e-header button:hover { background: rgba(255,255,255,.12); }

/* ---------- Suggestion Chips (hidden) ---------- */
.c1e-suggest { display: none !important; }

/* ---------- Messages ---------- */
.c1e-body {
  padding: 12px;
  overflow: auto;
  height: 380px;
  background: #fff;
}
.c1e-msg {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #222;
}
.c1e-msg.user { text-align: right; color: #0b6bcb; }
.c1e-msg.bot  { text-align: left;  color: #333; }

/* ---------- Input ---------- */
.c1e-input {
  display: flex;
  gap: 8px;
  border-top: 1px solid #eee;
  padding: 8px;
  background: #fafafa;
}
.c1e-input textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 140px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  outline: none;
  background: #fff;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.c1e-input textarea:focus {
  border-color: #0b6bcb;
  box-shadow: 0 0 0 3px rgba(11,107,203,.12);
}
.c1e-input button {
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: transform .08s ease, box-shadow .12s ease, background .2s ease;
}
.c1e-input button:hover { background: #000; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.c1e-input button:active { transform: translateY(1px); }

/* ---------- Ticket Offer ---------- */
.c1e-ticket { margin-top: 8px; font-size: 12px; color: #444; }
.c1e-ticket button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}
.c1e-ticket button:hover { border-color: #bbb; }

/* ---------- Accessibility ---------- */
.c1e-bubble:focus,
.c1e-header button:focus,
.c1e-input button:focus,
.c1e-ticket button:focus {
  outline: 3px solid rgba(11,107,203,.25);
  outline-offset: 2px;
}

/* ---------- Small screens ---------- */
@media (max-width: 520px) {
  #c1e-chat-root { bottom: 16px; right: 16px; }
  .c1e-panel {
    bottom: 96px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: 76vh;
  }
  .c1e-body { height: 320px; }
}
