@import url('//fonts.googleapis.com/css2?family=Inter:opsz@14..32&display=swap');

/* Regular Whatsapp Chat Button */

.rq-whatsapp-chat-container {
  position: fixed;
  z-index: 1000;
}

.rq-whatsapp-chat-container a, #whatsapp-icon-label {
  display: inline;
  font-size: 0.26em !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  text-decoration: none;
}

.rq-whatsapp-chat-container span {
  line-height: normal;
  padding: 0.34em 1em;
  border-radius: 32px;
  /* font-weight: bolder; */
}

.align-right {
  right: 15px;
}

.align-left {
  left: 15px;
}

.row-reverse {
  flex-direction: row-reverse;
}

.bounce {
  animation: bounce-animation 2s infinite;
}

.shake {
  animation: shake-animation 3s ease infinite;
}

.rq-whatsapp-chat-container div:has(svg) {
  position: relative;
  display: inline-block;
}

.rq-whatsapp-chat-container svg {
  display: block;
}

/* When Contact form is enabled, the whatsapp-icon-label id div is present,
which should not get the pulse effect. */

.pulse div:has(svg):not(#whatsapp-icon-label)::before {
  content: "";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 50%;
  background-color: var(--pulse-color, #68d549); 
  animation: pulse-animation 2s ease-out infinite;
  z-index: -2;
}

.pulse div:has(svg):not(#whatsapp-icon-label)::after {
  content: "";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 50%;
  background-color: var(--pulse-color, #68d549); 
  animation: pulse-animation 2s 0.35s ease-out infinite;
  z-index: -1;
}


@keyframes bounce-animation {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes shake-animation {
  0% {
    transform: translate(0, 0);
  }
  1.78571% {
    transform: translate(7px, 0);
  }
  5.57143% {
    transform: translate(0, 0);
  }
  7.35714% {
    transform: translate(7px, 0);
  }
  9.14286% {
    transform: translate(0, 0);
  }
  10.92857% {
    transform: translate(7px, 0);
  }
  12.71429% {
    transform: translate(0, 0);
  }
  14.92857% {
    transform: translate(7px, 0);
  }
  16.71429% {
    transform: translate(0, 0);
  }
  18.92857% {
    transform: translate(7px, 0);
  }
  20.71429% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes pulse-animation {
  from {
    opacity: 1;
    transform: scale3d(0.75, 0.75, 1);
  }

  to {
    opacity: 0;
    transform: scale3d(2, 2, 1);
  }
}

/* Contact Form Enabled Whatsapp Chat Button */

:root {
  --chat-primary: #68d549;
  --chat-hover: #128C7E;
  --chat-text: #333333;
  --chat-bg: #ffffff;
  --chat-border-radius: 1em;
  --chat-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  --chat-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --chat-font: 'Inter', sans-serif;
  --chat-title-size: 1.5em;
  --chat-subtitle-size: 1.125em;
}

#closeChat {
  display: none;
  background: transparent;
  border: none;
  color: var(--chat-bg);
  font-size: var(--chat-subtitle-size);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: var(--chat-transition);
}

/* WhatsApp Floating Button */
.whatsapp-container {
  position: fixed;
  z-index: 1000;
  font-family: var(--chat-font);
}

.whatsapp-button {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* .whatsapp-button:hover {
  transform: scale(1.05);
} */

.whatsapp-button .close-icon {
  display:none;
  justify-content: center;
  align-items: center;
}

.whatsapp-button.active .whatsapp-icon {
  display:none;
}

.whatsapp-button.active .close-icon {
  display:flex;
}

/* Chat Box (Contact Form Window) */
.whatsapp-chatbox {
  position: fixed;
  width: 23.75em;
  max-height: calc(100% - 11em);
  background: white;
  border-radius: var(--chat-border-radius);
  box-shadow: var(--chat-shadow);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: var(--chat-transition);
  z-index: 999;
  line-height: normal !important;
  letter-spacing: normal !important;
  overflow:auto;
}

.whatsapp-chatbox.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.whatsapp-chatbox.closing {
  width: 3.75em;
  height: 3.75em;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.7);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* .chat-header {
  background: var(--chat-primary);
  color: var(--chat-bg);
  padding: 15px 20px;
  border-radius: var(--chat-border-radius) var(--chat-border-radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
} */

.chat-header button {
  background: none;
  border: none;
  font-size: 20px;
  color: white;
  cursor: pointer;
}

.chat-content {
  padding: 15px 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease-out;
  transition-delay: 0.15s;
}

.whatsapp-chatbox.open .chat-content {
  opacity: 1;
  transform: translateY(0);
}

.chat-section {
  display: none;
}

.chat-section.active {
  display: block;
}


/* Contact Form Section */

/* Form Styling */

#contact-form-title {
  font-size: var(--chat-title-size);
  display: inline-flex;
  padding-bottom: 0.125em !important;
}

.wave-emoji {
  font-size: 1em;
  line-height: 1;
}

#contact-form-subtitle {
  font-size: var(--chat-subtitle-size);
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Form Styling */
#contactForm {
  display: flex;
  flex-direction: column;
  gap: 1.5625em;
  margin: 0;
}

/* Labels */
#contactForm label {
  display: block;
  color: var(--chat-text);
  font-size: 1em;
  margin-bottom: 0.4375em;
  margin-left: 0.0625em;
  letter-spacing: normal !important;
}

/* Input Fields */
#contactForm input {
  height: 3.4375em;
  width: 100%;
  padding: 15px 18px;
  border: 1px solid #A3A3A3;
  border-radius: 8px;
  font-size: var(--chat-subtitle-size);
  box-shadow: none !important;
  font-size: 16px;
}

/* Checkbox Container */
.checkbox-container {
  display: flex;
  font-size: 1em;
  align-items: center;
}

/* Simple Checkbox Styling */
.custom-checkbox {
  appearance: none;
  padding: 0 !important;
  background-color: #ffffff;
  display: inline;
  width: 20px !important;
  height: 20px !important;
  border: 1px solid #000;
  cursor: pointer;
  border-radius: 5px !important;
}

.custom-checkbox:checked::after{
  content: "✔";
  font-size: 1em;
  color: white;
}


.checkbox-container label{
  margin-bottom: 0px !important;
  margin-left: 2px !important;
}

#contactForm div input.invalid{
  border: 1px solid red !important;
  box-shadow: 0 0 5px rgba(231, 76, 60, 0.8) !important;
}

.impFormInputs{
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
}

#rq-contact-form-btn:disabled, button[disabled]:hover {
  border: 1px solid #999 !important;
  background-color: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
  opacity: 0.7;
}

#rq-contact-form-btn strong {
  font-size: 1.25em;
}

/* Responsive Adjustments */
@media (max-width: 400px) {
  #contactForm {
    max-width: 100%;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {

  .whatsapp-chatbox {
    transform-origin: bottom right;
    transform: scale(1);
    border-radius: 0;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    min-height: 100%;
    bottom: 0;
    right: 0;
  }
  
  .whatsapp-chatbox.open {
    border-radius: 0;
    transform: scale(1);
  }
  
  .whatsapp-chatbox.closing {
    transform: scale(1);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  
  /* Adjust content animation for mobile */
  .chat-content {
    transform: translateY(20px);
    transition: all 0.3s ease-out;
    transition-delay: 0.2s;
  }
  
  .whatsapp-chatbox.open .chat-content {
    transform: translateY(0);
  }

  /* Smooth border radius transition */
  .chat-header {
    border-radius: var(--chat-border-radius) var(--chat-border-radius) 0 0;
    transition: border-radius 0.35s ease;
  }

  .whatsapp-chatbox.open .chat-header {
    border-radius: 0;
  }

  #closeChat {
    display:block;
    font-size: 1.5625em;
  }

  #contactForm {
    max-width: 100%; /* Full width on mobile */
  }
}