/* ================================================================
   CHATBOX & REVIEW — REPOSITIONED BOTTOM RIGHT, HAPPY AI
   ================================================================ */

/* ── NOTIFICATION BUBBLE ── */
.hh-chat-bubble-notify {
  position: fixed;
  bottom: 176px;
  right: 92px;
  background: white;
  color: #333;
  padding: 10px 16px;
  border-radius: 16px 16px 4px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.16);
  white-space: nowrap;
  z-index: 9989;
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
.hh-chat-bubble-notify.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
  animation: bubble-bounce 3s ease-in-out 0.5s infinite;
}
@keyframes bubble-bounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.hh-bubble-tail {
  position: absolute;
  right: -7px; bottom: 14px;
  width: 0; height: 0;
  border-top: 8px solid transparent;
  border-bottom: 0;
  border-left: 8px solid white;
}

/* ── CHAT TRIGGER BUTTON (bottom-right, above float-call) ── */
.hh-chat-trigger {
  position: fixed;
  bottom: 164px;
  right: 24px;
  z-index: 9999;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(102,126,234,0.5);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: fixed;
  overflow: visible;
}
.hh-chat-trigger:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 14px 40px rgba(102,126,234,0.65);
}
.hh-chat-trigger svg { width: 24px; height: 24px; flex-shrink: 0; }
.hh-chat-label-tag {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%; transform: translateY(-50%);
  background: #1a1a2e;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(-50%) translateX(6px);
}
.hh-chat-trigger:hover .hh-chat-label-tag {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.hh-chat-pulse {
  position: absolute;
  top: 1px; right: 1px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #00B894;
  border: 2px solid white;
  z-index: 1;
  animation: chat-pulse 2s ease-in-out infinite;
}
@keyframes chat-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,184,148,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(0,184,148,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,184,148,0); }
}

/* ── CHAT WINDOW ── */
.hh-chat-window {
  position: fixed;
  bottom: 218px;
  right: 20px;
  width: 360px;
  max-height: 520px;
  z-index: 9991;
  display: flex;
  flex-direction: column;
  background: rgba(14,16,30,0.95);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55);
  overflow: hidden;
  transform: translateY(20px) scale(0.94);
  opacity: 0;
  pointer-events: none;
  transition: all 0.45s cubic-bezier(0.16,1,0.3,1);
}
.hh-chat-window.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.hh-chat-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(102,126,234,0.25), rgba(118,75,162,0.25));
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.hh-chat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
  animation: avatar-ring 4s ease-in-out infinite;
}
@keyframes avatar-ring {
  0%,100% { box-shadow: 0 0 0 3px rgba(102,126,234,0.2); }
  50%      { box-shadow: 0 0 0 6px rgba(102,126,234,0.1); }
}
.hh-chat-header-info { flex: 1; }
.hh-chat-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 14px;
  color: white; letter-spacing: 0.02em;
}
.hh-chat-status {
  font-family: 'Inter', sans-serif; font-size: 11px;
  color: #00B894; display: flex; align-items: center; gap: 5px;
  margin-top: 2px;
}
.hh-chat-status::before {
  content: ''; width: 7px; height: 7px;
  border-radius: 50%; background: #00B894;
  animation: chat-pulse 2s ease-in-out infinite;
}
.hh-chat-close {
  background: rgba(255,255,255,0.08); border: none;
  cursor: pointer; width: 28px; height: 28px;
  border-radius: 50%; color: rgba(255,255,255,0.6);
  font-size: 13px; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.hh-chat-close:hover { background: rgba(255,255,255,0.16); color: white; }

/* Suggestions */
.hh-chat-suggestions {
  padding: 10px 14px 0; display: flex; flex-wrap: wrap;
  gap: 6px; flex-shrink: 0;
}
.hh-chat-sugg {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  padding: 5px 11px; border-radius: 20px;
  font-size: 11px; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.hh-chat-sugg:hover {
  background: rgba(102,126,234,0.28);
  border-color: rgba(102,126,234,0.5);
  color: white; transform: translateY(-2px);
}

/* Messages */
.hh-chat-msgs {
  flex: 1; overflow-y: auto;
  padding: 12px 14px; display: flex;
  flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.hh-chat-msgs::-webkit-scrollbar { width: 3px; }
.hh-chat-msgs::-webkit-scrollbar-track { background: transparent; }
.hh-chat-msgs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

.hh-msg { display: flex; gap: 8px; max-width: 86%; }
.hh-msg--bot { align-self: flex-start; }
.hh-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.hh-msg-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.hh-msg-bubble {
  padding: 9px 13px; border-radius: 18px;
  font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.55;
  animation: msg-appear 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes msg-appear {
  from { opacity:0; transform:scale(0.82) translateY(10px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}
.hh-msg--bot .hh-msg-bubble {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
}
.hh-msg--user .hh-msg-bubble {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white; border-bottom-right-radius: 4px;
}

/* Typing */
.hh-typing {
  display: flex; align-items: center; gap: 5px;
  padding: 11px 13px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px; border-bottom-left-radius: 4px;
  width: fit-content;
  animation: msg-appear 0.3s ease;
}
.hh-typing-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  animation: typing-bounce 1.4s ease-in-out infinite;
}
.hh-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.hh-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%,60%,100% { transform: translateY(0); opacity:0.4; }
  30%          { transform: translateY(-6px); opacity:1; }
}

/* Input */
.hh-chat-powered {
  text-align: center; font-size: 10px;
  color: rgba(255,255,255,0.22); font-family: 'Inter', sans-serif;
  padding: 4px 0 6px; flex-shrink: 0;
}
.hh-chat-input-wrap {
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; gap: 9px; align-items: center; flex-shrink: 0;
  background: rgba(0,0,0,0.15);
}
.hh-chat-input {
  flex: 1; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px; padding: 9px 15px;
  color: white; font-family: 'Inter', sans-serif; font-size: 13px;
  outline: none; transition: border-color 0.2s; cursor: text;
}
.hh-chat-input::placeholder { color: rgba(255,255,255,0.3); }
.hh-chat-input:focus { border-color: rgba(102,126,234,0.55); }
.hh-chat-send {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1); flex-shrink: 0;
}
.hh-chat-send:hover { transform: scale(1.15); }
.hh-chat-send svg { width: 15px; height: 15px; }

/* ── NAVBAR REVIEW BUTTON ── */
.nav-review-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 15px; border-radius: 50px;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 12px;
  color: #F4B400;
  background: rgba(244,180,0,0.1);
  border: 1.5px solid rgba(244,180,0,0.32);
  cursor: pointer; transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  text-decoration: none; white-space: nowrap;
}
.nav-review-btn:hover {
  background: rgba(244,180,0,0.18);
  border-color: #F4B400;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(244,180,0,0.28);
}

/* ── GOOGLE REVIEW POPUP ── */
.review-popup {
  position: fixed; bottom: 24px; right: 24px; z-index: 9985;
  width: 320px;
  background: white; border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 24px;
  transform: translateY(20px) scale(0.88);
  opacity: 0; pointer-events: none;
  transition: all 0.5s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
.review-popup.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1; pointer-events: all;
}
.review-popup::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335);
}
.review-popup-close {
  position: absolute; top: 12px; right: 12px;
  background: #f5f5f5; border: none; cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 13px; color: #666;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.review-popup-close:hover { background: #e0e0e0; color: #333; }
.review-popup-stars { font-size: 24px; margin-bottom: 10px; }
.review-popup-title {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 16px; color: #123458; margin-bottom: 6px;
}
.review-popup-sub {
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: #666; line-height: 1.5; margin-bottom: 18px;
}
.review-popup-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 20px; border-radius: 14px;
  background: linear-gradient(135deg, #4285F4, #357AE8);
  color: white; font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 14px;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(66,133,244,0.4);
}
.review-popup-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(66,133,244,0.5);
}
.review-popup-skip {
  text-align: center; margin-top: 10px;
  font-size: 12px; color: #aaa; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: color 0.2s;
}
.review-popup-skip:hover { color: #666; }

/* ── RESPONSIVE ── */
@media(max-width:768px) {
  .hh-chat-window { width: calc(100vw - 32px); right: 16px; max-height: 72vh; }
  .hh-chat-trigger { bottom: 84px !important; right: 20px !important; }
  .hh-chat-bubble-notify { right: 88px !important; bottom: 92px !important; }
  .review-popup { width: calc(100vw - 32px); right: 16px; bottom: 16px; }
  .float-wa, .float-call { display: none !important; }
}
