/* Cheezy Templates — chatbot widget ("Bé iu — Shop Assistant").
   Brand: maroon #6B1D2A, gold #C9A86A, cream #F5EFE6. Fonts are local (Fraunces, Caveat). */

#cb-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 1000;
  width: 62px; height: 62px; border-radius: 50%;
  border: 3px solid var(--gold, #C9A86A);
  background: #6B1D2A; cursor: pointer; padding: 0;
  box-shadow: 0 8px 24px rgba(43, 30, 27, .35);
  animation: cb-pulse 2.6s ease-in-out infinite;
  transition: transform .18s ease;
}
#cb-fab:hover { transform: scale(1.07); }
#cb-fab img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
#cb-fab .cb-dot {
  position: absolute; top: -2px; right: -2px; width: 16px; height: 16px;
  border-radius: 50%; background: #2E7D4F; border: 2px solid #FFFDF8;
}
@keyframes cb-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(43,30,27,.35), 0 0 0 0 rgba(201,168,106,.45); }
  50% { box-shadow: 0 8px 24px rgba(43,30,27,.35), 0 0 0 9px rgba(201,168,106,0); }
}

#cb-panel {
  position: fixed; right: 18px; bottom: 92px; z-index: 1000;
  width: min(380px, calc(100vw - 32px));
  height: min(540px, calc(100dvh - 130px));
  background: #FFFDF8; border: 1px solid #E3D7C2; border-radius: 16px;
  box-shadow: 0 18px 48px rgba(43,30,27,.30);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
#cb-panel.open { opacity: 1; transform: none; pointer-events: auto; }

.cb-head {
  background: #6B1D2A; color: #F5EFE6; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(201,168,106,.35) 1.2px, transparent 0);
  background-size: 16px 16px;
}
.cb-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #C9A86A; background: #F5EFE6; flex-shrink: 0; }
.cb-head .cb-title { min-width: 0; flex: 1; }
.cb-head .cb-name { font-family: "Fraunces", Georgia, serif; font-weight: 900; font-size: 17px; line-height: 1.15; }
.cb-head .cb-status { font-size: 12px; color: #E8D9BE; }
.cb-head .cb-status::before { content: "●"; color: #7BC98F; margin-right: 4px; font-size: 10px; }
.cb-lang { display: flex; border: 1.5px solid #C9A86A; border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.cb-lang button {
  background: transparent; border: 0; color: #E8D9BE; font-weight: 700; font-size: 12px;
  padding: 5px 9px; cursor: pointer; font-family: inherit;
}
.cb-lang button.on { background: #C9A86A; color: #2B1E1B; }
.cb-close {
  background: transparent; border: 0; color: #F5EFE6; font-size: 22px; line-height: 1;
  cursor: pointer; padding: 4px 6px; flex-shrink: 0;
}

#cb-log {
  flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 9px;
  background: #F5EFE6;
  background-image: radial-gradient(circle at 1px 1px, rgba(201,168,106,.16) 1px, transparent 0);
  background-size: 24px 24px;
}
.cb-msg { max-width: 84%; padding: 9px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; word-wrap: break-word; }
.cb-msg a { color: #6B1D2A; font-weight: 700; }
.cb-msg.bot { background: #FFFDF8; border: 1px solid #E3D7C2; border-bottom-left-radius: 8px; align-self: flex-start; color: #2B1E1B; }
.cb-msg.user { background: #6B1D2A; color: #FFF6E8; border-bottom-right-radius: 8px; align-self: flex-end; }
.cb-msg.user a { color: #F5EFE6; }
.cb-msg .cb-prod { display: block; margin-top: 6px; }
.cb-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.cb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #C9A86A; animation: cb-blink 1s infinite; }
.cb-typing i:nth-child(2) { animation-delay: .18s; }
.cb-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes cb-blink { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

#cb-chips { display: flex; gap: 7px; flex-wrap: wrap; padding: 9px 12px 4px; background: #F5EFE6; flex-shrink: 0; }
.cb-chip {
  border: 1.5px solid #C9A86A; background: #FFFDF8; color: #6B1D2A; border-radius: 999px;
  font-size: 13px; font-weight: 700; padding: 6px 12px; cursor: pointer; font-family: inherit;
}
.cb-chip:hover { background: #EFE3CE; }

#cb-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: #F5EFE6; flex-shrink: 0; }
#cb-input {
  flex: 1; border: 1.5px solid #E3D7C2; border-radius: 999px; padding: 10px 14px;
  font-size: 15px; font-family: inherit; background: #FFFDF8; color: #2B1E1B; min-width: 0;
}
#cb-input:focus { outline: 2px solid #C9A86A; border-color: #C9A86A; }
#cb-send {
  width: 44px; height: 44px; border-radius: 50%; border: 0; flex-shrink: 0;
  background: #6B1D2A; color: #FFF6E8; font-size: 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
#cb-send:hover { background: #571520; }

@media (max-width: 480px) {
  #cb-fab { right: 14px; bottom: 14px; width: 56px; height: 56px; }
  #cb-panel { right: 12px; bottom: 82px; }
  .cb-head img { width: 36px; height: 36px; }
  .cb-head .cb-name { font-size: 14px; }
  .cb-lang button { padding: 5px 7px; }
}
