.contact-form-dialog {
  width: min(720px, calc(100vw - 28px));
  max-width: 720px;
  max-height: min(92vh, 860px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 22px;
  color: #18212c;
  background: transparent;
}

.contact-form-dialog::backdrop {
  background: rgb(8 14 22 / 66%);
  backdrop-filter: blur(4px);
}

.contact-form-card {
  position: relative;
  max-height: min(92vh, 860px);
  overflow: auto;
  padding: 34px clamp(22px, 5vw, 48px) 40px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 90px rgb(0 0 0 / 30%);
}

.contact-form-close {
  position: absolute;
  top: 14px;
  right: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.contact-form-close:hover { color: #0f766e; background: #e6f4f1; }
.contact-form-close:focus-visible,
.contact-form-fields :focus-visible {
  outline: 3px solid #2b9d83;
  outline-offset: 2px;
}

.contact-form-header { padding-right: 34px; margin-bottom: 24px; }
.contact-form-header h2 { margin: 0 0 8px; color: #14232e; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; }
.contact-form-header p { margin: 0; color: #52616d; font-size: 0.96rem; line-height: 1.5; }

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form-field { display: grid; min-width: 0; gap: 7px; }
.contact-form-field[hidden] { display: none; }
.contact-form-field--wide { grid-column: 1 / -1; }
.contact-form-field label { color: #263641; font-size: 0.88rem; font-weight: 650; }
.contact-form-field input,
.contact-form-field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd5df;
  border-radius: 9px;
  color: #18212c;
  background: #fff;
  font: inherit;
}

.contact-form-field input:hover,
.contact-form-field select:hover { border-color: #8a9aa8; }
.contact-form-status { min-height: 1.4em; margin: 14px 0 0; font-size: 0.9rem; line-height: 1.4; }
.contact-form-status.is-error { color: #b42318; }
.contact-form-status.is-success { color: #126b54; }
.contact-form-submit {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 11px 22px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #116e72;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-form-submit:hover { background: #0e5d61; }
.contact-form-submit:disabled { cursor: wait; opacity: 0.7; }
.contact-form-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.footer-contact-trigger {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.footer-contact-trigger:hover { text-decoration: underline; }

@media (max-width: 620px) {
  .contact-form-dialog { width: calc(100vw - 20px); max-height: 94vh; }
  .contact-form-card { max-height: 94vh; padding: 28px 18px 24px; border-radius: 16px; }
  .contact-form-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .contact-form-field--wide { grid-column: auto; }
  .contact-form-submit { width: 100%; }
}
