.site-contact-form {
  --contact-text: #1a1c1b;
  --contact-accent: #181f21;
  --contact-focus-ring: rgba(24, 31, 33, .16);
  --contact-drag-bg: rgba(24, 31, 33, .06);
  align-content: start;
  display: grid;
  gap: clamp(18px, 2vw, 24px);
}

.site-contact-form .contact-form-grid {
  display: grid;
  gap: clamp(12px, 1.45vw, 18px);
  grid-template-columns: minmax(0, 1fr);
}

.contact-form-field {
  display: block;
  min-width: 0;
  margin: 0;
}

.contact-error-popover {
  position: absolute;
  z-index: 1200;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid rgba(180, 35, 24, .52);
  color: #9f2017;
  background: #fff;
  box-shadow: 0 3px 10px rgba(2, 10, 10, .08);
  font-family: inherit;
  font-size: var(--contact-small-size, 14px);
  font-weight: 400;
  line-height: 1.3;
  pointer-events: none;
}

.contact-error-popover::before {
  position: absolute;
  top: -5px;
  left: 13px;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(180, 35, 24, .52);
  border-left: 1px solid rgba(180, 35, 24, .52);
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.contact-form-field > span,
.contact-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-contact-form .contact-control:not([type="file"]):not([type="checkbox"]) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid rgba(2, 10, 10, 0.36);
  border-radius: 0;
  outline: 0;
  color: var(--contact-text, #111);
  background: #fff;
  font: inherit;
  font-size: var(--contact-body-size, 16px);
  font-weight: 300;
  line-height: 1.2;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.site-contact-form textarea.contact-control {
  min-height: 104px;
  resize: vertical;
}

.site-contact-form .contact-control:not([type="file"]):not([type="checkbox"]):focus {
  border-color: var(--contact-accent, #ed7444);
  box-shadow: 0 0 0 2px var(--contact-focus-ring, rgba(237, 116, 68, .2));
}

.site-contact-form .contact-control.is-invalid:not([type="file"]):not([type="checkbox"]) {
  border-color: #b42318;
  background: #fff8f7;
  box-shadow: 0 0 0 1px rgba(180, 35, 24, .15);
}

.contact-dropzone {
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid rgba(2, 10, 10, .36);
  color: var(--contact-text, #111);
  background: rgba(255, 255, 255, .58);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

.contact-dropzone:hover,
.contact-dropzone:focus-within,
.contact-dropzone.is-dragging {
  border-color: var(--contact-accent, #ed7444);
  background: var(--contact-drag-bg, rgba(237, 116, 68, .1));
}

.contact-dropzone:has(.is-invalid) {
  border-color: #b42318;
  background: #fff8f7;
}

.contact-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-dropzone-icon {
  width: 30px;
  height: 30px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 16V7.83L8.41 10.41 7 9l5-5 5 5-1.41 1.41L13 7.83V16h-2Zm-5 4c-.55 0-1.02-.2-1.41-.59C4.2 19.02 4 18.55 4 18v-3h2v3h12v-3h2v3c0 .55-.2 1.02-.59 1.41-.39.39-.86.59-1.41.59H6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 16V7.83L8.41 10.41 7 9l5-5 5 5-1.41 1.41L13 7.83V16h-2Zm-5 4c-.55 0-1.02-.2-1.41-.59C4.2 19.02 4 18.55 4 18v-3h2v3h12v-3h2v3c0 .55-.2 1.02-.59 1.41-.39.39-.86.59-1.41.59H6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.contact-dropzone strong {
  font-size: var(--contact-body-size, 16px);
  font-weight: 600;
}

.contact-dropzone small {
  max-width: 440px;
  color: rgba(2, 10, 10, .66);
  font-size: var(--contact-small-size, 14px);
  font-weight: 300;
  line-height: 1.35;
}

.contact-file-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.contact-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(2, 10, 10, .24);
  font-size: var(--contact-small-size, 14px);
}

.contact-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-file-remove {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.contact-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--contact-text, #111);
  font-size: var(--contact-small-size, 14px);
  font-weight: 300;
  line-height: 1.4;
  cursor: pointer;
}

.contact-consent input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  padding: 0;
  margin: 0;
  border-radius: 0;
  accent-color: var(--contact-accent, #ed7444);
  cursor: pointer;
}

.contact-consent a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.site-contact-form .contact-status-message {
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid currentColor;
  font-family: inherit;
  font-size: var(--contact-small-size, 14px);
  font-weight: 400;
  line-height: 1.35;
}

.site-contact-form .contact-status-message--success { color: #176b3a; background: #f2faf5; }
.site-contact-form .contact-status-message--failure { color: #9f2017; background: #fff8f7; }

.site-contact-form .contact-submit {
  width: min(100%, 420px);
  justify-self: center;
  margin-top: 0;
}
