/* ==================== VISIBLE FORM FIELD DESCRIPTIONS ==================== */
.wpm-field-desc {
  display: block;
  margin: 6px 0 0;
  font-size: 0.9em;
  font-weight: normal;
  line-height: 1.5;
  color: #536170;
  white-space: normal;
  overflow-wrap: anywhere;
}

tr[data-wpm-field-group] > td:first-child,
form tr > td:first-child:not(:has(input, select, textarea)):has(+ td:last-child :is(input, select, textarea)) {
  vertical-align: top !important;
  font-weight: 700;
}

.wpm-field-label,
.form-group > label,
.form-group > .control-label {
  font-weight: 700;
}

td.wpm-field-label,
th.wpm-field-label {
  vertical-align: top !important;
  white-space: normal !important;
}

tr[data-wpm-field-group] > td > .wpm-field-desc,
tr[data-wpm-field-group] > th > .wpm-field-desc,
td > .wpm-table-cell > .wpm-field-desc {
  min-width: 16rem;
}

tr[data-wpm-field-group] > td {
  white-space: normal;
}

[data-wpm-contrast="high-dark"] .wpm-field-desc,
[data-wpm-contrast="high-light"] .wpm-field-desc {
  color: inherit;
}

/* Preserve the configured frontend panel text color on light and dark themes. */
#wp-main-content .wpm-field-desc {
  color: inherit;
}

/* ==================== SEARCH HELP ON DARK BACKGROUNDS ==================== */
.header-search-wrap .wpm-field-desc,
.navbar-side .wpm-field-desc,
.wpm-search-hero .wpm-field-desc {
  color: #e2e8f0;
}

.navbar-side .wpm-field-desc {
  margin: 0 15px 10px;
}

form td > label:has(input[aria-describedby]),
form td > .form-inline > label:has(input[aria-describedby]) {
  font-weight: 700 !important;
}
