/* ===== Contact modal ===== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, .55);
  padding: 20px;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fffdf7;
  border-radius: 14px;
  padding: 24px 22px 22px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
  animation: modalFadeIn .25s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .06);
  color: #222;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.close:hover {
  background: rgba(0, 0, 0, .1);
}

.modal-content h2 {
  margin: 0 44px 16px 0;
  color: #2d2d2d;
  font-size: 24px;
  font-weight: 600;
}

.modal-intro {
  margin: -6px 0 16px;
  color: rgba(0, 0, 0, .62);
  font-size: 14px;
  line-height: 1.45;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 9px;
  background: #fff;
  outline: none;
}

.modal-content input:focus,
.modal-content textarea:focus {
  border-color: rgba(0, 0, 0, .48);
}

.modal-content textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-or {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0, 0, 0, .48);
  letter-spacing: .08em;
  margin: 0;
}

.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 6px 0 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #555;
}

.form-consent input {
  width: auto;
  margin-top: 3px;
  flex: 0 0 auto;
}

.form-consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-error {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff1f1;
  color: #8b1e1e;
  font-size: 13px;
  line-height: 1.4;
}

.form-error.is-visible {
  display: block;
}

.modal-content button[type="submit"] {
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #222;
  cursor: pointer;
  transition: background .2s ease;
}

.modal-content button[type="submit"]:hover {
  background: #000;
}

.form-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(0, 0, 0, .55);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .modal {
    padding: 12px;
    align-items: flex-start;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: none;
    margin: 70px auto 20px;
    padding: 18px 14px;
    border-radius: 12px;
  }

  .modal-content h2 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .modal-intro {
    font-size: 13px;
  }

  .modal-content textarea {
    min-height: 110px;
  }

  .close {
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    font-size: 28px;
  }
}

@media (max-width: 360px) {
  .modal-content {
    margin-top: 60px;
  }
}