/* ==================== MODERN PROFESSIONAL CHATBOT STYLES ==================== */

.gemini-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* CHAT BUTTON - Circular with white background like WhatsApp */
.gemini-chat-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  padding: 8px;
}

/* Robot image inside circular button */
.gemini-chat-button::after {
  content: '';
  position: absolute;
  width: 75%;
  height: 75%;
  background: url('../images/chatbot-robot.png') center/contain no-repeat;
  display: block;
  transition: opacity 0.3s;
}

.gemini-chat-button:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.gemini-chat-button.active::after {
  opacity: 0;
}

.gemini-chat-button .bot-icon {
  display: none;
}

.gemini-chat-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.gemini-chat-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.gemini-chat-button:hover::before {
  opacity: 1;
}

/* Bot Icon - Modern chat bubble */
.gemini-chat-button svg {
  width: 32px;
  height: 32px;
  fill: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.gemini-chat-button .close-icon {
  display: none;
}

.gemini-chat-button.active .bot-icon {
  display: none;
}

.gemini-chat-button.active .close-icon {
  display: block;
}

.gemini-chat-button.active {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-color: #f5576c;
}

.gemini-chat-button.active .close-icon {
  display: block;
  position: relative;
  z-index: 1;
}

/* CHAT WINDOW - Modern card design */
.gemini-chat-window {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 400px;
  height: 600px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9997;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gemini-chat-window.active {
  display: flex;
}

/* CHAT HEADER - Premium gradient */
.gemini-chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
}

.gemini-chat-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.gemini-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.gemini-chat-close svg {
  width: 20px;
  height: 20px;
  fill: white;
}

@media (max-width: 768px) {
  .gemini-chat-close {
    display: flex;
  }
}

.gemini-chat-header-icon {
  width: 48px;
  height: 48px;
  background: white;
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  padding: 4px;
}

/* Robot image in header */
.gemini-chat-header-icon::before {
  content: '';
  width: 100%;
  height: 100%;
  background: url('../images/chatbot-robot.png') center/cover no-repeat;
  display: block;
}

.gemini-chat-header-icon svg {
  display: none;
}

.gemini-chat-header-text h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.gemini-chat-header-text p {
  margin: 4px 0 0 0;
  font-size: 13px;
  opacity: 0.9;
  font-weight: 400;
}

/* MESSAGES AREA - Clean and modern */
.gemini-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  scroll-behavior: smooth;
}

.gemini-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.gemini-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.gemini-chat-messages::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.gemini-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* MESSAGE BUBBLES - Modern design */
.gemini-message {
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gemini-message.bot {
  flex-direction: row;
}

.gemini-message.user {
  flex-direction: row-reverse;
}

/* AVATARS - Professional circular avatars with robot image */
.gemini-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.gemini-message.bot .gemini-message-avatar {
  background: white;
  padding: 2px;
}

/* Robot image for bot */
.gemini-message.bot .gemini-message-avatar::before {
  content: '';
  width: 100%;
  height: 100%;
  background: url('../images/chatbot-robot.png') center/cover no-repeat;
  display: block;
}

.gemini-message.bot .gemini-message-avatar svg {
  display: none;
}

.gemini-message.user .gemini-message-avatar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gemini-message.user .gemini-message-avatar svg {
  fill: white;
}

.gemini-message-avatar svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* MESSAGE CONTENT - Modern bubbles */
.gemini-message-content {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gemini-message.bot .gemini-message-content {
  background: white;
  color: #1f2937;
  border-bottom-left-radius: 6px;
  border: 1px solid #e5e7eb;
}

.gemini-message.user .gemini-message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom-right-radius: 6px;
}

/* TYPING INDICATOR - Smooth animation */
.gemini-typing-indicator {
  display: flex;
  gap: 6px;
  padding: 14px 18px;
  background: white;
  border-radius: 18px;
  width: fit-content;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gemini-typing-dot {
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.gemini-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.gemini-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-12px);
    opacity: 1;
  }
}

/* INPUT AREA - Modern and clean */
.gemini-chat-input-container {
  padding: 20px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.03);
}

.gemini-chat-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  font-size: 14.5px;
  outline: none;
  font-family: inherit;
  transition: all 0.3s;
  background: #f9fafb;
}

.gemini-chat-input:focus {
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.gemini-chat-input::placeholder {
  color: #9ca3af;
}

/* SEND BUTTON - Modern gradient */
.gemini-send-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.gemini-send-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.gemini-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gemini-send-button svg {
  width: 22px;
  height: 22px;
  fill: white;
}

/* QUICK REPLY BUTTONS - Radio buttons only, no boxes */
.gemini-quick-replies {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.gemini-quick-reply {
  padding: 8px 12px;
  padding-left: 32px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  color: #374151;
  box-shadow: none;
  position: relative;
  text-align: left;
}

/* Radio button circle */
.gemini-quick-reply::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #9ca3af;
  border-radius: 50%;
  background: white;
  transition: all 0.3s;
}

/* Radio button dot when hovered or active */
.gemini-quick-reply:hover::before,
.gemini-quick-reply:active::before,
.gemini-quick-reply.selected::before {
  border-color: #667eea;
}

.gemini-quick-reply:hover::after,
.gemini-quick-reply:active::after,
.gemini-quick-reply.selected::after {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667eea;
}

.gemini-quick-reply:hover,
.gemini-quick-reply:active,
.gemini-quick-reply.selected {
  color: #667eea;
  font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .gemini-chat-window {
    width: 90%;
    max-width: 380px;
    height: 65vh;
    max-height: 580px;
    right: 50%;
    bottom: 110px;
    transform: translateX(50%);
    border-radius: 24px;
  }
  
  .gemini-chat-button {
    bottom: 150px;
    width: 56px;
    height: 56px;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }
  
  .gemini-chat-button::after {
    width: 70%;
    height: 70%;
  }
  
  .gemini-chat-button:hover {
    transform: scale(1.08) translateY(-2px);
  }
  
  .gemini-chat-button svg {
    width: 28px;
    height: 28px;
  }
  
  .gemini-chat-header {
    padding: 10px 12px;
  }
  
  .gemini-chat-header-icon {
    width: 34px;
    height: 34px;
    padding: 3px;
  }
  
  .gemini-chat-header-text h3 {
    font-size: 13px;
  }
  
  .gemini-chat-header-text p {
    font-size: 10px;
  }
  
  .gemini-chat-close {
    width: 28px;
    height: 28px;
    display: flex;
    top: 8px;
    right: 8px;
  }
  
  .gemini-chat-close svg {
    width: 14px;
    height: 14px;
  }
  
  .gemini-chat-messages {
    padding: 8px;
  }
  
  .gemini-chat-input-container {
    padding: 8px 10px;
  }
  
  .gemini-chat-input {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 16px;
  }
  
  .gemini-send-button {
    width: 36px;
    height: 36px;
  }
  
  .gemini-send-button svg {
    width: 16px;
    height: 16px;
  }
  
  .gemini-quick-reply {
    font-size: 11.5px;
    padding: 5px 8px;
    padding-left: 24px;
  }
  
  .gemini-quick-reply::before {
    width: 12px;
    height: 12px;
    left: 5px;
    border-width: 1.5px;
  }
  
  .gemini-quick-reply:hover::after,
  .gemini-quick-reply:active::after,
  .gemini-quick-reply.selected::after {
    width: 6px;
    height: 6px;
    left: 8px;
  }
  
  .gemini-quick-replies {
    gap: 5px;
  }
  
  .gemini-message-content {
    font-size: 11.5px;
    max-width: 70%;
    padding: 7px 10px;
    border-radius: 10px;
    line-height: 1.3;
  }
  
  .gemini-message-avatar {
    width: 24px;
    height: 24px;
  }
  
  .gemini-message {
    margin-bottom: 7px;
    gap: 5px;
  }
  
  .gemini-quick-replies {
    gap: 6px;
    margin-top: 8px;
  }
}

/* Special styling for bold text in messages */
.gemini-message-content b {
  font-weight: 600;
  color: #667eea;
}

.gemini-message.user .gemini-message-content b {
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Special Thank You Message Styling */
.gemini-message-content .thank-you {
  display: block;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 12px 0;
  padding: 8px 0;
  border-top: 2px solid #e5e7eb;
  border-bottom: 2px solid #e5e7eb;
  animation: thankYouPulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
  .gemini-message-content .thank-you {
    font-size: 15px;
    margin: 8px 0;
    padding: 6px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
  }
}

@keyframes thankYouPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Contact info styling in messages */
.gemini-message-content .contact-info {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 12px;
  margin-top: 12px;
  border-left: 4px solid #667eea;
}

.gemini-message-content .contact-info b {
  color: #1f2937;
  display: block;
  margin-bottom: 8px;
}

/* Summary box styling */
.gemini-message-content .summary-box {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  padding: 14px;
  border-radius: 12px;
  margin: 10px 0;
  border: 2px solid rgba(102, 126, 234, 0.3);
}