/**
 * Gravity Form modal (triggered by .faulkner-gf-modal-trigger)
 */

body.faulkner-gf-modal-open {
  overflow: hidden;
}

.faulkner-gf-modal[hidden] {
  display: none !important;
}

.faulkner-gf-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.faulkner-gf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.faulkner-gf-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  max-height: min(90vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  -webkit-overflow-scrolling: touch;
}

.faulkner-gf-modal__body {
  padding: 1.75rem 1.5rem 1.5rem;
}

/* Let the form use full panel width (GF + flex can otherwise collapse). */
.faulkner-gf-modal__body .gform_wrapper,
.faulkner-gf-modal__body .gform_anchor {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.faulkner-gf-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.faulkner-gf-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

/* Trigger inside nav should behave like other menu links */
.faulkner-gf-modal-trigger {
  cursor: pointer;
}

@media (max-width: 480px) {
  .faulkner-gf-modal {
    padding: 0;
    align-items: stretch;
  }

  .faulkner-gf-modal__panel {
    max-width: 90%;
    max-height: 80vh;
    height: 100%;
    border-radius: 0;
    margin-top: 10vh;
  }

  .faulkner-gf-modal__body {
    padding: 2.75rem 1rem 1.25rem;
  }
}
