/* Floating WhatsApp + scroll-top — one aligned column */
.mse-float-stack {
  --mse-float-size: 56px;
  --mse-float-gap: 14px;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: var(--mse-float-gap);
  width: var(--mse-float-size);
  pointer-events: none;
}

.mse-float-stack .wa-float-btn,
.mse-float-stack .scroll-top {
  pointer-events: auto;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: var(--mse-float-size) !important;
  height: var(--mse-float-size) !important;
  margin: 0 !important;
  flex: 0 0 var(--mse-float-size);
  isolation: isolate;
}

.mse-float-stack .scroll-top,
.mse-float-stack .scroll-top.active {
  animation: none !important;
}

.mse-float-stack .scroll-top {
  transform: scale(0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.mse-float-stack .scroll-top.active {
  transform: scale(1);
}

/* Floating WhatsApp + lead popup (MSE) */
.wa-float-btn {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 10050;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.36);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wa-float-btn i,
.wa-float-btn__icon {
  font-size: 28px;
  line-height: 1;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.wa-float-btn:hover,
.wa-float-btn:focus {
  background: #1ebe57;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.42);
  color: #fff;
  outline: none;
}

.mse-float-stack .wa-float-btn:hover,
.mse-float-stack .wa-float-btn:focus {
  transform: translateY(-2px);
}

.wa-float-btn__label {
  display: none;
}

.wa-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 14, 20, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.wa-popup-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wa-popup-container {
  position: relative;
  width: min(100%, 440px);
  max-height: min(92vh, 680px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}

.wa-popup-overlay.show .wa-popup-container {
  transform: translateY(0) scale(1);
}

.wa-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #333;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.wa-popup-close:hover {
  background: #e5e7eb;
}

.wa-popup-header {
  padding: 28px 24px 8px;
  text-align: center;
}

.wa-popup-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #e8f8ee;
  color: #25d366;
  display: grid;
  place-items: center;
  font-size: 28px;
}

.wa-popup-header h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  font-family: "Montserrat", sans-serif;
}

.wa-popup-header p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #666;
}

.wa-popup-body {
  padding: 16px 24px 8px;
}

.wa-form-group {
  margin-bottom: 14px;
}

.wa-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #222;
}

.wa-form-group label span:not(.optional) {
  color: #d9281d;
}

.wa-form-group .optional {
  color: #888;
  font-weight: 500;
}

.wa-form-group input,
.wa-form-group textarea {
  width: 100%;
  border: 1px solid #d9dde3;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #111;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wa-form-group input:focus,
.wa-form-group textarea:focus {
  outline: none;
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}

.wa-form-group textarea {
  resize: vertical;
  min-height: 96px;
}

.wa-form-alert {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.wa-form-alert--error {
  background: #fdecea;
  color: #b42318;
}

.wa-form-alert--success {
  background: #e8f8ee;
  color: #067647;
}

.wa-popup-footer {
  padding: 8px 24px 24px;
}

.wa-submit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wa-submit-btn:hover:not(:disabled),
.wa-submit-btn:focus:not(:disabled) {
  background: #1ebe57;
  color: #fff;
  outline: none;
}

.wa-submit-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.wa-submit-btn i {
  font-size: 20px;
}

@media (max-width: 575px) {
  .mse-float-stack {
    --mse-float-size: 52px;
    --mse-float-gap: 12px;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .wa-float-btn {
    right: 14px;
    bottom: 78px;
  }

  .wa-popup-container {
    border-radius: 14px;
  }

  .wa-popup-header,
  .wa-popup-body,
  .wa-popup-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
