.hpm-proxy {
  color: #374151;
  font-family: inherit;
  margin: 0 auto;
  max-width: 760px;
  width: 100%;
}

.hpm-proxy * {
  box-sizing: border-box;
}

.hpm-proxy-form {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 28px;
}

.hpm-proxy h2 {
  color: #374151;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 22px;
}

.hpm-legal-copy {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
  padding-bottom: 20px;
}

.hpm-legal-copy p {
  font-size: 16px;
  line-height: 1.75;
  margin: 0;
}

.hpm-inline-field {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 4px 8px;
  min-width: 210px;
  vertical-align: baseline;
}

.hpm-inline-field span,
.hpm-proxy-form label > span,
.hpm-signature-fieldset legend {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.hpm-proxy-form input[type='text'],
.hpm-proxy-form input[type='email'] {
  background: #fff;
  border: 1px solid #9ca3af;
  border-radius: 4px;
  color: #111827;
  font: inherit;
  min-height: 44px;
  padding: 9px 10px;
  width: 100%;
}

.hpm-proxy-form input:focus,
.hpm-signature-canvas:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
  outline: none;
}

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

.hpm-proxy-form > label,
.hpm-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.hpm-signature-fieldset {
  border: 0;
  margin: 10px 0 18px;
  padding: 0;
}

.hpm-help {
  color: #4b5563;
  font-size: 14px;
  margin: 6px 0 10px;
}

.hpm-signature-shell {
  background: #fff;
  border: 1px solid #9ca3af;
  border-radius: 4px;
  padding: 8px;
}

.hpm-signature-canvas {
  background: #fff;
  display: block;
  height: 240px;
  touch-action: none;
  width: 100%;
}

.hpm-signature-canvas-error {
  border: 2px solid #b91c1c;
}

.hpm-signature-actions {
  margin-top: 10px;
}

.hpm-button-secondary,
.hpm-submit {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 16px;
}

.hpm-button-secondary {
  background: #e5e7eb;
  color: #111827;
}

.hpm-submit {
  background: #1d4ed8;
  color: #fff;
  width: 100%;
}

.hpm-consent {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  margin: 18px 0;
}

.hpm-consent input {
  margin-top: 4px;
}

.hpm-notice {
  border-radius: 6px;
  margin: 0 0 16px;
  padding: 12px 14px;
}

.hpm-notice p {
  margin: 0 0 8px;
}

.hpm-notice ul {
  margin: 0;
  padding-left: 18px;
}

.hpm-notice-success {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #064e3b;
}

.hpm-notice-error {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #7f1d1d;
}

.hpm-honeypot {
  left: -9999px;
  position: absolute;
}

.hpm-confirmation-modal[hidden] {
  display: none;
}

.hpm-confirmation-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 9999;
}

.hpm-confirmation-backdrop {
  background: rgba(17, 24, 39, 0.55);
  inset: 0;
  position: absolute;
}

.hpm-confirmation-dialog {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.24);
  max-width: 460px;
  padding: 26px;
  position: relative;
  width: min(100%, 460px);
}

.hpm-confirmation-dialog h2 {
  color: #111827;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 12px;
}

.hpm-confirmation-dialog p {
  color: #374151;
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 16px;
}

@media (max-width: 640px) {
  .hpm-proxy-form {
    padding: 20px;
  }

  .hpm-proxy h2 {
    font-size: 24px;
  }

  .hpm-grid {
    grid-template-columns: 1fr;
  }

  .hpm-inline-field {
    display: flex;
    margin: 10px 0;
    min-width: 0;
    width: 100%;
  }

  .hpm-signature-canvas {
    height: 210px;
  }
}

/* HPM_PROXY_PAGE_TEMPLATE: full-width proxy page shell. */
.hpm-proxy-page-template {
  background: #fff;
  padding: 72px 24px 96px;
  width: 100%;
}

.hpm-proxy-page__inner {
  margin: 0 auto;
  max-width: 1040px;
  width: 100%;
}

.hpm-proxy-page__header {
  margin: 0 auto 24px;
  max-width: 880px;
}

.hpm-proxy-page__header h1 {
  color: #374151;
  font-size: 40px;
  line-height: 1.15;
  margin: 0;
}

.hpm-proxy-page__content .hpm-proxy {
  max-width: 880px;
}

@media (max-width: 640px) {
  .hpm-proxy-page-template {
    padding: 40px 16px 64px;
  }

  .hpm-proxy-page__header h1 {
    font-size: 32px;
  }
}
