@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=Geist:wght@300..700&family=Geist+Mono:wght@400..600&display=swap');

.ckc-chat-root {
  --ckc-primary: #0047AB;
  --ckc-deep: #021F4C;
  --ckc-signal: #4D7FFF;
  --ckc-graphite: #0F0F12;
  --ckc-slate: #52525B;
  --ckc-mist: #E5E5EA;
  --ckc-paper: #F7F5F0;
  --ckc-pure: #FFFFFF;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ckc-graphite);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ckc-chat-root,
.ckc-chat-root * {
  box-sizing: border-box;
}

.ckc-toggle {
  appearance: none;
  width: 64px;
  height: 64px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 18px;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transform: translateZ(0);
}

.ckc-toggle-img {
  display: block;
  width: 64px !important;
  height: 64px !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 64px;
  min-height: 64px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0,71,171,0.32);
  transition: transform .18s ease, box-shadow .18s ease;
}

.ckc-toggle:hover .ckc-toggle-img,
.ckc-toggle:focus-visible .ckc-toggle-img {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,71,171,0.38);
}

.ckc-toggle:focus-visible {
  outline: 2px solid var(--ckc-signal);
  outline-offset: 4px;
}

.ckc-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--ckc-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 38px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0,71,171,0.32);
}

.ckc-panel {
  width: 397px;
  height: 498px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #F7F7F8;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 26px 58px rgba(15,15,18,.18);
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
}

.ckc-panel[hidden] {
  display: none !important;
}

.ckc-panel.ckc-panel-expanded-unused {
  width: min(720px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 32px));
}

.ckc-header {
  background: #021F4C;
  color: #fff;
  min-height: 88px;
  padding: 18px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ckc-header-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.ckc-header-wordmark {
  display: block;
  width: 150px;
  max-width: 150px;
  height: auto;
}

.ckc-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255,255,255,.76);
  line-height: 1;
  white-space: nowrap;
}

.ckc-header-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #0DB57D;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}

.ckc-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 9px;
}

.ckc-minimize,
.ckc-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.78);
  padding: 0;
  margin: 0;
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 22px;
  line-height: 1;
  transition: color .15s ease, transform .15s ease;
}

.ckc-minimize {
  font-size: 15px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  transform: rotate(-45deg);
}

.ckc-minimize::before {
  content: '↔';
}

.ckc-close::before {
  content: '×';
}

.ckc-minimize:hover,
.ckc-close:hover,
.ckc-minimize:focus-visible,
.ckc-close:focus-visible {
  color: #fff;
  outline: none;
}

.ckc-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 16px;
  background: #F7F7F8;
  scrollbar-width: thin;
  scrollbar-color: rgba(15,15,18,.18) transparent;
}

.ckc-message {
  max-width: 82%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ckc-message-bot {
  position: relative;
  margin-left: 46px;
  margin-right: auto;
  color: #2A2A30;
  background: #fff;
  border: 1px solid #E5E5EA;
  box-shadow: 0 2px 5px rgba(15,15,18,.11);
  border-top-left-radius: 4px;
}

.ckc-message-bot::before {
  content: 'Co';
  position: absolute;
  left: -46px;
  top: 0;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: #0047AB;
  color: #fff;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  line-height: 31px;
  text-align: center;
}

.ckc-message-user {
  margin-left: auto;
  margin-right: 0;
  color: #fff;
  background: #021F4C;
  border: 1px solid rgba(255,255,255,.08);
  border-top-right-radius: 4px;
}

.ckc-form {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 41px;
  gap: 8px;
  padding: 14px 16px 17px;
  background: #fff;
  border-top: 1px solid #F0F0F2;
}

.ckc-input {
  width: 100%;
  min-height: 39px;
  max-height: 96px;
  resize: none;
  border: 1px solid #DDDEE4;
  border-radius: 9px;
  background: #fff;
  color: #33333A;
  padding: 10px 13px;
  font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.35;
  outline: none;
  box-shadow: none;
}

.ckc-input::placeholder {
  color: #9B9BA3;
}

.ckc-input:focus {
  border-color: rgba(0,71,171,.45);
  box-shadow: 0 0 0 2px rgba(77,127,255,.16);
}

.ckc-send {
  appearance: none;
  width: 41px;
  height: 39px;
  border: 0;
  border-radius: 10px;
  background: #7EA6D5;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .16s ease, transform .16s ease;
}

.ckc-send::before {
  content: '';
  display: block;
  width: 19px;
  height: 19px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 11.5L20.5 3.5L16.5 20.5L11.5 13.5L3.5 11.5Z' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M11.5 13.5L20.5 3.5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 11.5L20.5 3.5L16.5 20.5L11.5 13.5L3.5 11.5Z' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M11.5 13.5L20.5 3.5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ckc-send:hover,
.ckc-send:focus-visible {
  background: #0047AB;
  transform: translateY(-1px);
  outline: none;
}

.ckc-send:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.ckc-chat-root.ckc-is-open .ckc-toggle {
  display: none !important;
}

@media (max-width: 600px) {
  .ckc-chat-root {
    right: 16px;
    bottom: 16px;
  }

  .ckc-panel {
    width: calc(100vw - 32px);
    height: min(540px, calc(100vh - 32px));
    border-radius: 18px;
  }

  .ckc-header {
    min-height: 84px;
    padding: 17px 20px;
  }

  .ckc-header-wordmark {
    width: 132px;
  }

  .ckc-toggle,
  .ckc-toggle-img,
  .ckc-mark {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px;
    min-height: 56px;
    border-radius: 16px;
  }
}


/* v0.2.7 — control fixes and collapsed header-bar state */

/* Prevent theme/global button styles from distorting controls. */
.ckc-chat-root button.ckc-toggle,
.ckc-chat-root button.ckc-minimize,
.ckc-chat-root button.ckc-close,
.ckc-chat-root button.ckc-send {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

/* Header controls should be simple icon buttons, not filled rectangles. */
.ckc-chat-root button.ckc-minimize,
.ckc-chat-root button.ckc-close {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: rgba(255,255,255,.78) !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
  font-size: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ckc-chat-root button.ckc-minimize::before {
  content: '↙' !important;
  color: currentColor !important;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace !important;
  font-size: 16px !important;
  line-height: 1 !important;
  transform: rotate(180deg);
  display: block;
}

.ckc-chat-root button.ckc-close::before {
  content: '×' !important;
  color: currentColor !important;
  font-family: 'Geist', system-ui, sans-serif !important;
  font-size: 25px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
}

.ckc-chat-root button.ckc-minimize:hover,
.ckc-chat-root button.ckc-close:hover,
.ckc-chat-root button.ckc-minimize:focus-visible,
.ckc-chat-root button.ckc-close:focus-visible {
  color: #fff !important;
  background: transparent !important;
  outline: none !important;
}

/* Send control should stay icon-only, compact, and aligned. */
.ckc-chat-root button.ckc-send {
  background: #7EA6D5 !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #fff !important;
  width: 41px !important;
  height: 39px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
}

.ckc-chat-root button.ckc-send:hover,
.ckc-chat-root button.ckc-send:focus-visible {
  background: #0047AB !important;
}

/* Collapsed/minimized state: header bar only. */
.ckc-panel.ckc-panel-minimized {
  height: 84px;
  min-height: 84px;
  width: 397px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  cursor: pointer;
  border-radius: 20px;
}

.ckc-panel.ckc-panel-minimized .ckc-header {
  min-height: 84px;
  height: 84px;
  border-radius: 20px;
  align-items: flex-start;
}

.ckc-panel.ckc-panel-minimized .ckc-messages,
.ckc-panel.ckc-panel-minimized .ckc-form {
  display: none !important;
}

.ckc-panel.ckc-panel-minimized .ckc-minimize::before {
  content: '↗' !important;
  transform: none;
}

@media (max-width: 600px) {
  .ckc-panel.ckc-panel-minimized {
    width: calc(100vw - 32px);
    height: 84px;
    min-height: 84px;
  }
}


/* v0.2.8 — responsive minimized header logo sizing */
.ckc-panel.ckc-panel-minimized .ckc-header {
  padding: 15px 22px;
}

.ckc-panel.ckc-panel-minimized .ckc-header-wordmark {
  width: 120px;
  max-width: 120px;
}

.ckc-panel.ckc-panel-minimized .ckc-header-status {
  font-size: 8px;
  letter-spacing: .22em;
}

.ckc-panel.ckc-panel-minimized .ckc-header-actions {
  margin-top: 7px;
  gap: 17px;
}

@media (max-width: 480px) {
  .ckc-panel.ckc-panel-minimized .ckc-header {
    padding: 16px 20px;
  }

  .ckc-panel.ckc-panel-minimized .ckc-header-wordmark {
    width: 108px;
    max-width: 108px;
  }

  .ckc-panel.ckc-panel-minimized .ckc-header-status {
    font-size: 7.5px;
    letter-spacing: .20em;
  }

  .ckc-panel.ckc-panel-minimized .ckc-header-actions {
    gap: 15px;
  }
}

@media (max-width: 360px) {
  .ckc-panel.ckc-panel-minimized .ckc-header-wordmark {
    width: 96px;
    max-width: 96px;
  }

  .ckc-panel.ckc-panel-minimized .ckc-header-actions {
    gap: 12px;
  }
}


/* v0.3.1 — launch disclosure and invisible honeypot */
.ckc-honeypot {
  position: absolute !important;
  left: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ckc-privacy-notice {
  background: #fff;
  border-top: 1px solid #F0F0F2;
  color: #7A7A84;
  font-size: 10px;
  line-height: 1.35;
  padding: 0 16px 12px;
}

.ckc-panel.ckc-panel-minimized .ckc-privacy-notice {
  display: none !important;
}


/* v0.3.3 — use bundled expand/collapse icon assets */
.ckc-chat-root button.ckc-minimize::before {
  content: none !important;
  display: none !important;
}

.ckc-control-icon {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  object-fit: contain !important;
  opacity: .78;
  transition: opacity .15s ease, transform .15s ease;
}

.ckc-chat-root button.ckc-minimize:hover .ckc-control-icon,
.ckc-chat-root button.ckc-minimize:focus-visible .ckc-control-icon {
  opacity: 1;
}

.ckc-control-expand {
  display: none !important;
}

.ckc-panel.ckc-panel-minimized .ckc-control-collapse {
  display: none !important;
}

.ckc-panel.ckc-panel-minimized .ckc-control-expand {
  display: block !important;
}

.ckc-panel.ckc-panel-minimized .ckc-minimize::before {
  content: none !important;
  display: none !important;
}


/* v0.3.4 — SVG minimize/expand controls */
.ckc-control-icon {
  width: 17px !important;
  height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  object-fit: contain !important;
  object-position: center !important;
  image-rendering: auto !important;
}

.ckc-chat-root button.ckc-minimize {
  width: 19px !important;
  height: 19px !important;
}
