/* ==========================================================================
   Data Collection Popup Modal & Floating WhatsApp Styles
   ========================================================================== */

/* Popup Overlay */
.data-collect-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(6, 50, 49, 0.75); /* Matches --ht-theme-color (#063231) with transparency */
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  overflow-y: auto;
  padding: 20px 10px;
}

.data-collect-overlay.show {
  opacity: 1;
}

/* Popup Modal Box */
.data-collect-modal {
  background: #ffffff;
  width: 90%;
  max-width: 480px;
  border-radius: 20px;
  padding: 40px 30px 30px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.data-collect-overlay.show .data-collect-modal {
  transform: scale(1);
}

/* Close Button */
.data-collect-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 30px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  outline: none;
}

.data-collect-close:hover {
  color: var(--ht-theme-color-2, #F75709);
}

/* Logo & Header */
.data-collect-header {
  text-align: center;
  margin-bottom: 25px;
}

.popup-logo {
  height: 45px;
  margin-bottom: 12px;
}

.data-collect-header h3 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ht-theme-color, #063231);
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 8px;
}

.data-collect-header p {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #555;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

/* Form Styling */
#dataCollectForm .form-group {
  margin-bottom: 16px;
}

#dataCollectForm input, 
#dataCollectForm select, 
#dataCollectForm textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e1e7e7;
  border-radius: 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #fafbfc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

#dataCollectForm input:focus, 
#dataCollectForm select:focus, 
#dataCollectForm textarea:focus {
  border-color: var(--ht-theme-color-2, #F75709);
  box-shadow: 0 0 0 3px rgba(247, 87, 9, 0.15);
  background-color: #fff;
}

/* Nice-Select UI conflict prevention */
#dataCollectForm select.popup-select {
  display: block !important;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

#dataCollectForm .nice-select {
  display: none !important;
}

#dataCollectForm textarea {
  resize: none;
}

/* Error Message */
.popup-error {
  background-color: #ffeef0;
  border-left: 4px solid #f85149;
  color: #c93b35;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: left;
}

/* Submit Button */
.popup-submit-btn {
  width: 100%;
  padding: 14px 20px;
  background-color: var(--ht-theme-color-2, #F75709);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  outline: none;
}

.popup-submit-btn:hover {
  background-color: #d94b05;
}

.popup-submit-btn:active {
  transform: scale(0.98);
}

.popup-submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Success Container Styling */
.popup-success-container {
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.4s ease;
}

.success-icon-wrapper {
  margin-bottom: 20px;
}

.success-checkmark {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #25d366;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #25d366;
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  margin: 0 auto;
}

.success-checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #25d366;
  fill: none;
  animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #25d366;
  stroke-width: 3;
  animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes fill {
  100% {
    box-shadow: inset 0px 0px 0px 35px rgba(37, 211, 102, 0.1);
  }
}

.popup-success-container h4 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ht-theme-color, #063231);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
}

.popup-success-container p {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Floating WhatsApp Button Styling */
.whatsapp-float {
  position: fixed;
  width: 50px;
  height: 50px;
  bottom: 95px;
  right: 30px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #25d366;
  opacity: 0.6;
  z-index: -1;
  animation: pulse-wa 2s infinite;
}

@keyframes pulse-wa {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.whatsapp-float i {
  font-size: 24px;
  color: #ffffff;
  transition: transform 0.3s;
}

.whatsapp-float:hover {
  background-color: #20ba5a;
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.whatsapp-float:hover i {
  transform: rotate(10deg);
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
  .data-collect-modal {
    padding: 30px 20px 20px;
    border-radius: 16px;
    width: 95%;
  }
  .data-collect-header h3 {
    font-size: 20px;
  }
  .popup-submit-btn {
    padding: 12px 16px;
    font-size: 15px;
  }
}

@media (max-height: 600px) {
  .data-collect-overlay {
    align-items: flex-start;
  }
  .data-collect-modal {
    margin-top: 20px;
    margin-bottom: 20px;
  }
}
