/* Sfondo opaco: il sito dietro non si vede */
#pf-form-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(20, 20, 20, 0.55);
  padding: 20px;
}

#pf-form-overlay .pf-form-wrapper {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 500px;
  height: 850px;
  max-height: 90vh;
  background: transparent;
  box-shadow: none;
}

#pf-form-overlay iframe {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  border-radius: 24px;
  overflow: hidden;
  background: transparent;
  color-scheme: light;
}

#pf-form-overlay .pf-form-close {
  position: absolute;
  top: 22px;
  right: 28px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  box-shadow: none;
  color: #fbf4e8;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

html.pf-form-open,
body.pf-form-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  #pf-form-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  #pf-form-overlay .pf-form-wrapper {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }

  #pf-form-overlay iframe {
    border-radius: 0;
  }

  #pf-form-overlay .pf-form-close {
    top: 14px;
    right: 16px;
    font-size: 28px;
  }
}
