#cdl-ai-chatbot{position:fixed;right:22px;bottom:22px;z-index:999999;font-family:Arial,sans-serif}
#cdl-chat-open{background:var(--cdl-chat-colour);color:#fff;border:0;border-radius:999px;padding:13px 20px;font-weight:700;box-shadow:0 8px 25px rgba(0,0,0,.22);cursor:pointer}
#cdl-chat-window{width:350px;max-width:calc(100vw - 30px);height:500px;max-height:calc(100vh - 50px);background:#fff;border-radius:18px;box-shadow:0 12px 45px rgba(0,0,0,.28);overflow:hidden;border:1px solid #e6e6e6;display:flex;flex-direction:column}
.cdl-chat-header{background:var(--cdl-chat-colour);color:#fff;padding:14px 16px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.cdl-chat-header-actions{display:flex;align-items:center;gap:7px}
#cdl-chat-close,#cdl-chat-reset{background:rgba(255,255,255,.2);border:0;color:#fff;line-height:1;width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center}
#cdl-chat-close{font-size:24px}
#cdl-chat-reset{font-size:18px;font-weight:700}
#cdl-chat-close:hover,#cdl-chat-reset:hover{background:rgba(255,255,255,.32)}
#cdl-chat-messages{flex:1;padding:15px;overflow:auto;background:#f7f9fc}
.cdl-msg{padding:10px 12px;margin:0 0 10px;border-radius:14px;line-height:1.4;font-size:14px;white-space:pre-wrap}
.cdl-msg-user{background:var(--cdl-chat-colour);color:#fff;margin-left:35px;border-bottom-right-radius:4px}
.cdl-msg-bot{background:#fff;color:#1d2430;margin-right:35px;border-bottom-left-radius:4px;border:1px solid #e8edf5}

.cdl-answer-source{
  margin:-5px 42px 10px 6px;
  font-size:11px;
  line-height:1.3;
  color:#7b8794;
  font-style:italic;
  background:transparent;
}
#cdl-chat-form{display:flex;gap:8px;padding:12px;background:#fff;border-top:1px solid #eee}
#cdl-chat-input{flex:1;border:1px solid #d8dfe9;border-radius:999px;padding:10px 12px;font-size:14px;min-width:0}
#cdl-chat-form button{background:var(--cdl-chat-colour);color:#fff;border:0;border-radius:999px;padding:10px 14px;font-weight:700;cursor:pointer}
.cdl-feedback{font-size:12px;background:#fff;border:1px solid #e8edf5;border-radius:12px;padding:8px;margin:0 35px 10px 0;color:#566070}
.cdl-feedback button{border:1px solid #d4dce8;background:#fff;border-radius:999px;padding:4px 8px;margin-left:4px;cursor:pointer}
@media(max-width:480px){#cdl-ai-chatbot{right:12px;bottom:12px}#cdl-chat-window{width:calc(100vw - 24px);height:calc(100vh - 24px)}}
.cdl-handover{background:#fff;border:1px solid #e8edf5;border-radius:14px;padding:10px 12px;margin:0 35px 10px 0;color:#1d2430;font-size:14px}
.cdl-handover-text{margin-bottom:8px;line-height:1.35}
.cdl-handover-btn{display:inline-block;background:var(--cdl-chat-colour);color:#fff!important;text-decoration:none;border-radius:999px;padding:9px 13px;font-weight:700}
.cdl-handover-btn:hover,.cdl-handover-btn:focus{color:var(--cdl-chat-button-hover-text,var(--cdl-chat-button-text,#fff))!important;text-decoration:none;filter:brightness(.95)}

/* v1.4 fix: make sure the hidden attribute can override the chat window flex display */
#cdl-chat-window[hidden] {
  display: none !important;
}

.cdl-password-reset-wrap{background:#fff;border:1px solid #e8edf5;border-radius:14px;padding:10px 12px;margin:0 35px 10px 0;color:#1d2430;font-size:14px}
.cdl-password-reset-btn{display:inline-block;background:var(--cdl-chat-colour);color:#fff!important;text-decoration:none;border-radius:999px;padding:10px 14px;font-weight:700;text-align:center}
.cdl-password-reset-btn:hover,.cdl-password-reset-btn:focus{color:var(--cdl-chat-button-hover-text,var(--cdl-chat-button-text,#fff))!important;text-decoration:none;filter:brightness(.95)}


.cdl-parent-guardian-options {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin: 8px 0 12px;
}

.cdl-choice-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--cdl-brand, #1f4f82);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.cdl-choice-btn:hover,
.cdl-choice-btn:focus {
  opacity: .9;
}

.cdl-quick-links-wrap{background:#fff;border:1px solid #e8edf5;border-radius:14px;padding:10px 12px;margin:0 35px 10px 0;color:#1d2430;font-size:14px;display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.cdl-quick-link-btn{display:inline-block;background:var(--cdl-chat-colour);color:#fff!important;text-decoration:none;border-radius:999px;padding:10px 14px;font-weight:700;text-align:center}
.cdl-quick-link-btn:hover,.cdl-quick-link-btn:focus{color:var(--cdl-chat-button-hover-text,var(--cdl-chat-button-text,#fff))!important;text-decoration:none;filter:brightness(.95)}


.cdl-auto-links-wrap{background:#fff;border:1px solid #e8edf5;border-radius:14px;padding:10px 12px;margin:0 35px 10px 0;color:#1d2430;font-size:14px;display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.cdl-auto-link-btn{display:inline-block;background:var(--cdl-chat-colour);color:#fff!important;text-decoration:none;border-radius:999px;padding:10px 14px;font-weight:700;text-align:center;word-break:break-word}
.cdl-auto-link-btn:hover,.cdl-auto-link-btn:focus{color:var(--cdl-chat-button-hover-text,var(--cdl-chat-button-text,#fff))!important;text-decoration:none;filter:brightness(.95)}

/* v3.2 chat button appearance and position controls */
#cdl-ai-chatbot.cdl-chat-position-bottom_right{right:var(--cdl-chat-offset-x,22px);bottom:var(--cdl-chat-offset-y,22px);left:auto;top:auto;transform:none}
#cdl-ai-chatbot.cdl-chat-position-bottom_left{left:var(--cdl-chat-offset-x,22px);bottom:var(--cdl-chat-offset-y,22px);right:auto;top:auto;transform:none}
#cdl-ai-chatbot.cdl-chat-position-top_right{right:var(--cdl-chat-offset-x,22px);top:var(--cdl-chat-offset-y,22px);left:auto;bottom:auto;transform:none}
#cdl-ai-chatbot.cdl-chat-position-top_left{left:var(--cdl-chat-offset-x,22px);top:var(--cdl-chat-offset-y,22px);right:auto;bottom:auto;transform:none}
#cdl-ai-chatbot.cdl-chat-position-middle_right{right:var(--cdl-chat-offset-x,22px);top:50%;left:auto;bottom:auto;transform:translateY(-50%)}
#cdl-ai-chatbot.cdl-chat-position-middle_left{left:var(--cdl-chat-offset-x,22px);top:50%;right:auto;bottom:auto;transform:translateY(-50%)}

#cdl-chat-open.cdl-chat-open-emoji,
#cdl-chat-open.cdl-chat-open-image{width:64px;height:64px;border-radius:50%;padding:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
#cdl-chat-open.cdl-chat-open-emoji{font-size:30px;line-height:1}
#cdl-chat-open.cdl-chat-open-image img{width:100%;height:100%;object-fit:cover;display:block}
#cdl-chat-open.cdl-chat-open-image{background:#fff;border:3px solid var(--cdl-chat-colour)}

#cdl-ai-chatbot.cdl-chat-position-bottom_left #cdl-chat-window,
#cdl-ai-chatbot.cdl-chat-position-top_left #cdl-chat-window,
#cdl-ai-chatbot.cdl-chat-position-middle_left #cdl-chat-window{transform-origin:left bottom}

@media(max-width:480px){
  #cdl-ai-chatbot.cdl-chat-position-bottom_left,
  #cdl-ai-chatbot.cdl-chat-position-top_left,
  #cdl-ai-chatbot.cdl-chat-position-middle_left{left:12px;right:auto}
  #cdl-ai-chatbot.cdl-chat-position-bottom_right,
  #cdl-ai-chatbot.cdl-chat-position-top_right,
  #cdl-ai-chatbot.cdl-chat-position-middle_right{right:12px;left:auto}
  #cdl-ai-chatbot.cdl-chat-position-top_left,
  #cdl-ai-chatbot.cdl-chat-position-top_right{top:12px;bottom:auto}
  #cdl-ai-chatbot.cdl-chat-position-bottom_left,
  #cdl-ai-chatbot.cdl-chat-position-bottom_right{bottom:12px;top:auto}
}

/* v3.3 optional bot name beside floating chat button */
#cdl-chat-open.cdl-chat-open-with-label{
  width:auto;
  min-height:60px;
  height:auto;
  border-radius:999px;
  padding:8px 18px 8px 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  overflow:visible;
  max-width:calc(100vw - 24px);
}
#cdl-chat-open.cdl-chat-open-with-label.cdl-chat-open-image{
  background:var(--cdl-chat-colour);
  border:0;
}
#cdl-chat-open.cdl-chat-open-with-label .cdl-chat-open-image-wrap{
  width:44px;
  height:44px;
  border-radius:50%;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  flex:0 0 auto;
}
#cdl-chat-open.cdl-chat-open-with-label .cdl-chat-open-image-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
#cdl-chat-open.cdl-chat-open-with-label .cdl-chat-open-emoji{
  font-size:28px;
  line-height:1;
  flex:0 0 auto;
}
#cdl-chat-open .cdl-chat-open-label{
  color:#fff;
  font-weight:700;
  line-height:1.15;
  white-space:nowrap;
  font-size:14px;
}
@media(max-width:480px){
  #cdl-chat-open.cdl-chat-open-with-label{padding:8px 14px 8px 9px;min-height:56px}
  #cdl-chat-open .cdl-chat-open-label{font-size:13px;max-width:170px;overflow:hidden;text-overflow:ellipsis}
}

/* v3.7 mobile viewport fix: keep the chat window fully inside phone screens */
@media (max-width: 600px) {
  #cdl-ai-chatbot {
    left: calc(10px + env(safe-area-inset-left, 0px)) !important;
    right: calc(10px + env(safe-area-inset-right, 0px)) !important;
    top: calc(10px + env(safe-area-inset-top, 0px)) !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    pointer-events: none;
  }

  #cdl-chat-window {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 14px !important;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
  }

  #cdl-chat-window[hidden] {
    display: none !important;
  }

  .cdl-chat-header {
    flex: 0 0 auto;
    min-height: 56px;
    padding: 12px 13px;
    position: sticky;
    top: 0;
    z-index: 5;
  }

  #cdl-chat-close,
  #cdl-chat-reset {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  #cdl-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }

  #cdl-chat-form {
    flex: 0 0 auto;
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  #cdl-chat-input {
    font-size: 16px; /* prevents iPhone zooming into the input */
  }

  .cdl-msg-user {
    margin-left: 22px;
  }

  .cdl-msg-bot,
  .cdl-feedback,
  .cdl-handover,
  .cdl-password-reset-wrap,
  .cdl-quick-links-wrap,
  .cdl-auto-links-wrap {
    margin-right: 22px;
  }

  #cdl-chat-open {
    position: absolute !important;
    pointer-events: auto;
    max-width: calc(100vw - 24px);
  }

  #cdl-ai-chatbot.cdl-chat-position-bottom_left #cdl-chat-open,
  #cdl-ai-chatbot.cdl-chat-position-middle_left #cdl-chat-open,
  #cdl-ai-chatbot.cdl-chat-position-top_left #cdl-chat-open {
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    top: auto !important;
  }

  #cdl-ai-chatbot.cdl-chat-position-bottom_right #cdl-chat-open,
  #cdl-ai-chatbot.cdl-chat-position-middle_right #cdl-chat-open,
  #cdl-ai-chatbot.cdl-chat-position-top_right #cdl-chat-open {
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    top: auto !important;
  }
}

/* v3.9 suggested questions and privacy notice */
.cdl-suggested-questions{
  display:flex;
  flex-direction:column;
  gap:8px;
  background:#fff;
  border:1px solid #e8edf5;
  border-radius:14px;
  padding:10px 12px;
  margin:0 35px 10px 0;
}
.cdl-suggested-question{
  border:1px solid var(--cdl-chat-colour);
  background:#fff;
  color:var(--cdl-chat-colour);
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
  font-weight:700;
  text-align:left;
}
.cdl-suggested-question:hover,
.cdl-suggested-question:focus{
  background:var(--cdl-chat-colour);
  color:#fff;
}
.cdl-chat-privacy-notice{
  font-size:11px;
  color:#6b7280;
  background:#fff;
  border-top:1px solid #eee;
  padding:7px 12px 9px;
  line-height:1.35;
}
@media (max-width:600px){
  .cdl-suggested-questions{margin-right:22px}
  .cdl-chat-privacy-notice{padding-bottom:max(9px, env(safe-area-inset-bottom, 0px))}
}

/* v3.12 lead capture */
.cdl-lead-capture {
  margin: 10px 0 12px;
  padding: 12px;
  background: #f7f9fc;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  font-size: 14px;
}
.cdl-lead-capture-intro {
  margin-bottom: 8px;
  color: #1f2933;
}
.cdl-lead-capture-toggle,
.cdl-lead-capture-form button {
  background: var(--cdl-chat-colour, #1f4f82);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}
.cdl-lead-capture-form {
  display: grid;
  gap: 8px;
}
.cdl-lead-capture-form input,
.cdl-lead-capture-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 16px;
  box-sizing: border-box;
}
.cdl-lead-capture-note {
  font-size: 12px;
  color: #64748b;
}
.cdl-chat-privacy-notice {
  padding: 7px 12px 10px;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 480px){
  .cdl-answer-source{
    margin:-5px 24px 10px 6px;
    font-size:10.5px;
  }
}

/* v3.14 style presets */
#cdl-ai-chatbot.cdl-style-minimal #cdl-chat-window,
#cdl-ai-chatbot.cdl-style-minimal #cdl-chat-open {
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,.14);
}
#cdl-ai-chatbot.cdl-style-minimal .cdl-msg-bot {
  background: #f7f7f7;
}
#cdl-ai-chatbot.cdl-style-friendly #cdl-chat-window,
#cdl-ai-chatbot.cdl-style-friendly #cdl-chat-open {
  border-radius: 24px;
  box-shadow: 0 14px 38px rgba(0,0,0,.18);
}
#cdl-ai-chatbot.cdl-style-friendly .cdl-msg {
  border-radius: 18px;
}
#cdl-ai-chatbot.cdl-style-compact #cdl-chat-window {
  width: 340px;
  max-height: 560px;
}
#cdl-ai-chatbot.cdl-style-compact .cdl-msg {
  font-size: 13px;
  padding: 8px 10px;
}
#cdl-ai-chatbot.cdl-style-compact #cdl-chat-messages {
  padding: 10px;
}


/* v3.18 promotional graphic inspired theme
   A cleaner, app-like chat design with bold blue header, rounded cards,
   modern message bubbles and polished clickable buttons. */
#cdl-ai-chatbot {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#cdl-chat-window {
  width: 390px;
  height: 590px;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 32, 92, .28);
  overflow: hidden;
  background: #ffffff;
}

.cdl-chat-header {
  min-height: 72px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--cdl-chat-colour), #005bff 70%, #0b78ff);
  box-shadow: 0 12px 30px rgba(0, 72, 220, .22);
}

.cdl-chat-header strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  letter-spacing: -.02em;
}

.cdl-chat-header strong:before {
  content: "🤖";
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  font-size: 19px;
}

#cdl-chat-close,
#cdl-chat-reset {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  font-weight: 800;
  transition: transform .15s ease, background .15s ease;
}

#cdl-chat-close:hover,
#cdl-chat-reset:hover {
  background: rgba(255,255,255,.28);
  transform: translateY(-1px);
}

#cdl-chat-messages {
  padding: 18px 16px;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 110, 255, .08), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
}

.cdl-msg {
  position: relative;
  max-width: 82%;
  padding: 12px 15px;
  margin-bottom: 12px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.48;
  box-shadow: 0 8px 20px rgba(14, 37, 74, .06);
}

.cdl-msg-user {
  margin-left: auto;
  margin-right: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--cdl-chat-colour), #005bff);
  border-bottom-right-radius: 7px;
  box-shadow: 0 12px 22px rgba(0, 84, 255, .18);
}

.cdl-msg-bot {
  margin-left: 42px;
  margin-right: auto;
  color: #172033;
  background: #fff;
  border: 1px solid #e7eef8;
  border-bottom-left-radius: 7px;
}

.cdl-msg-bot:before {
  content: "🤖";
  position: absolute;
  left: -42px;
  bottom: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cdl-chat-colour), #005bff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 84, 255, .2);
  font-size: 17px;
}

.cdl-answer-source {
  margin: -4px 52px 12px 44px;
  padding-left: 2px;
  font-size: 10.5px;
  color: #8290a4;
  font-style: italic;
}

#cdl-chat-form {
  gap: 10px;
  padding: 13px 14px;
  background: #fff;
  border-top: 1px solid #e8edf5;
  box-shadow: 0 -10px 24px rgba(13, 38, 76, .04);
}

#cdl-chat-input {
  min-height: 44px;
  border: 1px solid #d8e3f1;
  border-radius: 999px;
  padding: 11px 15px;
  background: #f8fbff;
  color: #172033;
  outline: none;
}

#cdl-chat-input:focus {
  border-color: var(--cdl-chat-colour);
  box-shadow: 0 0 0 3px rgba(0, 84, 255, .09);
  background: #fff;
}

#cdl-chat-form button[type="submit"] {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  background: linear-gradient(135deg, var(--cdl-chat-colour), #005bff);
  box-shadow: 0 10px 22px rgba(0, 84, 255, .22);
}

#cdl-chat-form button[type="submit"]:before {
  content: "➤";
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  transform: translateX(1px);
}

.cdl-feedback,
.cdl-handover,
.cdl-password-reset-wrap,
.cdl-quick-links-wrap,
.cdl-auto-links-wrap,
.cdl-lead-capture,
.cdl-suggested-questions {
  margin-left: 42px;
  margin-right: 0;
  border: 1px solid #e7eef8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(14, 37, 74, .06);
}

.cdl-suggested-questions {
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cdl-suggested-question,
.cdl-feedback button,
.cdl-choice-btn,
.cdl-lead-capture-toggle {
  border: 1px solid #d8e3f1;
  background: #fff;
  color: var(--cdl-chat-colour);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.cdl-suggested-question:hover,
.cdl-feedback button:hover,
.cdl-choice-btn:hover,
.cdl-lead-capture-toggle:hover {
  transform: translateY(-1px);
  background: #f7fbff;
  box-shadow: 0 8px 18px rgba(0, 84, 255, .10);
}

.cdl-handover-btn,
.cdl-password-reset-btn,
.cdl-quick-link-btn,
.cdl-auto-link-btn,
.cdl-lead-capture-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--cdl-chat-colour), #005bff);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(0, 84, 255, .18);
}

.cdl-password-reset-btn:before { content: "🔐"; }
.cdl-quick-link-btn:before,
.cdl-auto-link-btn:before { content: "🌐"; }
.cdl-handover-btn:before { content: "💬"; }

.cdl-lead-capture input,
.cdl-lead-capture textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d8e3f1;
  border-radius: 14px;
  padding: 10px 12px;
  margin: 6px 0;
  font: inherit;
}

.cdl-chat-privacy-notice {
  padding: 7px 13px 10px;
  background: #fff;
  color: #7a8798;
  font-size: 10.5px;
  line-height: 1.35;
  text-align: center;
  border-top: 1px solid #eef3f9;
}

#cdl-chat-open {
  background: linear-gradient(135deg, var(--cdl-chat-colour), #005bff);
  box-shadow: 0 18px 40px rgba(0, 84, 255, .28);
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .15s ease, box-shadow .15s ease;
}

#cdl-chat-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(0, 84, 255, .34);
}

#cdl-chat-open.cdl-chat-open-image {
  border: 4px solid #fff;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 84, 255, .28), 0 0 0 2px rgba(0, 84, 255, .15);
}

#cdl-chat-open.cdl-chat-open-with-label.cdl-chat-open-image {
  background: linear-gradient(135deg, var(--cdl-chat-colour), #005bff);
  border: 0;
}

#cdl-chat-open .cdl-chat-open-label {
  font-size: 15px;
  letter-spacing: -.01em;
}

@media (max-width: 600px) {
  #cdl-chat-window {
    border-radius: 20px !important;
  }

  .cdl-chat-header {
    min-height: 60px;
  }

  .cdl-msg {
    max-width: 84%;
    font-size: 13.5px;
  }

  .cdl-msg-bot,
  .cdl-feedback,
  .cdl-handover,
  .cdl-password-reset-wrap,
  .cdl-quick-links-wrap,
  .cdl-auto-links-wrap,
  .cdl-lead-capture,
  .cdl-suggested-questions {
    margin-left: 38px;
  }

  .cdl-msg-bot:before {
    left: -38px;
    width: 30px;
    height: 30px;
  }
}

/* v3.19 improved colour controls and polished buttons */
#cdl-chat-open{
  background:linear-gradient(135deg,var(--cdl-chat-button-bg,var(--cdl-chat-colour,#0757d8)),var(--cdl-chat-header-end,var(--cdl-chat-colour,#003bb5)));
  color:var(--cdl-chat-button-text,#fff)!important;
  border:2px solid var(--cdl-chat-button-border,#fff);
  box-shadow:0 12px 28px rgba(0,0,0,.22),0 3px 8px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.3);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
#cdl-chat-open:hover,
#cdl-chat-open:focus{
  transform:translateY(-2px);
  filter:brightness(1.03);
  box-shadow:0 16px 34px rgba(0,0,0,.26),0 4px 10px rgba(0,0,0,.14),inset 0 1px 0 rgba(255,255,255,.35);
}
#cdl-chat-open.cdl-chat-open-emoji,
#cdl-chat-open.cdl-chat-open-image{
  width:68px;
  height:68px;
  border-width:3px;
}
#cdl-chat-open.cdl-chat-open-emoji{
  font-size:32px;
}
#cdl-chat-open.cdl-chat-open-image{
  background:linear-gradient(135deg,var(--cdl-chat-button-bg,var(--cdl-chat-colour,#0757d8)),var(--cdl-chat-header-end,var(--cdl-chat-colour,#003bb5)));
  border:3px solid var(--cdl-chat-button-border,#fff);
  padding:4px;
}
#cdl-chat-open.cdl-chat-open-image img{
  border-radius:50%;
}
#cdl-chat-open .cdl-chat-open-label,
#cdl-chat-open .cdl-chat-open-text{
  color:var(--cdl-chat-button-text,#fff)!important;
}
#cdl-chat-open.cdl-chat-open-with-label{
  background:linear-gradient(135deg,var(--cdl-chat-button-bg,var(--cdl-chat-colour,#0757d8)),var(--cdl-chat-header-end,var(--cdl-chat-colour,#003bb5)));
  border:2px solid var(--cdl-chat-button-border,#fff);
}
.cdl-chat-header{
  background:linear-gradient(135deg,var(--cdl-chat-header-start,var(--cdl-chat-colour,#0757d8)),var(--cdl-chat-header-end,var(--cdl-chat-colour,#003bb5)))!important;
}
#cdl-chat-messages{
  background:var(--cdl-chat-bg,#f7f9fc)!important;
}
.cdl-msg-user{
  background:var(--cdl-chat-user-bg,var(--cdl-chat-colour,#0757d8))!important;
}
.cdl-msg-bot{
  background:var(--cdl-chat-bot-bg,#fff)!important;
}
#cdl-chat-form button,
.cdl-handover-btn,
.cdl-password-reset-btn,
.cdl-quick-link-btn,
.cdl-auto-link-btn,
.cdl-choice-btn{
  background:linear-gradient(135deg,var(--cdl-chat-button-bg,var(--cdl-chat-colour,#0757d8)),var(--cdl-chat-header-end,var(--cdl-chat-colour,#003bb5)))!important;
  color:var(--cdl-chat-button-text,#fff)!important;
  border:1px solid var(--cdl-chat-button-border,transparent)!important;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
}
#cdl-chat-form button:hover,
.cdl-handover-btn:hover,
.cdl-password-reset-btn:hover,
.cdl-quick-link-btn:hover,
.cdl-auto-link-btn:hover,
.cdl-choice-btn:hover{
  transform:translateY(-1px);
  filter:brightness(1.03);
  color:var(--cdl-chat-button-hover-text,var(--cdl-chat-button-text,#fff))!important;
}
#cdl-chat-form button{
  min-width:44px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
}


/* v3.20 cleaner floating button: prevents image/label overlap and keeps uploaded avatars tidy */
#cdl-chat-open{
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  font-family:inherit!important;
  line-height:1!important;
  text-decoration:none!important;
}

/* Plain text button */
#cdl-chat-open.cdl-chat-open-text{
  width:auto!important;
  height:auto!important;
  min-height:52px!important;
  padding:0 22px!important;
  border-radius:999px!important;
}

/* Emoji/image icon only */
#cdl-chat-open.cdl-chat-open-emoji:not(.cdl-chat-open-with-label),
#cdl-chat-open.cdl-chat-open-image:not(.cdl-chat-open-with-label){
  width:64px!important;
  height:64px!important;
  min-width:64px!important;
  min-height:64px!important;
  max-width:64px!important;
  max-height:64px!important;
  padding:6px!important;
  border-radius:50%!important;
  overflow:hidden!important;
}

#cdl-chat-open.cdl-chat-open-image:not(.cdl-chat-open-with-label){
  background:#ffffff!important;
  border:3px solid var(--cdl-chat-button-border,#ffffff)!important;
}

#cdl-chat-open.cdl-chat-open-image:not(.cdl-chat-open-with-label) img{
  width:100%!important;
  height:100%!important;
  border-radius:50%!important;
  object-fit:cover!important;
  display:block!important;
}

/* Image/emoji with label becomes a proper pill, not a fixed circle */
#cdl-chat-open.cdl-chat-open-with-label{
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:58px!important;
  max-width:calc(100vw - 28px)!important;
  padding:7px 16px 7px 7px!important;
  border-radius:999px!important;
  overflow:visible!important;
  white-space:nowrap!important;
}

#cdl-chat-open.cdl-chat-open-with-label.cdl-chat-open-image,
#cdl-chat-open.cdl-chat-open-with-label.cdl-chat-open-emoji{
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  max-width:calc(100vw - 28px)!important;
}

#cdl-chat-open.cdl-chat-open-with-label .cdl-chat-open-image-wrap{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  flex:0 0 46px!important;
  border:2px solid rgba(255,255,255,.85)!important;
  box-shadow:0 2px 8px rgba(0,0,0,.18)!important;
}

#cdl-chat-open.cdl-chat-open-with-label .cdl-chat-open-image-wrap img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  border-radius:50%!important;
}

#cdl-chat-open.cdl-chat-open-with-label .cdl-chat-open-emoji{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  flex:0 0 46px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  background:rgba(255,255,255,.18)!important;
  font-size:25px!important;
}

#cdl-chat-open .cdl-chat-open-label{
  display:block!important;
  min-width:0!important;
  max-width:190px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:var(--cdl-chat-button-text,#fff)!important;
  font-size:15px!important;
  font-weight:700!important;
  line-height:1.15!important;
  text-align:left!important;
}

#cdl-chat-open .cdl-chat-open-text{
  color:var(--cdl-chat-button-text,#fff)!important;
  font-size:15px!important;
  font-weight:700!important;
}

@media(max-width:480px){
  #cdl-chat-open.cdl-chat-open-with-label{
    min-height:54px!important;
    padding:6px 13px 6px 6px!important;
  }
  #cdl-chat-open.cdl-chat-open-with-label .cdl-chat-open-image-wrap,
  #cdl-chat-open.cdl-chat-open-with-label .cdl-chat-open-emoji{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    flex-basis:42px!important;
  }
  #cdl-chat-open .cdl-chat-open-label{
    max-width:145px!important;
    font-size:13px!important;
  }
}


/* v3.21 open-state and send button polish
   Hide the floating launcher when the chat window is open. This uses a class
   because previous launcher styling uses display: inline-flex !important. */
#cdl-ai-chatbot.cdl-chat-is-open #cdl-chat-open {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#cdl-ai-chatbot.cdl-chat-is-open {
  width: auto !important;
  max-width: calc(100vw - 24px) !important;
}

/* Neater, centred send button */
#cdl-chat-form {
  align-items: center !important;
}

#cdl-chat-form button[type="submit"] {
  flex: 0 0 52px !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 3px solid #ffffff !important;
  background: linear-gradient(135deg, var(--cdl-chat-button-bg,var(--cdl-chat-colour,#0757d8)), var(--cdl-chat-header-end,#003bb5)) !important;
  color: var(--cdl-chat-button-text,#ffffff) !important;
  box-shadow: 0 12px 24px rgba(0,84,255,.22), 0 0 0 1px rgba(20,70,150,.10) !important;
  position: relative !important;
  overflow: hidden !important;
}

#cdl-chat-form button[type="submit"]:before {
  content: "" !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 9px solid transparent !important;
  border-bottom: 9px solid transparent !important;
  border-left: 16px solid currentColor !important;
  transform: translateX(2px) !important;
  display: block !important;
}

#cdl-chat-form button[type="submit"]:hover,
#cdl-chat-form button[type="submit"]:focus {
  transform: translateY(-1px) !important;
  filter: brightness(1.04) !important;
}

#cdl-chat-form button[type="submit"]:active {
  transform: translateY(0) scale(.98) !important;
}

#cdl-chat-input {
  height: 52px !important;
  box-sizing: border-box !important;
}

@media(max-width:480px){
  #cdl-chat-form button[type="submit"] {
    flex-basis: 48px !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
  }
  #cdl-chat-input {
    height: 48px !important;
  }
}

/* v3.22 final send button polish */
#cdl-chat-form{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}

#cdl-chat-input{
  flex:1 1 auto!important;
  min-width:0!important;
}

#cdl-chat-form button[type="submit"],
#cdl-chat-form .cdl-chat-send{
  appearance:none!important;
  -webkit-appearance:none!important;
  flex:0 0 52px!important;
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  min-height:52px!important;
  max-width:52px!important;
  max-height:52px!important;
  padding:0!important;
  margin:0!important;
  border-radius:999px!important;
  border:2px solid rgba(255,255,255,.95)!important;
  outline:1px solid rgba(42,89,170,.18)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
  font-size:0!important;
  text-indent:0!important;
  overflow:hidden!important;
  background:linear-gradient(135deg,var(--cdl-chat-button-bg,var(--cdl-chat-colour,#0757d8)),var(--cdl-chat-header-end,#1945d8))!important;
  color:var(--cdl-chat-button-text,#fff)!important;
  box-shadow:0 10px 22px rgba(7,87,216,.24)!important;
  position:relative!important;
}

#cdl-chat-form button[type="submit"]:before,
#cdl-chat-form button[type="submit"]:after,
#cdl-chat-form .cdl-chat-send:before,
#cdl-chat-form .cdl-chat-send:after{
  content:none!important;
  display:none!important;
}

#cdl-chat-form .cdl-send-icon{
  width:22px!important;
  height:22px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  transform:translateX(1px)!important;
  pointer-events:none!important;
}

#cdl-chat-form .cdl-send-icon svg{
  width:22px!important;
  height:22px!important;
  display:block!important;
  fill:currentColor!important;
}

#cdl-chat-form button[type="submit"]:hover,
#cdl-chat-form .cdl-chat-send:hover{
  transform:translateY(-1px)!important;
  filter:brightness(1.05)!important;
  color:var(--cdl-chat-button-hover-text,var(--cdl-chat-button-text,#fff))!important;
}

#cdl-chat-form button[type="submit"]:focus-visible,
#cdl-chat-form .cdl-chat-send:focus-visible{
  box-shadow:0 0 0 4px rgba(7,87,216,.18),0 10px 22px rgba(7,87,216,.24)!important;
}

#cdl-chat-form button[type="submit"]:active,
#cdl-chat-form .cdl-chat-send:active{
  transform:scale(.97)!important;
}

@media(max-width:480px){
  #cdl-chat-form{
    gap:10px!important;
  }
  #cdl-chat-form button[type="submit"],
  #cdl-chat-form .cdl-chat-send{
    flex-basis:48px!important;
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
    max-width:48px!important;
    max-height:48px!important;
  }
  #cdl-chat-form .cdl-send-icon,
  #cdl-chat-form .cdl-send-icon svg{
    width:20px!important;
    height:20px!important;
  }
}


/* v3.23 use uploaded chat image as the bot avatar inside the chat window */
#cdl-ai-chatbot.cdl-has-bot-avatar .cdl-chat-header strong:before{
  content:none!important;
  display:none!important;
}

#cdl-ai-chatbot .cdl-chat-header-avatar{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  border-radius:50%!important;
  overflow:hidden!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:2px solid rgba(255,255,255,.78)!important;
  background:#fff!important;
  box-shadow:0 5px 14px rgba(0,0,0,.16)!important;
}

#cdl-ai-chatbot .cdl-chat-header-avatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}

#cdl-ai-chatbot.cdl-has-bot-avatar .cdl-msg-bot:before{
  content:""!important;
  background-image:var(--cdl-bot-avatar-image)!important;
  background-size:cover!important;
  background-position:center!important;
  background-color:#fff!important;
  border:2px solid #fff!important;
  box-shadow:0 8px 18px rgba(0,84,255,.20),0 0 0 1px rgba(0,0,0,.08)!important;
}

@media(max-width:480px){
  #cdl-ai-chatbot .cdl-chat-header-avatar{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
  }
}


/* v3.26: admin-controlled hover text colour for chatbot buttons */
#cdl-ai-chatbot #cdl-chat-open:hover,
#cdl-ai-chatbot #cdl-chat-form button:hover,
#cdl-ai-chatbot .cdl-handover-btn:hover,
#cdl-ai-chatbot .cdl-password-reset-btn:hover,
#cdl-ai-chatbot .cdl-quick-link-btn:hover,
#cdl-ai-chatbot .cdl-auto-link-btn:hover,
#cdl-ai-chatbot .cdl-choice-btn:hover,
#cdl-ai-chatbot .cdl-lead-capture-toggle:hover,
#cdl-ai-chatbot .cdl-suggested-question:hover,
#cdl-ai-chatbot .cdl-feedback button:hover{
  color:var(--cdl-chat-button-hover-text,var(--cdl-chat-button-text,#ffffff))!important;
}
#cdl-ai-chatbot #cdl-chat-form button:hover svg{
  fill:currentColor!important;
}
