/* ChaosCB sitewide chat launcher + panel.
   Minimalist text chip bottom-right. Expands into compact chat. */

.ccb-launcher-chip{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:90;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:14px 22px 14px 18px;
  border-radius:999px;
  background:linear-gradient(180deg,#ecca85 0%,#d6ac56 100%);
  border:1px solid rgba(0,0,0,.2);
  color:#1a150c;
  font-family:Georgia,"Times New Roman",serif;
  font-size:16px;
  font-weight:600;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:0 16px 40px rgba(224,184,111,.4),0 0 0 1px rgba(0,0,0,.3);
  transition:transform .2s ease,box-shadow .2s ease;
  -webkit-tap-highlight-color:transparent;
  animation:ccbBreathe 3.6s ease-in-out infinite;
}
.ccb-launcher-chip:hover,
.ccb-launcher-chip:focus-visible{
  transform:translateY(-2px);
  box-shadow:0 22px 54px rgba(224,184,111,.55),0 0 0 1px rgba(0,0,0,.3);
  outline:none;
}
@keyframes ccbBreathe{
  0%,100%{box-shadow:0 16px 40px rgba(224,184,111,.4),0 0 0 1px rgba(0,0,0,.3)}
  50%{box-shadow:0 20px 50px rgba(224,184,111,.65),0 0 0 1px rgba(0,0,0,.3)}
}
@media (prefers-reduced-motion:reduce){
  .ccb-launcher-chip{animation:none}
  .ccb-launcher-chip:hover,.ccb-launcher-chip:focus-visible{transform:none}
}
.ccb-launcher-icon{
  width:20px;height:20px;flex-shrink:0;
}
.ccb-launcher-icon path{fill:#1a150c}
.ccb-launcher-label{line-height:1}
.ccb-launcher-arrow{opacity:.8;font-size:14px;margin-left:2px;font-weight:400}
.ccb-launcher-chip[hidden]{display:none !important}

/* First-visit teaser bubble — floats above the chip, points down-right */
.ccb-launcher-teaser{
  position:fixed;
  right:24px;
  bottom:88px;
  z-index:89;
  max-width:min(300px,calc(100vw - 48px));
  padding:12px 36px 12px 14px;
  border-radius:14px;
  background:linear-gradient(180deg,#1d1b17,#131210);
  border:1px solid rgba(224,184,111,.35);
  color:#f0e6cf;
  font-family:Georgia,"Times New Roman",serif;
  font-size:14px;
  line-height:1.45;
  box-shadow:0 18px 44px rgba(0,0,0,.5);
  transform:translateY(8px);
  opacity:0;
  pointer-events:none;
  transition:transform .35s cubic-bezier(.2,.8,.25,1),opacity .35s ease;
}
.ccb-launcher-teaser.is-visible{
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}
.ccb-launcher-teaser::after{
  content:"";
  position:absolute;
  right:28px;bottom:-7px;
  width:14px;height:14px;
  background:#131210;
  border-right:1px solid rgba(224,184,111,.35);
  border-bottom:1px solid rgba(224,184,111,.35);
  transform:rotate(45deg);
}
.ccb-launcher-teaser-close{
  position:absolute;top:6px;right:8px;
  background:transparent;border:none;
  color:rgba(240,230,207,.5);
  font-size:20px;line-height:1;
  width:24px;height:24px;border-radius:50%;
  cursor:pointer;
}
.ccb-launcher-teaser-close:hover,
.ccb-launcher-teaser-close:focus{
  color:#fff;background:rgba(255,255,255,.08);outline:none;
}
.ccb-launcher-teaser[hidden]{display:none !important}

/* Expanded panel */
.ccb-launcher-panel{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:91;
  width:min(400px,calc(100vw - 32px));
  max-height:min(640px,calc(100vh - 48px));
  display:flex;flex-direction:column;
  background:linear-gradient(180deg,#16161b 0%,#0f0f12 100%);
  border:1px solid rgba(224,184,111,.28);
  border-radius:20px;
  box-shadow:0 28px 64px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.02);
  color:#eee6d6;
  overflow:hidden;
  transform:translateY(8px) scale(.98);
  opacity:0;
  pointer-events:none;
  transition:transform .2s cubic-bezier(.2,.8,.25,1),opacity .2s ease;
}
.ccb-launcher-panel.is-open{
  transform:translateY(0) scale(1);
  opacity:1;
  pointer-events:auto;
}
@media (prefers-reduced-motion:reduce){
  .ccb-launcher-panel{transition:none}
}

.ccb-launcher-header{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:14px 16px;
  border-bottom:1px solid rgba(224,184,111,.15);
  background:linear-gradient(180deg,rgba(224,184,111,.06),transparent);
}
.ccb-launcher-title{
  margin:0;
  font-size:14px;
  color:#fff;
  font-weight:600;
  letter-spacing:.01em;
}
.ccb-launcher-sub{
  display:block;
  font-size:11px;
  color:var(--muted);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:400;
  margin-top:2px;
}
.ccb-launcher-close{
  background:transparent;border:none;color:var(--muted);
  width:36px;height:36px;border-radius:50%;
  font-size:22px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.ccb-launcher-close:hover,.ccb-launcher-close:focus{
  color:#fff;background:rgba(255,255,255,.06);outline:none;
}

.ccb-launcher-body{
  display:flex;flex-direction:column;gap:10px;
  padding:14px;
  overflow:hidden;
  flex:1;min-height:0;
}
.ccb-launcher-log{
  flex:1;min-height:160px;
  overflow-y:auto;
  display:flex;flex-direction:column;gap:12px;
  padding:4px 2px;
}
.ccb-launcher-log .ccb-msg{max-width:94%}
.ccb-launcher-log .ccb-msg-body{font-size:14px;line-height:1.5}
.ccb-launcher-log .ccb-msg-user .ccb-msg-body{padding:8px 12px;font-size:14px}

.ccb-launcher-form{display:flex;flex-direction:column;gap:8px}
.ccb-launcher-input{
  width:100%;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:#fff;
  padding:10px 12px;
  font:inherit;
  font-size:14px;
  line-height:1.45;
  resize:none;
  min-height:52px;
  max-height:160px;
}
.ccb-launcher-input:focus{
  outline:none;
  border-color:rgba(224,184,111,.45);
  background:rgba(255,255,255,.05);
}
.ccb-launcher-actions{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.ccb-launcher-hint{color:var(--muted);font-size:11px;letter-spacing:.02em}
.ccb-launcher-send{
  padding:8px 16px;min-height:36px;font-size:12px;
}
.ccb-launcher-send:disabled{opacity:.55;cursor:not-allowed}
.ccb-launcher-foot{
  font-size:11.5px;color:var(--muted);line-height:1.45;
  padding:0 14px 12px;margin-top:-4px;
}
.ccb-launcher-foot a{color:#e8d2a3;border-bottom:1px dotted rgba(224,184,111,.5)}

/* Disclaimer panel (one-time first-open gate) */
/* Default: hidden (via [hidden] attr). Shown when panel has .ccb-disclaimer-active. */
.ccb-launcher-panel.ccb-disclaimer-active .ccb-launcher-disclaimer{
  display:flex !important;
}
.ccb-launcher-panel.ccb-disclaimer-active .ccb-launcher-log,
.ccb-launcher-panel.ccb-disclaimer-active .ccb-launcher-form,
.ccb-launcher-panel.ccb-disclaimer-active .ccb-launcher-foot{
  display:none !important;
}
.ccb-launcher-disclaimer{
  flex-direction:column;gap:12px;
  border:1px solid rgba(224,184,111,.22);
  background:rgba(224,184,111,.06);
  padding:14px 14px 12px;
  border-radius:14px;
  margin-top:4px;
}
.ccb-launcher-disclaimer p{
  margin:0;
  color:#e8e1d6;
  font-size:13.5px;
  line-height:1.55;
}
.ccb-launcher-disclaimer p strong{color:var(--gold);letter-spacing:.02em}
.ccb-launcher-disclaimer-actions{
  display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:2px;
}
.ccb-launcher-disclaimer-actions .btn{
  padding:8px 16px;min-height:36px;font-size:12px;
}
.ccb-launcher-disclaimer-cancel{
  background:transparent;border:none;color:var(--muted);
  font-size:12px;letter-spacing:.06em;text-transform:uppercase;
  cursor:pointer;padding:8px 10px;
  border-bottom:1px dotted transparent;
}
.ccb-launcher-disclaimer-cancel:hover,.ccb-launcher-disclaimer-cancel:focus{
  color:#fff;border-bottom-color:rgba(224,184,111,.4);outline:none;
}

/* Mobile: sheet-ish */
@media (max-width:640px){
  .ccb-launcher-chip{right:16px;bottom:16px;padding:12px 18px 12px 14px;font-size:14px}
  .ccb-launcher-icon{width:18px;height:18px}
  .ccb-launcher-teaser{right:16px;bottom:78px;font-size:13.5px}
  .ccb-launcher-panel{
    right:10px;left:10px;
    width:auto;
    bottom:10px;
    max-height:calc(100vh - 20px);
  }
}
