/*
 * Legacy form presentation (public-facing claygate_* pages).
 *
 * These pages are built from fixed-pixel tables (width="800", cellpadding,
 * bgcolor) written for the pre-Bootstrap template. Several of them share their
 * markup with mPDF or email generators, which genuinely need those attributes,
 * so the attributes stay in the PHP and are overridden here for the browser
 * only.
 *
 * Apply .legacy-form to the container wrapping the form markup.
 */

.legacy-form table {
  width: 100% !important;
  max-width: 900px;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.legacy-form td,
.legacy-form th {
  padding: .45rem .6rem;
  vertical-align: top;
  background: transparent !important;   /* kills the inherited grey bgcolor */
  border: 0;
}

/* the label column in these forms is a <td align=right> or a fixed-width <td> */
.legacy-form td[align=right],
.legacy-form td[width="155"],
.legacy-form td[width="175"] {
  color: #566a7f;
  font-weight: 500;
  width: 260px;
}

.legacy-form tr:not(:last-child) td {
  border-bottom: 1px solid #f0f1f3;
}

.legacy-form h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 .75rem;
}

.legacy-form h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid #e4e6e8;
}

.legacy-form h2:first-child,
.legacy-form h3:first-child {
  margin-top: 0;
}

.legacy-form p { margin-bottom: .5rem; }

.legacy-form input[type=text],
.legacy-form input[type=email],
.legacy-form input[type=tel],
.legacy-form input[type=number],
.legacy-form input[type=password],
.legacy-form input[type=date],
.legacy-form select,
.legacy-form textarea {
  border: 1px solid #d9dee3;
  border-radius: .375rem;
  padding: .35rem .65rem;
  width: 100%;
  max-width: 420px;
  font-size: .9375rem;
  line-height: 1.5;
  color: #566a7f;
  background-color: #fff;
}

.legacy-form input[type=text]:focus,
.legacy-form input[type=email]:focus,
.legacy-form input[type=tel]:focus,
.legacy-form input[type=number]:focus,
.legacy-form select:focus,
.legacy-form textarea:focus {
  border-color: #696cff;
  outline: 0;
  box-shadow: 0 0 .25rem .05rem rgba(105,108,255,.1);
}

.legacy-form input[type=checkbox],
.legacy-form input[type=radio] {
  width: auto;
  max-width: none;
}

/* the old stylesheet's required-field marker */
.legacy-form .req { color: #b4231f; }  /* was #ff3e1d (3.4:1), now 6.6:1 */

/* Phones: stack the label above its field instead of holding a 260px
   label column against a 375px viewport. */
@media (max-width: 575.98px) {
  .legacy-form td[align=right],
  .legacy-form td[width="155"],
  .legacy-form td[width="175"] {
    width: auto;
    display: block;
    padding-bottom: .1rem;
  }
  .legacy-form td[align=right] + td,
  .legacy-form td[width="155"] + td,
  .legacy-form td[width="175"] + td {
    display: block;
    padding-top: 0;
  }
  .legacy-form input[type=text],
  .legacy-form input[type=email],
  .legacy-form input[type=tel],
  .legacy-form input[type=number],
  .legacy-form select,
  .legacy-form textarea {
    max-width: 100%;
  }
  .legacy-form table { margin-bottom: .5rem; }
}
