.tpf-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 30px;
  row-gap: 0;
  max-width: 100%;
}

.tpf-form .tpf-field {
  min-width: 0;
  margin-bottom: 18px;
}

.tpf-form .tpf-field:nth-child(n + 5) {
  grid-column: 1 / -1;
}

.tpf-form label {
  display: block;
  margin-bottom: 5px;
  color: #33475b;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.tpf-form input,
.tpf-form select,
.tpf-form textarea {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid #cbd6e2;
  border-radius: 3px;
  background: #f5f8fa;
  color: #33475b;
  font: 16px/22px Arial, Helvetica, sans-serif;
}

.tpf-form input[type="checkbox"] {
  display: inline-block;
  width: auto;
  height: auto;
  margin-right: 8px;
}

.tpf-form input,
.tpf-form select {
  height: 40px;
}

.tpf-form textarea {
  min-height: 100px;
  resize: vertical;
}

.tpf-form input:focus,
.tpf-form select:focus,
.tpf-form textarea:focus {
  outline: 2px solid rgba(82, 168, 236, .45);
  outline-offset: 1px;
}

.tpf-form [aria-invalid="true"] {
  border-color: #c87872;
}

.tpf-field-error {
  display: block;
  min-height: 18px;
  margin-top: 3px;
  color: #c0392b;
  font-size: 12px;
  line-height: 18px;
}

.tpf-status {
  grid-column: 1 / -1;
  min-height: 24px;
  margin: 4px 0 12px;
  color: #33475b;
  font-size: 14px;
}

.tpf-recaptcha {
  grid-column: 1 / -1;
  min-height: 0;
  margin-bottom: 12px;
}

.tpf-status-error {
  color: #c0392b;
}

.tpf-status-loading {
  color: #33475b;
}

.tpf-honeypot {
  position: absolute;
  top: auto;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.tpf-form > button[type="submit"] {
  justify-self: start;
  min-width: 103px;
  min-height: 43px;
  padding: 10px 24px;
}

@media (max-width: 767px) {
  .tpf-form {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .tpf-form .tpf-field:nth-child(n + 5) {
    grid-column: auto;
  }

  .tpf-form .tpf-field {
    margin-bottom: 16px;
  }

  .tpf-form > button[type="submit"] {
    width: 100%;
    max-width: 180px;
  }
}

/* nice-select: igualar al resto de campos */
.tpf-form .nice-select {
  float: none;
  display: block;
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 9px 30px 9px 10px;
  border: 1px solid #cbd6e2;
  border-radius: 3px;
  background: #f5f8fa;
  color: #33475b;
  font: 16px/22px Arial, Helvetica, sans-serif;
}

.tpf-form .nice-select .current {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tpf-form .nice-select .list {
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
}

/* Foco visible, igual que los inputs */
.tpf-form .nice-select:focus,
.tpf-form .nice-select.open {
  outline: 2px solid rgba(82, 168, 236, .45);
  outline-offset: 1px;
}

/* Borde de error: el aria-invalid queda en el select oculto */
.tpf-form select[aria-invalid="true"] + .nice-select {
  border-color: #c87872;
}

.tpf-form .nice-select .current {
  font: 16px/20px Arial, Helvetica, sans-serif;
  color: #33475b;
}