/* Floating Contact Widget */
.contact-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  font-family: inherit;
}

.contact-widget-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1f6feb;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-widget-button:hover,
.contact-widget-button:focus {
  background: #1659c7;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  outline: none;
}

.contact-widget-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-widget-text {
  white-space: nowrap;
}

/* Modal Overlay */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.68);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.contact-modal-overlay.is-open {
  display: flex;
}

/* Modal Box */
.contact-modal {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow: hidden;
  background: #ffffff;
  color: #1f2937;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  animation: contactModalIn 0.22s ease-out;
}

@keyframes contactModalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Close Button */
.contact-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #111827;
  font-size: 28px;
  line-height: 34px;
  cursor: pointer;
  z-index: 2;
}

.contact-modal-close:hover,
.contact-modal-close:focus {
  background: #e5e7eb;
  outline: none;
}

/* Modal Header */
.contact-modal-header {
  padding: 28px 58px 18px 28px;
  border-bottom: 1px solid #e5e7eb;
}

.contact-modal-header h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  color: #111827;
}

.contact-modal-header p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #4b5563;
}

/* Modal Body */
.contact-modal-body {
  padding: 22px 28px 28px;
  max-height: calc(90vh - 125px);
  overflow-y: auto;
}

/* Optional placeholder styling */
.formsite-placeholder {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  color: #6b7280;
  text-align: center;
  padding: 24px;
}

/* Make embedded Formsite iframe behave nicely */
.contact-modal-body iframe {
  width: 100%;
  max-width: 100%;
  border: none;
  display: block;
}

/* Mobile */
@media (max-width: 640px) {
  .contact-widget {
    right: 16px;
    bottom: 16px;
  }

  .contact-widget-button {
    padding: 14px 16px;
    border-radius: 999px;
  }

  .contact-widget-text {
    display: none;
  }

  .contact-modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .contact-modal {
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .contact-modal-header {
    padding: 24px 54px 16px 22px;
  }

  .contact-modal-header h2 {
    font-size: 21px;
  }

  .contact-modal-body {
    padding: 18px 22px 24px;
    max-height: calc(92vh - 120px);
  }
}