/* =====================================================================
   Career & Courses Academy — Chatbot + Site Styles
   ===================================================================== */

:root{
  --cca-primary:      #0B2545;
  --cca-primary-600:  #123A6B;
  --cca-primary-100:  #E7EEF8;
  --cca-accent:       #F4B400;
  --cca-accent-600:   #D89B00;
  --cca-bg:           #F6F8FB;
  --cca-surface:      #FFFFFF;
  --cca-text:         #16202F;
  --cca-text-muted:   #6B7A90;
  --cca-border:       #E2E8F0;
  --cca-success:      #16A34A;
  --cca-radius:       16px;
  --cca-radius-sm:    10px;
  --cca-shadow-lg:    0 24px 60px rgba(11, 37, 69, .22);
  --cca-shadow-md:    0 10px 30px rgba(11, 37, 69, .12);
  --cca-shadow-sm:    0 2px 8px rgba(11, 37, 69, .08);
  --cca-font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  font-family: var(--cca-font);
  color: var(--cca-text);
  background: var(--cca-bg);
  line-height: 1.6;
}

/* ---------------------------------------------------------------------
   Site chrome (demo page)
   --------------------------------------------------------------------- */
.site-header{
  background: var(--cca-primary);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner{
  max-width: 1160px; margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.site-brand{ display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.site-brand__mark{
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--cca-accent); color: var(--cca-primary);
  display: grid; place-items: center; font-weight: 800; letter-spacing: .5px;
}
.site-brand__text strong{ display: block; font-size: 15px; line-height: 1.2; }
.site-brand__text small{ color: rgba(255,255,255,.7); font-size: 12px; }
.site-nav{ display: flex; gap: 22px; }
.site-nav a{ color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; font-weight: 500; }
.site-nav a:hover{ color: #fff; }

.site-main{ max-width: 1160px; margin: 0 auto; padding: 0 22px 80px; }

.hero{ padding: 72px 0 56px; }
.hero__badge{
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: #FFF6DC; color: var(--cca-accent-600);
  font-size: 12.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}
.hero h1{
  font-size: clamp(30px, 5vw, 52px); line-height: 1.1;
  margin: 18px 0 16px; color: var(--cca-primary); letter-spacing: -.5px;
}
.hero__lead{ font-size: 17px; color: var(--cca-text-muted); max-width: 620px; }
.hero__actions{ display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.btn{
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 12px; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 700; font-family: inherit; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn--primary{ background: var(--cca-accent); color: var(--cca-primary); box-shadow: 0 8px 22px rgba(244,180,0,.35); }
.btn--primary:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px rgba(244,180,0,.42); }
.btn--ghost{ background: transparent; color: var(--cca-primary); border: 2px solid var(--cca-border); }
.btn--ghost:hover{ border-color: var(--cca-primary); }

.cards{ display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.card{
  background: var(--cca-surface); border: 1px solid var(--cca-border);
  border-radius: var(--cca-radius); padding: 26px 22px; box-shadow: var(--cca-shadow-sm);
}
.card h3{ margin: 0 0 8px; color: var(--cca-primary); font-size: 18px; }
.card p{ margin: 0; color: var(--cca-text-muted); font-size: 14.5px; }

.site-footer{ border-top: 1px solid var(--cca-border); background: #fff; }
.site-footer__inner{ max-width: 1160px; margin: 0 auto; padding: 26px 22px; }
.site-footer p{ margin: 0; font-size: 13.5px; color: var(--cca-text-muted); }
.site-footer__muted{ margin-top: 4px !important; }

/* =====================================================================
   CHATBOT WIDGET
   ===================================================================== */

/* ---------- Floating launcher ---------- */
/* ---------- Floating launcher ---------- */
.cca-launcher{
  position: fixed; z-index: 9998;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 0;
  padding: 0;                          /* সব inner padding মুছে দিলাম */
  cursor: pointer;

  background: transparent;             /* 👈 navy background সরান */
  color: #fff;

  display: grid; place-items: center;
  overflow: visible;                   /* badge যেন বাইরে দেখায় */

  box-shadow: 0 10px 26px rgba(11,37,69,.28);   /* হালকা shadow */
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
}

/* gold pulse animation বন্ধ — কারণ icon এর নিজের ডিজাইনই যথেষ্ট */
/* চাইলে নিচের লাইনটা uncomment করলে pulse ফিরে আসবে */
/* animation: cca-pulse 2.8s infinite; */

.cca-launcher:hover{
  transform: scale(1.08);
  box-shadow: 0 14px 32px rgba(11,37,69,.38);
}
.cca-launcher:active{ transform: scale(.94); }

/* 🎯 icon.png এখন পুরো circle জুড়ে */
.cca-launcher__icon{
  width: 100%;
  height: 100%;
  border-radius: 50%;                  /* circular crop */
  object-fit: cover;                   /* পুরো circle fill করবে */
  display: block;
  pointer-events: none;
}

/* SVG fallback (icon না থাকলে) */
.cca-launcher svg{
  width: 30px;
  height: 30px;
}

/* If custom icon fails, fall back to plain SVG look */
.cca-launcher--fallback{
  color: #fff;
}
.cca-launcher__badge{
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--cca-accent); border: 2.5px solid #fff;
}
.cca-launcher.is-hidden{ opacity: 0; pointer-events: none; transform: scale(.6); }

@keyframes cca-pulse{
  0%   { box-shadow: 0 12px 32px rgba(11,37,69,.35), 0 0 0 0 rgba(244,180,0,.55); }
  70%  { box-shadow: 0 12px 32px rgba(11,37,69,.35), 0 0 0 16px rgba(244,180,0,0); }
  100% { box-shadow: 0 12px 32px rgba(11,37,69,.35), 0 0 0 0 rgba(244,180,0,0); }
}

.cca-launcher--bottom-right{ right: 24px; bottom: 24px; }
.cca-launcher--bottom-left { left: 24px;  bottom: 24px; }

/* ---------- Window ---------- */
.cca-window{
  position: fixed; z-index: 9999;
  width: 400px; height: 650px;
  max-height: calc(100vh - 40px);
  background: var(--cca-surface);
  border-radius: 20px;
  box-shadow: var(--cca-shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; transform: translateY(24px) scale(.96);
  pointer-events: none;
  transition: opacity .24s ease, transform .24s cubic-bezier(.34,1.4,.64,1);
  font-family: var(--cca-font);
}
.cca-window.is-open{ opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.cca-window--bottom-right{ right: 24px; bottom: 24px; }
.cca-window--bottom-left { left: 24px;  bottom: 24px; }

/* ---------- Header ---------- */
.cca-header{
  background: linear-gradient(135deg, var(--cca-primary) 0%, var(--cca-primary-600) 100%);
  color: #fff; padding: 15px 16px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0; position: relative;
}
.cca-header__logo{
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--cca-primary-100); color: var(--cca-primary);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  overflow: hidden;
}
.cca-header__logo img{ width: 100%; height: 100%; object-fit: cover; }
.cca-header__meta{ flex: 1; min-width: 0; }
.cca-header__title{
  margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cca-header__sub{
  margin: 2px 0 0; font-size: 11.5px; color: rgba(255,255,255,.78);
  display: flex; align-items: center; gap: 6px;
}
.cca-dot{
  width: 7px; height: 7px; border-radius: 50%; background: #34D399;
  box-shadow: 0 0 0 3px rgba(52,211,153,.25);
  animation: cca-blink 2s infinite;
}
@keyframes cca-blink{ 0%,100%{ opacity:1 } 50%{ opacity:.45 } }

.cca-header__actions{ display: flex; gap: 4px; }
.cca-icon-btn{
  width: 32px; height: 32px; border-radius: 9px; border: 0;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
  display: grid; place-items: center; transition: background .16s ease;
}
.cca-icon-btn:hover{ background: rgba(255,255,255,.25); }
.cca-icon-btn svg{ width: 16px; height: 16px; }

/* ---------- Body ---------- */
.cca-body{
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 16px 8px;
  background:
     radial-gradient(circle at 0% 0%, rgba(11,37,69,.035), transparent 45%),
     var(--cca-bg);
  scroll-behavior: smooth;
}
.cca-body::-webkit-scrollbar{ width: 6px; }
.cca-body::-webkit-scrollbar-thumb{ background: #CBD5E1; border-radius: 99px; }

/* ---------- Date separator ---------- */
.cca-date-sep{
  text-align: center; margin: 14px 0 12px;
}
.cca-date-sep span{
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  background: #E9EEF5; color: var(--cca-text-muted);
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
}

/* ---------- Messages ---------- */
.cca-row{ display: flex; margin-bottom: 10px; animation: cca-fadein .28s ease both; }
@keyframes cca-fadein{ from{ opacity:0; transform: translateY(8px);} to{ opacity:1; transform:none;} }

.cca-row--bot{ justify-content: flex-start; }
.cca-row--user{ justify-content: flex-end; }

.cca-bubble{
  max-width: 82%; padding: 10px 14px; font-size: 14px; line-height: 1.5;
  word-wrap: break-word; overflow-wrap: anywhere; position: relative;
}
.cca-bubble--bot{
  background: #fff; color: var(--cca-text);
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 3px rgba(11,37,69,.10);
  border: 1px solid rgba(11,37,69,.05);
}
.cca-bubble--user{
  background: var(--cca-primary); color: #fff;
  border-radius: 16px 4px 16px 16px;
  box-shadow: 0 3px 10px rgba(11,37,69,.22);
}
.cca-bubble a{ color: inherit; text-decoration: underline; }

.cca-time{
  display: block; font-size: 10.5px; margin-top: 5px; opacity: .62;
  letter-spacing: .2px;
}
.cca-bubble--user .cca-time{ text-align: right; }

/* ---------- Typing indicator ---------- */
.cca-typing{
  display: inline-flex; align-items: center; gap: 4px;
  padding: 12px 16px; background: #fff; border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 3px rgba(11,37,69,.10);
  border: 1px solid rgba(11,37,69,.05);
}
.cca-typing i{
  width: 7px; height: 7px; border-radius: 50%; background: #9AA9BD;
  display: block; animation: cca-bounce 1.25s infinite ease-in-out;
}
.cca-typing i:nth-child(2){ animation-delay: .16s; }
.cca-typing i:nth-child(3){ animation-delay: .32s; }
@keyframes cca-bounce{
  0%, 60%, 100%{ transform: translateY(0); opacity:.45; }
  30%          { transform: translateY(-5px); opacity:1; }
}

/* ---------- Input area ---------- */
.cca-input{
  flex-shrink: 0;
  border-top: 1px solid var(--cca-border);
  background: #fff; padding: 12px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.cca-input__hint{
  font-size: 11.5px; color: var(--cca-text-muted); margin: 0 0 8px;
  display: flex; align-items: center; gap: 6px;
}

/* Option buttons */
.cca-options{ display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.cca-option{
  width: 100%; text-align: left;
  padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--cca-border); background: #fff;
  color: var(--cca-text); font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .16s ease;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cca-option:hover{
  border-color: var(--cca-primary); background: var(--cca-primary-100);
  transform: translateX(2px);
}
.cca-option::after{
  content: "→"; color: var(--cca-accent); font-weight: 800; opacity: 0; transition: opacity .16s;
}
.cca-option:hover::after{ opacity: 1; }

.cca-options--yn{ flex-direction: row; }
.cca-options--yn .cca-option{
  justify-content: center; text-align: center; font-size: 15px;
  font-weight: 800; letter-spacing: .6px; padding: 14px;
}
.cca-options--yn .cca-option::after{ content: none; }
.cca-options--yn .cca-option:hover{ transform: translateY(-2px); }

/* Checkbox (multiple choice) */
.cca-check{
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--cca-border);
  cursor: pointer; font-size: 14px; background: #fff; transition: all .14s ease;
}
.cca-check:hover{ border-color: var(--cca-primary); background: var(--cca-primary-100); }
.cca-check input{ accent-color: var(--cca-primary); width: 17px; height: 17px; cursor: pointer; }
.cca-check.is-checked{ border-color: var(--cca-primary); background: var(--cca-primary-100); }

/* Text input row */
.cca-field{ display: flex; gap: 8px; align-items: center; }
.cca-field input,
.cca-field select{
  flex: 1; min-width: 0;
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--cca-border); background: #fff;
  font-size: 14px; font-family: inherit; color: var(--cca-text);
  outline: none; transition: border-color .16s ease, box-shadow .16s ease;
}
.cca-field input:focus,
.cca-field select:focus{
  border-color: var(--cca-primary);
  box-shadow: 0 0 0 3px rgba(11,37,69,.10);
}
.cca-send{
  flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 12px; border: 0;
  background: var(--cca-primary); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .16s ease, background .16s ease;
}
.cca-send:hover{ background: var(--cca-primary-600); transform: translateY(-1px); }
.cca-send:disabled{ opacity: .45; cursor: not-allowed; transform: none; }
.cca-send svg{ width: 19px; height: 19px; }

.cca-error{
  color: #DC2626; font-size: 12.5px; margin: 8px 0 0; font-weight: 600;
}

/* ---------- Footer strip ---------- */
.cca-footer{
  text-align: center; font-size: 10.5px; color: var(--cca-text-muted);
  padding: 7px 10px; background: #fff; border-top: 1px solid var(--cca-border);
  flex-shrink: 0;
}
.cca-footer strong{ color: var(--cca-primary); }

/* ---------- Completed state ---------- */
.cca-restart{
  width: 100%; padding: 12px; border-radius: 12px;
  border: 1.5px solid var(--cca-primary); background: #fff;
  color: var(--cca-primary); font-weight: 700; font-size: 14px;
  font-family: inherit; cursor: pointer; transition: all .16s ease;
}
.cca-restart:hover{ background: var(--cca-primary); color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 560px){
  .cca-window,
  .cca-window--bottom-right,
  .cca-window--bottom-left{
    left: 0; right: 0; bottom: 0; top: 0;
    width: 100%; height: 100%; max-height: 100%;
    border-radius: 0;
    transform: translateY(100%);
  }
  .cca-window.is-open{ transform: translateY(0); }
  .cca-launcher--bottom-right{ right: 16px; bottom: 16px; }
  .cca-launcher--bottom-left{ left: 16px; bottom: 16px; }
  .cca-bubble{ max-width: 86%; }
  .site-nav{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .01ms !important; transition-duration: .01ms !important; }
}