/* Cambridge Crown AI Chatbot (Red Theme) */
:root{
  --ccc-primary: #C1121F;
  --ccc-panel: #121212;
  --ccc-border: rgba(255,255,255,.12);
  --ccc-muted: rgba(255,255,255,.82);
}

.ccc-launcher{
  position: fixed;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #181818, #0f0f0f);
  border: 1px solid var(--ccc-border);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  cursor: pointer;
}
.ccc-launcher-dot{
  width: 42px; height: 42px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffb3b8, var(--ccc-primary));
  box-shadow: 0 10px 22px rgba(193,18,31,.35);
  position: relative;
}
.ccc-launcher-dot:after{
  content: "💬";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.ccc-launcher-label{
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ccc-window{
  position: fixed;
  z-index: 99999;
  display: none;
}
.ccc-window.open{ display: block; }

.ccc-container{
  width: 360px;
  max-width: 100%;
  background: var(--ccc-panel);
  border: 1px solid var(--ccc-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

.ccc-header{
  background: linear-gradient(90deg, rgba(193,18,31,.95), rgba(193,18,31,.65));
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ccc-title{ font-size: 16px; font-weight: 900; }
.ccc-subtitle{ font-size: 12.5px; opacity: .9; }
.ccc-header-controls{ display: flex; align-items: center; gap: 8px; }
.ccc-hbtn{
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ccc-hbtn:hover{ background: rgba(255,255,255,.18); }

.ccc-messages{
  background: #0f0f0f;
  padding: 10px;
  max-height: 380px;
  overflow-y: auto;
}
.ccc-msg{ display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px 0; }
.ccc-msg .ava{
  width: 28px; height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex: 0 0 auto;
}
.ccc-msg .txt{
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-width: 100%;
}
.ccc-msg.user{ flex-direction: row-reverse; }
.ccc-msg.user .txt{
  background: rgba(193,18,31,.22);
  border-color: rgba(193,18,31,.35);
}

.ccc-input{
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0f0f0f;
}
#ccc-input{
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
}
#ccc-input::placeholder{ color: rgba(255,255,255,.55); }
.ccc-send{
  width: 44px; height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(193,18,31,.5);
  background: var(--ccc-primary);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.ccc-prechat-overlay{
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ccc-prechat-modal{
  width: min(440px, 92vw);
  background: #111;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,.45);
  color: #fff;
}
.ccc-prechat-modal h3{ margin: 0 0 6px 0; font-size: 18px; font-weight: 900; color: var(--ccc-primary); }
.ccc-prechat-modal p{ margin: 0 0 12px 0; font-size: 13px; color: var(--ccc-muted); }
#ccc-prechat-form label{ display:block; margin: 8px 0 6px; font-size: 13px; color: #fff; }
#ccc-prechat-form .req{ color: var(--ccc-primary); margin-left: 4px; font-weight: 900; }
#ccc-prechat-form input{
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.ccc-pre-actions{ display:flex; gap:10px; margin-top: 14px; }
.ccc-pre-start{
  border: 1px solid rgba(193,18,31,.5);
  background: var(--ccc-primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}
.ccc-pre-cancel{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}
.ccc-pre-error{ margin-top: 10px; color: #ffb4b4; font-size: 12.5px; }

@media (max-width: 768px){
  #ccc-chatbot-window{
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 95% !important;
    max-width: 430px !important;
    bottom: 100px !important;
  }
  .ccc-container{ width: 100% !important; }
  .ccc-messages{ max-height: calc(80vh - 132px) !important; }
}
