/* WhatsApp button ABOVE chat gif */
.whatsapp-float-button {
    position: fixed;
    bottom: 177px; /* 70px button + 15px gap */
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.whatsapp-float-button img {
    width: 100%;
    height: auto;
}

.whatsapp-float-button:hover {
    transform: scale(1.1);
}
@media (max-width:768px){
    .chat-float-button{
        width:60px;
        height:60px;
        bottom:148px;
        right:15px;
    }

    .whatsapp-float-button{
        width:50px;
        height:50px;
        bottom:128px;
        right:15px;
    }
}

/* ===========================
   FLOATING CHAT BUTTON
   =========================== */

.chat-float-button {
  position: fixed;
  bottom: -1px;
  right: 3px;
  width: auto;
  height: auto;
  max-width: 106px;
  max-height: 155px;
  border-radius: 0;
  background: transparent !important;
  color: white;
  border: none;
  box-shadow: none;
   display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
   padding: 0;
  overflow: visible;
}

.chat-button-gif {
  width: 286px;
  height: 200px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}



.chat-float-button.hide {
  display: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(14, 64, 65, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(14, 64, 65, 0.7);
  }
  100% {
    box-shadow: 0 4px 20px rgba(14, 64, 65, 0.4);
  }
}

/* ===========================
   CHAT WINDOW
   =========================== */

.chat-window {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(95vh - 140px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

.chat-window.show {
  display: flex;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   CHAT HEADER
   =========================== */

.chat-header {
  background: #0e4041;
  color: white;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.chat-header h5 {
    color:white;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.header-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.new-chat-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s ease;
  line-height: 1;
  white-space: nowrap;
}

.new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.2s ease;
  line-height: 1;
  padding: 0;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===========================
   CHAT BODY
   =========================== */

.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.chat-body::-webkit-scrollbar {
  width: 6px;
}

.chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* ===========================
   MESSAGE BUBBLES
   =========================== */

.chat-message {
  display: flex;
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease-in;
  flex-shrink: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.bot {
  justify-content: flex-start;
}

.chat-message.user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 11px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message.bot .message-bubble {
  background: white;
  color: #2d3748;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chat-message.user .message-bubble {
  background: #0e4041;
  color: white;
  border-bottom-right-radius: 4px;
}

/* ===========================
   OPTION BUTTONS
   =========================== */

.chat-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease-in;
  flex-shrink: 0;
}

.option-group-label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-btn {
  padding: 10px 18px;
  border-radius: 20px;
  border: 2px solid #0e4041;
  background: white;
  color: #0e4041;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-btn:hover {
  background: #0e4041;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 64, 65, 0.3);
}

/* ===========================
   FLOOR PLAN CARD
   =========================== */

.floor-plan-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: -20px;
  animation: fadeIn 0.3s ease-in;
  flex-shrink: 0;
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f8f9fa;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.floor-plan-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 250px;
  display: block;
  object-fit: contain;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(14, 64, 65, 0.8);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  line-height: 1;
  padding: 0;
}

.carousel-btn:hover {
  background: rgba(14, 64, 65, 1);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: #0e4041;
  width: 24px;
  border-radius: 4px;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.floor-plan-content {
  padding: 16px;
}

.floor-plan-text {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 14px;
  line-height: 1.6;
}

.floor-plan-btn {
  width: 100%;
  padding: 12px;
  background: #0e4041;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floor-plan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 64, 65, 0.4);
}

/* ===========================
   CONTACT FORM
   =========================== */

.chat-form {
  background: white;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 6px;
  animation: fadeIn 0.3s ease-in;
  flex-shrink: 0;
}
.chat-form .form-header {
  font-size: 13px;
  font-weight: 700;
  color: #0e4041;
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
  line-height: 1.3;
}
.chat-form .mb-3 {
  margin-bottom: 6px;
}

.chat-form .form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 3px;
  letter-spacing: 0.2px;
}

.chat-form .form-control {
  width: 100%;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e0;
  background: #f8f9fa;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: 'Sthira',sans-serif;
}

.chat-form .form-control:focus {
  border-color: #0e4041;
  background: white;
  box-shadow: 0 0 0 3px rgba(14, 64, 65, 0.1);
  outline: none;
}

.chat-form .form-control::placeholder {
  color: #a0aec0;
}

.chat-form textarea.form-control {
  resize: none;
  min-height: 32px;
  max-height: 50px;
  line-height: 1.4;
}

.chat-form .submit-btn {
  width: 100%;
  padding: 8px;
  background: #0e4041;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(14, 64, 65, 0.2);
}

.chat-form .submit-btn:hover {
  background: #0a3031;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 64, 65, 0.3);
}

.chat-form .submit-btn:active {
  transform: translateY(0);
}

.chat-form .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-success-message {
  background: #d4edda;
  color: #155724;
  padding: 14px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid #c3e6cb;
  text-align: center;
  animation: fadeIn 0.5s ease-in;
}

/* ===========================
   RESPONSIVE
   =========================== */

/* Large screens (desktops) */
@media (min-width: 1200px) {
  .chat-button-gif {
    width: 286px;
    height: 200px;
  }
}

/* Medium screens (tablets landscape) */
@media (max-width: 992px) {
  .chat-button-gif {
    width: 260px;
    height: 182px;
  }

  .chat-window {
    width: 360px;
    height: 550px;
  }
}

/* Small tablets and large phones */
@media (max-width: 768px) {
  .chat-button-gif {
    width: 220px;
    height: 154px;
  }

  .chat-window {
    width: 340px;
    height: 500px;
  }
}

/* Mobile phones */
@media (max-width: 576px) {
  .chat-window {
    bottom: 20px;
    right: 10px;
    width: calc(100vw - 20px);
    height: calc(100vh - 200px);
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 200px);
    border-radius: 16px;
  }

  .chat-header {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }

  .chat-button-gif {
    width: 180px;
    height: 126px;
  }

  .message-bubble {
    max-width: 85%;
  }
}

/* Extra small phones */
@media (max-width: 400px) {
  .chat-button-gif {
    width: 67px;
    height: 98px;
  }
}

/* ===========================
   PHONE LINK
   =========================== */

.phone-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.phone-link:hover {
  text-decoration: underline;
}
