/* Cleanifiq Chatbot CSS - Isolated from Bootstrap conflicts */

/* Prefix all classes with cleanifiq- to avoid conflicts */
.cleanifiq-chat-container {
  font-family: 'Inter', sans-serif;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

/* Open chat button styling - Small icon version to match Next.js */
.cleanifiq-open-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(to right, #FF7810, #E9B21E);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  padding: 0;
  animation: gentle-bounce 4s ease-in-out infinite;
}



/* Button content styling - Icon only version */
.cleanifiq-open-btn .btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Icon styling - Larger for icon-only button */
.cleanifiq-open-btn .chat-icon {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
}

/* Text styling - Hidden for icon-only version */
.cleanifiq-open-btn .btn-text {
  display: none;
}

.cleanifiq-open-btn:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Pulse animation for chat button to draw attention */
.cleanifiq-open-btn.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 120, 16, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 120, 16, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 120, 16, 0);
  }
}

@keyframes gentle-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Mobile responsive styles - Icon only version */
@media (max-width: 767px) {
  .cleanifiq-open-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    bottom: 15px;
    right: 15px;
  }
  
  .cleanifiq-open-btn .chat-icon {
    width: 28px;
    height: 28px;
  }
}

/* Cloudy tooltip for introducing the chatbot */
.cleanifiq-intro-tooltip {
  position: absolute;
  bottom: 75px;
  right: 10px;
  width: 250px;
  background-color: white;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  z-index: 9998;
  animation: float 3s ease-in-out infinite;
  border: 1px solid rgba(255, 120, 16, 0.3);
  overflow: visible;
}

.cleanifiq-intro-tooltip::before {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 30px;
  width: 20px;
  height: 20px;
  background-color: white;
  transform: rotate(45deg);
  border-right: 1px solid rgba(255, 120, 16, 0.3);
  border-bottom: 1px solid rgba(255, 120, 16, 0.3);
}

.cleanifiq-intro-tooltip h4 {
  margin: 0 0 10px;
  color: #FF7810;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(to right, #FF7810, #E9B21E);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cleanifiq-intro-tooltip p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

.cleanifiq-intro-tooltip .close-tooltip {
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 24px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  opacity: 0.85;
  transition: all 0.2s;
  z-index: 10;
  border-radius: 50%;
}

.cleanifiq-intro-tooltip .close-tooltip:hover {
  opacity: 1;
  color: #FF7810;
  background-color: rgba(255, 120, 16, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-7px);
  }
  100% {
    transform: translateY(0px);
  }
}

.cleanifiq-intro-tooltip .sparkle {
  position: absolute;
  width: 20px;
  height: 20px;
  z-index: 1;
}

.cleanifiq-intro-tooltip .sparkle-1 {
  top: -10px;
  left: 30px;
  animation: sparkle 2s ease-in-out infinite;
}

.cleanifiq-intro-tooltip .sparkle-2 {
  bottom: 10px;
  left: -5px;
  animation: sparkle 2.3s ease-in-out infinite;
}

.cleanifiq-intro-tooltip .sparkle-3 {
  top: 10px;
  right: 30px;
  animation: sparkle 1.7s ease-in-out infinite;
}

@keyframes sparkle {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2) rotate(30deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }
}

/* Bootstrap-style modal backdrop */
#popupForm, #chatbotPopup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

/* Form and Chat Modal Styling - Bootstrap style with clean separation */
.cleanifiq-chat-modal {
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 100%;
  margin: 30px auto;
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: 700px;
  min-height: 400px;
}

/* Modal header positioning for buttons */
.cleanifiq-modal-header {
  position: relative;
  padding: 15px;
  border-bottom: 1px solid #e5e7eb;
}

/* Gradient header styling for both popups */
.cleanifiq-gradient-header {
  background: linear-gradient(to right, #FF7810, #E9B21E);
  color: white;
  padding: 16px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}

.cleanifiq-gradient-header .header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 5;
  max-width: calc(100% - 40px);
}

.cleanifiq-gradient-header .header-content h2 {
  margin-bottom: 2px;
  font-weight: 600;
}

.cleanifiq-gradient-header .header-content p {
  font-size: 0.75rem;
  opacity: 0.85;
  transition: opacity 0.3s ease;
  margin: 0;
}

/* Close button positioning - right side */
.cleanifiq-btn-close {
  font-size: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 10;
  color: white;
}

/* Minimize button and clear session icon styles merged for consistency */
#minimizeChatbot,
#clearSessionIcon {
  font-size: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 10;
  color: white;
}

/* Hover effects */
.cleanifiq-btn-close:hover,
#minimizeChatbot:hover,
#clearSessionIcon:hover {
  opacity: 1;
}

/* Header actions container - position all action buttons */
.header-actions {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
}

/* Ensure buttons have consistent height */
.header-actions button,
.header-actions div {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Specific styling for popupForm - first popup */
#popupForm .cleanifiq-chat-modal {
  padding: 0;
  background: white;
  max-width: 500px;
  overflow: hidden;
  height: auto;
}

/* Position the close button in the gradient header */
#popupForm .cleanifiq-gradient-header .cleanifiq-btn-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

#popupForm .cleanifiq-modal-content {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
}

#popupForm h1 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.35rem;
}

#popupForm p {
  color: #666;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

#popupForm label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
  display: block;
  margin-bottom: 0.25rem;
}

#popupForm textarea,
#popupForm input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 0.3s;
}

#popupForm textarea:focus,
#popupForm input:focus {
  outline: none;
  border-color: #FF7810;
  box-shadow: 0 0 0 2px rgba(255, 120, 16, 0.2);
}

#popupForm textarea {
  height: auto;
  min-height: 80px;
  resize: none;
  line-height: 1.4;
}

@media (min-width: 768px) {
  #popupForm textarea {
    min-height: 90px;
  }
}

@media (max-width: 767px) {
  #popupForm textarea {
    min-height: 70px;
    font-size: 0.8rem;
  }
}

#popupForm #getQuotesButton {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(to right, #FF7810, #E9B21E);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(255, 120, 16, 0.2);
  margin-top: 8px;
}

#popupForm #getQuotesButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 120, 16, 0.3);
}

/* Specific styling for chatbotPopup - 75% screen modal */
#chatbotPopup .cleanifiq-chat-modal {
  display: flex;
  flex-direction: column;
  height: 85vh;
  max-height: 85vh;
  max-width: 85%;
  width: 85%;
  margin: auto;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  padding: 0;
}

/* Chatbot Header */
.cleanifiq-chat-header {
  background: linear-gradient(to right, #FF7810, #E9B21E);
  padding: 8px 12px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative;
  min-height: 40px;
  order: 0;
}

.cleanifiq-chat-header .header-content {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  max-width: calc(100% - 100px);
  position: relative;
  z-index: 5;
}

.cleanifiq-chat-header .header-content h2 {
  margin-bottom: 0;
  font-weight: 600;
  font-size: 16px;
}

.cleanifiq-chat-header .header-content p {
  font-size: 0.65rem;
  opacity: 0.85;
  margin: 0;
}

.cleanifiq-chat-header img.w-10.h-10 {
  width: 24px !important;
  height: 24px !important;
}

/* Bot and user avatars */
.bot-avatar, .user-avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-avatar img, .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Price range row styling */
.w-full.bg-gray-50.flex.items-center.justify-between {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.w-full.bg-gray-50.flex.items-center.justify-between a {
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: #f9fafb;
  border-radius: 18px;
  border: 1px solid #eeeeee;
  margin-right: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.w-full.bg-gray-50.flex.items-center.justify-between a:hover {
  opacity: 0.9;
  background-color: #f5f5f5;
}

.w-full.bg-gray-50.flex.items-center.justify-between .price-range-text {
  font-size: 10px;
  color: #666;
  margin-left: 8px;
}

/* View all cleaners link styling */
#cleanerLink {
  display: none;
  color: #333;
  font-weight: 500;
  padding: 6px 12px;
  background-color: #f9fafb;
  border-radius: 18px;
  border: 1px solid #eeeeee;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#cleanerLink::after {
  content: "";
}

#cleanerLink:hover {
  background-color: #f0f0f0;
  text-decoration: none;
}

/* Date chooser link styling */
.date-chooser-link {
  color: #333;
  font-weight: 500;
  padding: 6px 12px;
  background-color: #f9fafb;
  border-radius: 18px;
  border: 1px solid #eeeeee;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.date-chooser-link:hover {
  background-color: #f0f0f0;
  text-decoration: none;
}

/* Icons in badges */
.w-full.bg-gray-50.flex.items-center.justify-between a i {
  margin-left: 5px;
}

/* Show price range row when cleaners are available */
.cleanifiq-swiper-container.has-cleaners,
.cleanifiq-swiper-container.has-cleaners ~ .w-full.bg-gray-50.flex.items-center.justify-between {
  display: flex;
}

/* Swiper container in chat - HIDDEN BY DEFAULT */
.cleanifiq-swiper-container {
  background-color: #f8f9fa;
  order: 2;
  border-bottom: 1px solid #e5e7eb;
  overflow: hidden;
  padding: 8px 10px;
  display: none !important; /* Force hidden by default */
  width: 100%;
}

/* Only show when it has the has-cleaners class AND display is set to block */
.cleanifiq-swiper-container.has-cleaners[style*="display: block"] {
  display: block !important;
}

.cleaner-slider-wrapper {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.swiper-container {
  width: 100%;
  height: 175px !important;
  overflow: visible;
}

.swiper-wrapper {
  align-items: center;
}

.swiper-slide {
  max-width: 280px;
  height: 175px !important;
  transition: all 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
}

/* Ensure slide content is no taller than 175px */
.swiper-slide > div {
  max-height: 175px;
}

/* Badge styling for cleaner cards */
.badge-sm {
  font-size: 7px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

/* Badge colors */
.bg-orange-500 {
  background-color: #FF7810;
}

.bg-green-500 {
  background-color: #99CF29;
}

.bg-blue-400 {
  background-color: #57B4F7;
}

.bg-purple-100 {
  background-color: #ffffff;
  border: 1px solid #CC4ADD;
  color: #CC4ADD;
}

.text-purple-700 {
  color: #CC4ADD;
}

/* Full cost and deposit price boxes */
.swiper-slide .bg-green-500 {
  background-color: #99CF29;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 6px;
  padding: 4px;
  font-size: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.swiper-slide .bg-gray-100 {
  background-color: #E8F4D2;
  color: #333;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 6px;
  padding: 4px;
  font-size: 10px;
  border: 1px solid #D9EAB8;
}

/* View/Book button styling for compact size */
.swiper-slide a.bg-\[\#F7BA57\] {
  background-color: #F7BA57;
  font-weight: 600;
  padding: 4px 12px;
  font-size: 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.swiper-slide a.bg-\[\#F7BA57\]:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Card styles */
.swiper-slide .rounded-lg {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Rating display styling */
.swiper-slide .text-yellow-500 {
  color: #F7BA57;
  font-weight: 700;
}

/* Swiper slide card tweaks */
.swiper-slide .p-3 {
  padding: 12px;
}

/* Badge spacing and alignment */
.swiper-slide .flex-wrap.gap-1 {
  gap: 4px;
}

/* Service badges in cleaner cards */
.badge-sm.bg-blue-400 {
  background-color: #3B9EF3;
  padding: 2px 6px;
}

.badge-sm.bg-purple-100 {
  background-color: #f3e8ff;
  color: #7e22ce;
  border-color: #e9d5ff;
  padding: 2px 6px;
}

.badge-sm.bg-gray-100.text-gray-700 {
  background-color: #f3f4f6;
  color: #4b5563;
  padding: 2px 6px;
}

/* Swiper navigation buttons */
.swiper-prev-btn,
.swiper-next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: white;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.swiper-prev-btn {
  left: 2px;
}

.swiper-next-btn {
  right: 2px;
}

.swiper-prev-btn:hover,
.swiper-next-btn:hover {
  background-color: #f8f9fa;
}

.swiper-prev-btn.disabled,
.swiper-next-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Progress bar section - with important flags to override any conflicting styles */
.cleanifiq-progress-container {
  background-color: #f0f4f8;
  display: flex;
  align-items: center;
  order: 3;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 8px 16px !important;
  box-sizing: border-box !important;
  position: relative;
}

/* Progress bar container - make sure it takes up all available space */
.progress-bar-container {
  flex-grow: 1 !important;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 8px;
  box-sizing: border-box;
  width: calc(100% - 30px) !important;
}

/* Progress bar itself */
.progress-bar {
  height: 100%;
  background: linear-gradient(to right, #FF7810, #E9B21E);
  border-radius: 4px;
  transition: width 0.5s ease;
  max-width: 100%;
}

#percentage {
  font-size: 10px;
  color: #4b5563;
  min-width: 28px;
}

/* Price range styling */
#priceRange {
  font-size: 10px;
  color: #4b5563;
  font-weight: 500;
}

/* Chat message area */
.cleanifiq-messages {
  display: flex;
  flex-direction: column;
  padding: 12px;
  overflow-y: auto;
  background-color: #f8f9fa;
  scrollbar-width: thin;
  scrollbar-color: #f97316 #e5e7eb;
  order: 4;
  flex: 1;
  min-height: 100px;
}

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

.cleanifiq-messages::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 10px;
}

.cleanifiq-messages::-webkit-scrollbar-thumb {
  background-color: #f97316;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
}

.cleanifiq-messages p {
  margin: 0;
  line-height: 1.4;
}

/* Chat message containers */
.chat-message {
  display: flex;
  width: 100%;
  margin-bottom: 10px;
}

.user-message {
  justify-content: flex-end;
}

.bot-message {
  justify-content: flex-start;
}

/* Width adjustment for chat bubbles */
.chat-message > div {
  width: 100%;
  display: flex;
}

.user-message > div {
  justify-content: flex-end;
}

.bot-message > div {
  justify-content: flex-start;
}

/* Chat Input */
.cleanifiq-chat-input {
  padding: 8px 12px;
  border-top: 1px solid #e5e7eb;
  background: white;
  order: 5;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  position: sticky;
  bottom: 0;
  width: 100%;
  margin-top: auto;
}

.cleanifiq-chat-input form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cleanifiq-chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.cleanifiq-chat-input input:focus {
  border-color: #FF7810;
}

.cleanifiq-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: linear-gradient(to right, #FF7810, #E9B21E);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cleanifiq-send-btn:hover {
  transform: scale(1.05);
}

.cleanifiq-send-btn:disabled {
  background: #e5e7eb;
  cursor: not-allowed;
}

/* View all cleaners button */
.view-book-btn {
  background: linear-gradient(to right, #FF7810, #E9B21E);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.view-book-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Loaders */
.loader {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

.loaderCleaner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #F7BA57;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Chat conversation bubbles */
.bot-bubble, .user-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  margin: 3px 0;
  max-width: 80%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: min-height 0.3s ease; /* Smooth height transitions */
  min-height: 40px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Enhance typing effect for bot messages */
.bot-bubble p {
  white-space: pre-wrap; /* Preserve whitespace and allow wrapping */
  min-height: 20px; /* Ensure minimum height even when empty */
}

/* Add a blinking cursor effect to the AI typing */
.bot-bubble p.typing::after {
  content: '|';
  display: inline-block;
  opacity: 1;
  animation: cursor-blink 0.7s infinite;
  font-weight: normal;
  color: #333;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Add these styles after the cursor-blink animation */

/* Typing dots span styling */
.typing-dots {
  display: inline-block;
  min-width: 18px;
  font-weight: normal;
  letter-spacing: 2px;
  opacity: 0.8;
}

/* Special styling for the rotating thinking messages */
.bot-bubble p.typing {
  font-weight: 500;
  color: #4a5568;
  transition: color 0.3s ease;
}

/* Add a subtle fade-in transition for the messages */
@keyframes message-fade-in {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Apply the fade-in animation to new messages */
.bot-bubble p.typing {
  animation: message-fade-in 0.5s ease;
}

.bot-bubble {
  background-color: #f0f4ff;
  color: #333;
  border-top-left-radius: 4px;
  margin-left: 6px;
}

.user-bubble {
  background-color: #FF7810;
  color: white;
  border-top-right-radius: 4px;
  margin-right: 6px;
}

/* Style for quick replies/suggestions */
.user-quick-reply {
  display: inline-block;
  background-color: #FF7810;
  color: white;
  border-radius: 20px;
  padding: 8px 16px;
  margin: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-quick-reply:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Media queries for better mobile responsiveness */
@media (max-width: 767px) {
  .cleanifiq-chat-modal {
    max-width: 100%;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 8px;
  }
  
  #chatbotPopup .cleanifiq-chat-modal {
    height: auto;
    max-height: 100vh;
    border-radius: 8px;
  }
  
  #popupForm .cleanifiq-chat-modal {
    height: auto;
    max-height: 100vh;
    border-radius: 8px;
  }
  
  .cleanifiq-chat-header {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }
  
  .cleanifiq-chat-input {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }
  
  #popupForm .cleanifiq-modal-content {
    padding: 16px;
    max-height: calc(100vh - 60px);
  }
  
  #popupForm textarea {
    height: 100px;
  }
  
  #popupForm label {
    font-size: 0.8rem;
  }
  
  #popupForm textarea,
  #popupForm input {
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
  }
  
  #contactFeedback {
    font-size: 11px;
  }
  
  #contactFeedback > div {
    padding: 4px !important;
  }
  
  .swiper-slide {
    max-width: 100% !important;
    height: 140px;
  }
  
  .cleanifiq-open-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    bottom: 15px;
    right: 15px;
  }
  
  .cleanifiq-open-btn .chat-icon {
    width: 28px;
    height: 28px;
  }
  
  #popupForm h1 {
    font-size: 1.25rem;
  }
  
  .cleanifiq-swiper-container {
    max-height: 180px;
  }
  
  /* Prevent auto-zoom on input focus for iOS */
  input[type="text"],
  textarea {
    font-size: 16px !important;
  }
  
  /* Fix for cleaner cards disappearing on scroll */
  .cleanifiq-swiper-container {
    position: relative !important;
    z-index: 5;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
  }
  
  /* Ensure the swiper slides stay visible */
  .swiper-slide {
    z-index: 1;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
  }
  
  /* Fix for chat container to maintain position */
  #chatbotPopup .cleanifiq-chat-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    transform: none !important;
    overflow: hidden !important;
  }
  
  /* Fix for message container to prevent jumping */
  .cleanifiq-messages {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    position: relative !important;
  }
  
  /* Fix for chat input to stay at bottom */
  .cleanifiq-chat-input {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    background-color: white !important;
  }
}

/* Prevent viewport issues on mobile */
@media screen and (max-width: 767px) {
  body.chatbot-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  
  /* Force GPU acceleration on key elements to prevent flicker */
  .cleanifiq-chat-modal,
  .cleanifiq-messages,
  .cleanifiq-swiper-container,
  .swiper-container,
  .swiper-wrapper,
  .swiper-slide {
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #chatbotPopup .cleanifiq-chat-modal {
    max-width: 85%;
    width: 85%;
  }
}

/* Price range badge styling */
.price-range-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: #f9fafb;
  border-radius: 18px;
  border: 1px solid #eeeeee;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.price-range-badge:hover {
  background-color: #f5f5f5;
}

.w-full.bg-gray-50.flex.items-center.justify-between .price-range-text {
  font-size: 10px;
  color: #666;
  margin-left: 8px;
}

/* Form progress bar styling */
.form-progress-container {
  position: relative;
  width: 100%;
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.form-progress-bar {
  height: 100%;
  background: linear-gradient(to right, #FF7810, #E9B21E);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

.form-progress-text {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* Contact fields container */
.contact-fields-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

@media (min-width: 768px) {
  .contact-fields-container {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
  }
  
  .contact-fields-container .field-container {
    flex: 1;
    min-width: 0;
  }
  
  .contact-fields-container .contact-divider {
    flex: 0 0 auto;
  }
}

/* OR divider styling */
.contact-divider {
  display: flex;
  align-items: center;
  margin: 5px 0;
  width: 100%;
}

.contact-divider .line {
  flex-grow: 1;
  height: 1px;
  background-color: #e5e7eb;
}

.contact-divider .text {
  padding: 0 10px;
  color: #6b7280;
  font-weight: 500;
  font-size: 12px;
}

@media (min-width: 768px) {
  .contact-divider {
    margin: 0;
    width: auto;
    padding: 0 4px;
  }
  
  .contact-divider span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
  }
}

/* Form validation styling */
#popupForm input.border-red-500,
#popupForm textarea.border-red-500 {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

#popupForm input.border-green-500,
#popupForm textarea.border-green-500 {
  border-color: #10b981 !important;
  background-color: #f0fdf4 !important;
}

#formMessage {
  font-size: 0.875rem;
  padding: 0.75rem;
  border-radius: 0.375rem;
}

#formMessage.bg-red-100 {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

#formMessage.bg-green-100 {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

/* Contact feedback styling - prevent 3D expansion effect */
#contactFeedback {
  transition: opacity 0.2s ease;
  transform: none !important;
  backface-visibility: hidden;
  perspective: none;
  will-change: opacity;
  overflow: hidden;
  max-height: 36px;
  font-size: 12px;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  text-align: right;
}

#contactFeedback > div {
  box-shadow: none !important;
  transform: none !important;
  transition: opacity 0.2s ease !important;
  border: none;
  padding: 4px 2px !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background-color: transparent !important;
  font-weight: 500;
}

/* Green for both contacts provided */
#contactFeedback div.both-contacts {
  color: #10b981 !important;
}

/* Gray for single contact */
#contactFeedback div.single-contact {
  color: #6b7280 !important;
}

/* Ensure thumbs up emoji is visible */
#contactFeedback .ml-auto {
  font-size: 14px !important;
  margin-left: 6px;
}

/* Submit button styling - gray when disabled */
#getQuotesButton {
  transition: all 0.3s ease;
}

#getQuotesButton:disabled {
  background: #94a3b8 !important; /* Slate-400 as gray */
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
  background-image: none !important;
}

/* Error message styling */
.error-bubble {
  background-color: #fee2e2 !important;
  border-top-left-radius: 4px;
  color: #b91c1c !important;
}

.error-bubble p {
  font-weight: 500;
}

#popupForm input[type="email"],
#popupForm input[type="tel"] {
  width: 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .contact-fields-container .field-container {
    flex: 1;
    min-width: 0;
  }
  
  .contact-fields-container .contact-divider {
    flex: 0 0 auto;
  }
}

/* Date picker modal styling - Scoped with cleanifiq-date-picker class to prevent conflicts with Bootstrap datepickers */
.cleanifiq-date-picker .date-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.cleanifiq-date-picker .date-picker-container {
  background: white;
  border-radius: 8px;
  width: 320px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.cleanifiq-date-picker .date-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(to right, #FF7810, #E9B21E);
  color: white;
}

.cleanifiq-date-picker .date-picker-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.cleanifiq-date-picker .date-picker-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.cleanifiq-date-picker .date-picker-close:hover {
  opacity: 1;
}

.cleanifiq-date-picker .date-picker-body {
  padding: 12px;
}

.cleanifiq-date-picker .date-picker-calendar {
  width: 100%;
}

.cleanifiq-date-picker .date-picker-month-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cleanifiq-date-picker .date-picker-month-title {
  font-weight: 600;
  color: #4b5563;
}

.cleanifiq-date-picker .date-picker-month-nav {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
}

.cleanifiq-date-picker .date-picker-month-nav:hover:not(.disabled) {
  background-color: #f3f4f6;
  color: #374151;
}

.cleanifiq-date-picker .date-picker-month-nav.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cleanifiq-date-picker .date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.cleanifiq-date-picker .day-header {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  padding: 4px 0;
}

.cleanifiq-date-picker .date-picker-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cleanifiq-date-picker .day {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  color: #4b5563;
}

.cleanifiq-date-picker .day:hover:not(.disabled):not(.other-month) {
  background-color: #f3f4f6;
}

.cleanifiq-date-picker .day.selected {
  background: linear-gradient(to right, #FF7810, #E9B21E);
  color: white;
  font-weight: 500;
}

.cleanifiq-date-picker .day.other-month {
  color: #d1d5db;
  cursor: default;
}

.cleanifiq-date-picker .day.disabled {
  color: #d1d5db;
  text-decoration: line-through;
  cursor: not-allowed;
  opacity: 0.5;
}

.cleanifiq-date-picker .date-picker-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  gap: 8px;
}

.cleanifiq-date-picker .date-picker-cancel,
.cleanifiq-date-picker .date-picker-apply {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.cleanifiq-date-picker .date-picker-cancel {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.cleanifiq-date-picker .date-picker-apply {
  background: linear-gradient(to right, #FF7810, #E9B21E);
  color: white;
  border: none;
}

.cleanifiq-date-picker .date-picker-cancel:hover {
  background-color: #e5e7eb;
}

.cleanifiq-date-picker .date-picker-apply:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Hidden class should be more specific */
.cleanifiq-date-picker .hidden {
  display: none !important;
}

/* Placeholder typing effect styles */
::placeholder {
  transition: none !important;
  color: #6b7280 !important;
}

/* Description textarea with higher quality placeholder */
#description::placeholder {
  color: #6b7280 !important;
  opacity: 0.9 !important;
  font-style: italic;
  font-size: 0.85rem;
}

/* Ensure the description field has enough height to display the typing effect properly */
#popupForm textarea#description {
  min-height: 90px;
  transition: border-color 0.3s;
  line-height: 1.5;
}

.ai-disclaimer{display:flex;align-items:center;font-size:10px;color:#6b7280;gap:4px;line-height:1.3}.ai-disclaimer i{color:#FF7810;font-size:11px}.ai-disclaimer span{font-weight:500;opacity:.8}

