/* Contact modal — shared */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.contact-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  padding: 40px 40px 36px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}
.contact-modal.is-open .contact-modal__dialog {
  transform: translateY(0) scale(1);
}
.contact-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #9a9a9a;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.contact-modal__close:hover {
  color: #333;
  background: #f3f3f3;
}
.contact-modal__title {
  margin: 0 0 28px;
  text-align: center;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 700;
  color: #000;
}
.contact-modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-modal__field {
  margin-bottom: 18px;
}
.contact-modal__field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.2;
  color: #6b6b6b;
}
.contact-modal__field input,
.contact-modal__field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #f7f5fb;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  color: #111;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-modal__field textarea {
  min-height: 140px;
  resize: vertical;
}
.contact-modal__field input:focus,
.contact-modal__field textarea:focus {
  border-color: #983FFF;
  box-shadow: 0 0 0 3px rgba(152, 63, 255, 0.15);
}
.contact-modal__field input.is-invalid,
.contact-modal__field textarea.is-invalid {
  border-color: #e25555;
}
.contact-modal__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.contact-modal__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 10px;
  background: #983FFF;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.contact-modal__submit:hover { opacity: 0.9; }
.contact-modal__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}
.contact-modal__success {
  display: none;
  text-align: center;
  padding: 24px 8px 8px;
}
.contact-modal__success.is-visible { display: block; }
.contact-modal__form.is-hidden { display: none; }
.contact-modal__success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 9999px;
  background: rgba(152, 63, 255, 0.12);
  color: #983FFF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-modal__success h3 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
}
.contact-modal__success p {
  margin: 0 0 28px;
  color: #747474;
  font-size: 16px;
  line-height: 1.5;
}
.contact-modal__done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background-image: linear-gradient(90deg, #A140FF 0%, #5E34FF 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.contact-modal__done:hover { opacity: 0.9; }

@media (max-width: 639px) {
  .contact-modal__dialog {
    padding: 28px 20px 24px;
  }
  .contact-modal__title {
    font-size: 32px;
    margin-bottom: 22px;
  }
  .contact-modal__row {
    grid-template-columns: 1fr;
  }
}

body.contact-modal-open {
  overflow: hidden;
}
