/* ================================================================
   Gujarat Haj House — AI Chatbot Widget Styles
   ================================================================ */

.ghh-chatbot {
  position: fixed;
  bottom: 24px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.ghh-chatbot--right { right: 24px; align-items: flex-end; }
.ghh-chatbot--left  { left: 24px;  align-items: flex-start; }

/* ── Toggle button ───────────────────────────────────────────── */
.ghh-chatbot__toggle {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #fff;
  border: none; cursor: pointer;
  box-shadow: 0 6px 24px rgba(27,67,50,.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.ghh-chatbot__toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(27,67,50,.55);
}

.ghh-chatbot__badge {
  position: absolute;
  top: -2px; right: -2px;
  width: 18px; height: 18px;
  background: #d4a017;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: .65rem;
  font-weight: 800;
  color: #0f2d1e;
  display: flex; align-items: center; justify-content: center;
  animation: ghh-badge-pulse 2s infinite;
}
@keyframes ghh-badge-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}

/* ── Chat window ─────────────────────────────────────────────── */
.ghh-chatbot__window {
  width: 340px;
  max-height: 520px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  background: #fff;
  animation: ghh-chat-open .22s ease;
  border: 1px solid rgba(0,0,0,.08);
}

@keyframes ghh-chat-open {
  from { opacity: 0; transform: scale(.9) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Chat header ─────────────────────────────────────────────── */
.ghh-chatbot__header {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #fff;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.ghh-chatbot__header-left {
  display: flex; align-items: center; gap: 10px;
}
.ghh-chatbot__avatar {
  font-size: 1.9rem;
  background: rgba(255,255,255,.15);
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ghh-chatbot__botname {
  font-weight: 700; font-size: .95rem;
}
.ghh-chatbot__status {
  font-size: .72rem; opacity: .82; margin-top: 2px;
  color: #a8e6c4;
}
.ghh-chatbot__close {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.ghh-chatbot__close:hover { background: rgba(255,255,255,.28); }

/* ── Messages area ───────────────────────────────────────────── */
.ghh-chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.ghh-chatbot__messages::-webkit-scrollbar { width: 4px; }
.ghh-chatbot__messages::-webkit-scrollbar-track { background: transparent; }
.ghh-chatbot__messages::-webkit-scrollbar-thumb { background: #c0d0c8; border-radius: 2px; }

/* ── Individual message bubbles ─────────────────────────────── */
.ghh-msg {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: .84rem;
  line-height: 1.5;
  word-break: break-word;
  animation: ghh-msg-in .18s ease;
}
@keyframes ghh-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ghh-msg--bot {
  background: #fff;
  color: #1a2e18;
  border-radius: 14px 14px 14px 3px;
  box-shadow: 0 1px 5px rgba(0,0,0,.10);
  align-self: flex-start;
}
.ghh-msg--user {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #fff;
  border-radius: 14px 14px 3px 14px;
  align-self: flex-end;
  box-shadow: 0 2px 8px rgba(27,67,50,.3);
}

/* ── Typing indicator ───────────────────────────────────────── */
.ghh-msg--typing {
  background: #fff;
  color: #888;
  border-radius: 14px 14px 14px 3px;
  align-self: flex-start;
  padding: 10px 14px;
  display: flex; gap: 4px; align-items: center;
  box-shadow: 0 1px 5px rgba(0,0,0,.10);
}
.ghh-typing-dot {
  width: 7px; height: 7px;
  background: #b0c0b8;
  border-radius: 50%;
  animation: ghh-typing 1.2s infinite;
}
.ghh-typing-dot:nth-child(2) { animation-delay: .2s; }
.ghh-typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes ghh-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30%            { transform: translateY(-6px); opacity: 1; }
}

/* ── Input footer ───────────────────────────────────────────── */
.ghh-chatbot__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}
.ghh-chatbot__input {
  flex: 1;
  border: 1.5px solid #d4d4d4;
  border-radius: 22px;
  padding: 8px 15px;
  font-size: .84rem;
  outline: none;
  color: #1a2e18;
  font-family: inherit;
  transition: border-color .15s;
  background: #f9f9f9;
}
.ghh-chatbot__input:focus {
  border-color: #1b4332;
  background: #fff;
}
.ghh-chatbot__send {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #fff; border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, opacity .15s;
  flex-shrink: 0;
}
.ghh-chatbot__send:hover   { transform: scale(1.08); }
.ghh-chatbot__send:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ── Powered by footer ──────────────────────────────────────── */
.ghh-chatbot__powered {
  text-align: center;
  font-size: .65rem;
  color: #aaa;
  padding: 4px 0 6px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ghh-chatbot--right { right: 12px; bottom: 14px; }
  .ghh-chatbot--left  { left: 12px;  bottom: 14px; }
  .ghh-chatbot__window { width: calc(100vw - 32px); max-height: 420px; }
}

/* ── Print: hide chatbot ─────────────────────────────────────── */
@media print { .ghh-chatbot { display: none !important; } }

/* ── Q&A Predefined Questions ───────────────────────────────── */
.ghh-qa-wrap,
.ghh-qa-followup {
  padding: 8px 10px;
  margin: 6px 0;
  background: #f0f9f4;
  border-radius: 10px;
  border: 1px solid #c8e6d4;
}
.ghh-qa-label {
  font-size: .67rem;
  font-weight: 700;
  color: #5a7a65;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 0 7px;
}
.ghh-qa-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid #2d6a4f;
  color: #1b4332;
  border-radius: 18px;
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 5px;
  transition: background .15s, color .15s, transform .12s;
  line-height: 1.3;
}
.ghh-qa-btn:last-child { margin-bottom: 0; }
.ghh-qa-btn:hover {
  background: #1b4332;
  color: #fff;
  transform: translateX(3px);
}
.ghh-qa-btn--more {
  background: #f4c431;
  border-color: #d4a017;
  color: #1b4332;
}
.ghh-qa-btn--more:hover {
  background: #d4a017;
  color: #fff;
  border-color: #b8860b;
}
.ghh-qa-btn--ask {
  background: #e8f4fd;
  border-color: #2196f3;
  color: #1565c0;
}
.ghh-qa-btn--ask:hover {
  background: #2196f3;
  color: #fff;
  border-color: #1976d2;
}
