.local-contact-popup {
  background: rgba(0, 0, 0, 0.58);
  box-sizing: border-box;
  display: none;
  inset: 0;
  overflow-y: auto;
  padding: 40px 18px;
  position: fixed;
  z-index: 2147483647;
}

.local-contact-popup.is-open {
  align-items: center;
  display: flex;
  justify-content: center;
}

.local-contact-popup__panel {
  background: #ffffff;
  border-radius: 28px;
  box-sizing: border-box;
  color: #1a1855;
  font-family: Arial, Helvetica, sans-serif;
  max-width: 660px;
  padding: 58px 64px 52px;
  position: relative;
  width: min(100%, 660px);
}

.local-contact-popup__close {
  align-items: center;
  background: rgba(147, 135, 246, 0.1);
  border: 1px solid rgba(147, 135, 246, 0.3);
  border-radius: 999px;
  color: #1a1855;
  cursor: pointer;
  display: flex;
  font-size: 32px;
  height: 42px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 22px;
  top: 20px;
  width: 42px;
}

.local-contact-popup__title {
  color: #9387f6;
  font-size: clamp(40px, 7vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 38px;
  text-align: center;
}

.local-contact-popup__form {
  display: grid;
  gap: 18px 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.local-contact-popup__field {
  display: grid;
  gap: 8px;
}

.local-contact-popup__field--full {
  grid-column: 1 / -1;
}

.local-contact-popup__field label {
  color: #1a1855;
  font-size: 15px;
  line-height: 1.3;
}

.local-contact-popup__field input,
.local-contact-popup__field textarea {
  background: #f7f6ff;
  border: 1px solid rgba(147, 135, 246, 0.55);
  border-radius: 999px;
  box-sizing: border-box;
  color: #1a1855;
  font: 16px/1.4 Arial, Helvetica, sans-serif;
  height: 46px;
  min-height: 46px;
  outline: 0;
  padding: 11px 18px;
  width: 100%;
}

.local-contact-popup__field input:focus,
.local-contact-popup__field textarea:focus {
  background: #ffffff;
  border-color: #9387f6;
  box-shadow: 0 0 0 3px rgba(147, 135, 246, 0.18);
}

.local-contact-popup__field textarea {
  border-radius: 22px;
  height: 120px;
  min-height: 120px;
  padding-top: 14px;
  resize: vertical;
}

.local-contact-popup__submit {
  background: #9387f6;
  border: 1px solid #9387f6;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font: 700 17px/1.2 Arial, Helvetica, sans-serif;
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 150px;
  padding: 15px 38px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.local-contact-popup__submit:hover {
  background: #1a1855;
  border-color: #1a1855;
  transform: translateY(-1px);
}

.local-contact-popup__success {
  background: rgba(147, 135, 246, 0.12);
  border: 1px solid rgba(147, 135, 246, 0.35);
  border-radius: 18px;
  color: #1a1855;
  display: none;
  font-size: 15px;
  font-weight: 700;
  grid-column: 1 / -1;
  line-height: 1.4;
  margin: 2px 0 0;
  padding: 12px 14px;
  text-align: center;
}

.local-contact-popup__success.is-visible {
  display: block !important;
}

.local-contact-popup.has-success .local-contact-popup__success {
  display: block !important;
}

body.local-contact-popup-open {
  overflow: hidden !important;
}

.local-contact-toast {
  background: #ffffff;
  border: 1px solid rgba(147, 135, 246, 0.55);
  border-radius: 999px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  color: #1a1855;
  display: none;
  font: 700 16px/1.35 Arial, Helvetica, sans-serif;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 15px 22px;
  position: fixed;
  text-align: center;
  top: 22px;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px));
  z-index: 2147483647;
}

.local-contact-toast.is-visible {
  display: block !important;
}

@media (max-width: 640px) {
  .local-contact-popup {
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
    height: 100dvh;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    padding: max(12px, env(safe-area-inset-top)) 10px max(96px, calc(env(safe-area-inset-bottom) + 96px));
  }

  .local-contact-popup.is-open {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .local-contact-popup__panel {
    border-radius: 22px;
    margin: 0 auto;
    max-width: 100%;
    min-height: auto;
    padding: 44px 20px max(112px, calc(env(safe-area-inset-bottom) + 112px));
    width: min(100%, 430px);
  }

  .local-contact-popup__close {
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    position: fixed;
    right: 16px;
    top: max(12px, env(safe-area-inset-top));
    z-index: 2147483647;
  }

  .local-contact-popup__title {
    font-size: clamp(38px, 13vw, 54px);
    line-height: 1;
    margin-bottom: 26px;
  }

  .local-contact-popup__form {
    grid-template-columns: 1fr;
  }

  .local-contact-popup__field input,
  .local-contact-popup__field textarea {
    font-size: 16px;
  }

  .local-contact-popup__field input {
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
  }

  .local-contact-popup__field textarea {
    height: 138px !important;
    min-height: 138px !important;
    max-height: 138px !important;
  }

  .local-contact-popup__submit {
    margin-bottom: 18px;
    max-width: 100%;
    min-height: 54px;
    width: min(230px, 100%);
  }
}
