/* GCT Chatbot styles */
#gct-chatbot { position: fixed; bottom: 24px; right: 24px; z-index: 9000; font-family: 'DM Sans', system-ui, sans-serif; }
html[dir="rtl"] #gct-chatbot { right: auto; left: 24px; }

#gct-chatbot .cb-launcher {
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: #c85a2a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(200,90,42,0.4), 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
#gct-chatbot .cb-launcher:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 40px rgba(200,90,42,0.5); }
#gct-chatbot .cb-launcher-pulse {
  position: absolute; inset: 0; border-radius: 50%; background: #c85a2a; opacity: 0.5;
  animation: cb-pulse 2.2s ease-out infinite;
}
@keyframes cb-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

#gct-chatbot .cb-window {
  position: absolute; bottom: 0; right: 0; width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 48px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(14,30,58,0.25), 0 8px 16px rgba(0,0,0,0.08);
  display: none; flex-direction: column;
  transform-origin: bottom right;
  animation: cb-pop 0.25s ease-out;
}
html[dir="rtl"] #gct-chatbot .cb-window { right: auto; left: 0; transform-origin: bottom left; }
#gct-chatbot .cb-window.cb-open { display: flex; }
@keyframes cb-pop { from { transform: scale(0.92) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

#gct-chatbot .cb-header {
  background: linear-gradient(135deg, #0e1e3a 0%, #1c3461 100%);
  color: #fff; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
#gct-chatbot .cb-header-left { display: flex; align-items: center; gap: 12px; }
#gct-chatbot .cb-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: #c85a2a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; font-family: 'Playfair Display', serif;
}
#gct-chatbot .cb-header-title { font-size: 14px; font-weight: 600; }
#gct-chatbot .cb-header-sub { font-size: 11px; opacity: 0.7; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
#gct-chatbot .cb-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; }
#gct-chatbot .cb-close {
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
#gct-chatbot .cb-close:hover { background: rgba(255,255,255,0.2); }

#gct-chatbot .cb-messages {
  flex: 1; overflow-y: auto; padding: 18px 16px;
  background: #f8f6f2;
  display: flex; flex-direction: column; gap: 10px;
}
#gct-chatbot .cb-msg { display: flex; }
#gct-chatbot .cb-msg-bot { justify-content: flex-start; }
#gct-chatbot .cb-msg-user { justify-content: flex-end; }
#gct-chatbot .cb-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word;
}
#gct-chatbot .cb-msg-bot .cb-bubble { background: #fff; color: #1c2541; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
#gct-chatbot .cb-msg-user .cb-bubble { background: #1c3461; color: #fff; border-bottom-right-radius: 4px; }
#gct-chatbot .cb-typing { display: flex; gap: 4px; padding: 14px 16px; }
#gct-chatbot .cb-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #c85a2a;
  animation: cb-typing 1.2s ease-in-out infinite;
}
#gct-chatbot .cb-typing span:nth-child(2) { animation-delay: 0.15s; }
#gct-chatbot .cb-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cb-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

#gct-chatbot .cb-quick {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; background: #f8f6f2;
}
#gct-chatbot .cb-quick:empty { display: none; }
#gct-chatbot .cb-quick-btn {
  background: #fff; border: 1px solid #e0ddd5; color: #1c3461;
  padding: 7px 12px; border-radius: 16px; font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
#gct-chatbot .cb-quick-btn:hover { background: #1c3461; color: #fff; border-color: #1c3461; }

#gct-chatbot .cb-input-row {
  display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid #ede9e0; background: #fff;
}
#gct-chatbot .cb-input-row input {
  flex: 1; border: 1.5px solid #e0ddd5; border-radius: 22px;
  padding: 10px 16px; font-size: 14px; font-family: inherit; color: #1c2541;
  outline: none; transition: border-color 0.15s;
}
#gct-chatbot .cb-input-row input:focus { border-color: #1c3461; }
#gct-chatbot .cb-input-row button {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: #c85a2a; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.15s;
}
#gct-chatbot .cb-input-row button:hover { background: #b24d22; transform: scale(1.05); }
#gct-chatbot .cb-footer {
  text-align: center; font-size: 10px; color: #999; padding: 6px 0 8px; background: #fff;
  border-top: 1px solid #f0ede5;
}
#gct-chatbot .cb-footer a { color: #c85a2a; text-decoration: none; }
#gct-chatbot .cb-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  #gct-chatbot .cb-window { width: calc(100vw - 24px); height: calc(100vh - 100px); }
}
