/* ================= Chatbot Widget ================= */

.cb-toggle {
  position: fixed;
  bottom: 98px;
  right: 24px;
  z-index: 210;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #E7A93C;
  color: #12151D;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: transform .25s ease;
}
.cb-toggle:hover { transform: scale(1.08); }
.cb-toggle svg { width: 26px; height: 26px; }
.cb-toggle .cb-close-icon { display: none; }
.cb-toggle.open .cb-chat-icon { display: none; }
.cb-toggle.open .cb-close-icon { display: block; }

.cb-badge {
  position: absolute;
  top: -3px; right: -3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #35C1A0;
  border: 2px solid #0B0D12;
}

.cb-panel {
  position: fixed;
  bottom: 164px;
  right: 24px;
  z-index: 210;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  background: #12151D;
  border: 1px solid rgba(245,244,240,0.12);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease;
}
.cb-panel.open { display: flex; opacity: 1; transform: translateY(0); }

.cb-header {
  background: linear-gradient(135deg, #E7A93C, #d99a2c);
  color: #12151D;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cb-header img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #fff; }
.cb-header-text strong { display: block; font-size: 14.5px; }
.cb-header-text span { display: block; font-size: 12px; opacity: .8; }

.cb-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #0f1219;
}
.cb-msg {
  max-width: 85%;
  background: #1b1f2a;
  color: var(--text-light, #F5F4F0);
  padding: 10px 14px;
  border-radius: 12px 12px 12px 3px;
  font-size: 13.5px;
  line-height: 1.55;
}
.cb-msg.cb-user {
  align-self: flex-end;
  background: #E7A93C;
  color: #12151D;
  border-radius: 12px 12px 3px 12px;
}
.cb-options { display: flex; flex-direction: column; gap: 8px; }
.cb-options button {
  text-align: left;
  background: #1b1f2a;
  border: 1px solid rgba(245,244,240,0.12);
  color: var(--text-light, #F5F4F0);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.cb-options button:hover { background: rgba(231,169,60,0.15); border-color: rgba(231,169,60,0.4); }

.cb-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cb-form input, .cb-form textarea {
  width: 100%;
  background: #1b1f2a;
  border: 1px solid rgba(245,244,240,0.15);
  color: var(--text-light, #F5F4F0);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.cb-form textarea { resize: vertical; min-height: 54px; }
.cb-form button {
  background: #E7A93C;
  color: #12151D;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.cb-form button:disabled { opacity: .6; cursor: default; }
.cb-hp { display: none !important; }

.cb-footer {
  padding: 10px 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted, #9AA1AE);
  border-top: 1px solid rgba(245,244,240,0.08);
}

@media (max-width: 480px) {
  .cb-toggle { bottom: 82px; right: 18px; width: 50px; height: 50px; }
  .cb-panel { bottom: 142px; right: 16px; width: calc(100vw - 32px); }
}
