/* stylesheet for participants-database plugin */

[class|="pdb"] .helptext {
  display: inline-block;
  margin: 0 5px;
}
[class|="pdb"] .checkbox .helptext {
  display: inline;
}
[class|="pdb"] .selectother + .helptext {
  display: block;
}
.readonly-element .helptext {
  display: none;
}
.readonly-element.show-help .helptext {
  display: inherit;
}
.textarea {
  white-space: pre-wrap;
}

/* SIGNUP FORM */

/*.pdb-signup label {
  display:inline-block;
  width:135px;
  margin-right:10px;
  text-align:right;
}*/
.pdb-signup .helptext {
  display:block;
  margin-left:150px;
}
.pdb-signup td .helptext {
  margin-left:0px;
}
.pdb-signup .checkbox .helptext {
  display: inline-block;
}
.pdb-signup .math-captcha {
  display: inline-block;
  margin-right: 12px
}
.pdb-signup .control-group {
  margin-top: 1em;
}


/* RECORD FORM */
.form-group {
  margin: 0 0 1.5em 0;
}
.form-group p {
  margin: 0;
}
.edit-participant textarea,
.participants_db textarea,
.edit-participant select,
.participants_db select,
.participants_db input,
.edit-participant input,
.link-element label {
  margin: 0 2px 0 0;
  /*  vertical-align: middle;*/
}
.selectother label.pdb-selection-prompt, 
label.pdb-selection-prompt {
  display: block;
}
.participants_db .inline-controls input[type='checkbox'],
.participants_db .inline-controls input[type='radio'] {
  float:none;
}
.edit-participant h3 {
  margin-top: 2em;
  margin-bottom: 1em;
}
.edit-participant .submit-buttons {
  border:none;
}
.edit-participant .form-table th {
  width:195px;
  vertical-align:middle;
  padding-top: 1ex;
}
.edit-participant .form-table h3 {
  margin-top:0;
  margin-bottom:0;
}
.edit-participant .form-table tr.hidden {
  visibility:hidden;
  position:absolute;
}
.edit-participant .uploaded-image {
  width:auto;
  height:85px;
  float:left;
  margin-right:10px;
}
.edit-participant .wp-editor-wrap {
  max-width: 600px;
}
.edit-participant .wp-editor-area {
  background-color: #FFFFFF;
  border: 2px solid #DFDFDF;
  color: #333333;
  height: 20em;
}
.edit-participant .mce-edit-area iframe {
  border: 1px solid #dedede;
}
div.mce-panel {
  background: none repeat scroll 0 0 #f5f5f5;
}
.file-delete {
  display: inline;
  white-space: nowrap;
}
.file-delete input[type=checkbox] {
  float:none;
}
.pdb-upload input[type=file] {
  float:none;
  line-height: 1;
  vertical-align: text-bottom;
}

.wrap[class|="pdb"] td,
.wrap[class|="pdb"] th {
  vertical-align: middle;
}
.field-group.group-with-title {
  margin: 1.5em 0;
}
.field-group legend {
  font-weight: bold;
}

fieldset.no-border {
  border: none;
  margin: 0;
  padding: 0;
}

/* Select Other */
.selectother label,
.multicheckbox label,
.file-delete label,
.csv-export label,
.radio-group label,
.radio-subgroup label,
.othercontrol  {
  margin: 0 12px 0 0;
  width: auto;
  white-space: nowrap;
  display: inline-block;
}
.edit-participant .form-table td .radio-subgroup label {
  margin: 0 12px 0 0;
}
.othercontrol label {
  margin-right: 0;
}
.inline-controls label {
  float: none;
}
.selectother label input,
.multicheckbox label input,
.file-delete label input,
.radio-group label input,
.radio-subgroup label input {
  width: auto;
  float: none;
  margin:0 2px 0 0;
  vertical-align: inherit;
}
.file-delete label {
  background-color: #FFBBBB;
  padding: 3px 5px;
  border-radius: 3px;
  border: 1px solid #DFDFDF;
  float:none;
}
.selectother {
  display: inline-block;
  border: 1px solid #DDDDDD;
  overflow: auto;
  padding: 5px;
}
.checkbox-group,
.radio-group {
  display: block;
  line-height: 2;
  margin: 0 4px;
  width: auto;
}
.checkbox-group legend,
.radio-group legend {
  font-weight: bold;
  margin-top: 15px
}
.checkbox-group fieldset:first-of-type legend,
.radio-group fieldset:first-of-type legend {
  margin-top: 0;
}
.inline-controls .checkbox-group, .inline-controls .radio-group {
  display: inline-block;
}
input.otherfield[type=text] {
}
.dropdown-other select {
  margin-right: 10px;
}
.dropdown-other input[name=temp] {
  /*  display:none;*/
}
input[type="color"] {
  min-height: 3em;
}
.pdb-added-content {
  display: flex;
  align-items: center;
}
.pdb-precontent, 
.pdb-postcontent {
  display: inline-block;
}
.pdb-precontent {
  margin-right: 3px;
}
.pdb-postcontent {
  margin-left: 3px;
}

/* LIST */

.wp-list-table th,
.wp-list-table td,
.form-table th, 
.form-table td {
  /*  line-height: 1.1;*/
  vertical-align: middle;
}
.pdb-list .wp-list-table th,
.pdb-list .wp-list-table td {
  padding: 5px;
}
.pdb-list .pdb-searchform {
  margin-bottom: 1.5em;
}
.pdb-list table caption {
  margin: 1em 0;
}
.list-count-zero {
  display: none;
}
.pdb-list fieldset {
  border: none;
}
.pdb-list span.textarea {
  display: block;
  max-height: 5em;
  max-width: 150px;
  overflow: auto;
}
.hide-titles .pdb-field-title,
.hide-titles.pdb-list thead {
  display: none;
}
.pdb-searchform .radio-group {
    display: inline-block;
    vertical-align: middle;
}
.pdb-searchform .radio-group fieldset {
    margin: 0
}
.pdb-searchform input[type=text],
.pdb-searchform input[type=submit],
.pdb-searchform select,
.pdb-searchform label.checkbox {
  margin: 0 5px 0 0;
}
.pdb-searchform input[type=checkbox],
.pdb-searchform input[type=radio] {
  margin-left:5px;
}
.ajax-loading {
  display: inline-block;
  margin-left: 5px;
  margin-right: 5px;
  visibility: visible;
  position: relative;
  vertical-align: top;
  width: 32px;
  height: 32px;
}
svg.ajax-loading image {
  height: 32px;
  width: 32px;
}
.ajax-loading object {
  height: 32px;
  width: 32px;
  margin-top: -50%;
  position: absolute;
  top: 50%;
}

/* list pagination */
.pdb-list .pagination,
.pdb-pagination {
  overflow:auto;
  text-align: left;
}
.pdb-list .pagination ul,
.pdb-pagination ul {
  padding: 0;
  margin: 1em 0;
  list-style:none;
}
.pdb-list .pagination li,
.pdb-pagination li {
  display: inline;
  margin: 0;
  list-style-type: none;
}
.pdb-list .pagination li>span,
.pdb-pagination li>span,
.pdb-list .pagination a,
.pdb-pagination a {
  float:left;
  margin: 0;
  padding: 6px 12px;
  border-width: 1px;
  border-style: solid;
  border-color: var(--PDb-pagination-border-color) var(--PDb-pagination-border-color) var(--PDb-pagination-border-color) transparent;
  border-radius: 0;
  background-color: var( --PDb-pagination-bg );
  color: inherit;
}
.pdb-list .pagination li.disabled span,
.pdb-pagination li.disabled span {
  background-color: var(--PDb-pagination-disabled-bg, inherit);
  color: var(--PDb-pagination-disabled-color, inherit);
}
.pdb-list .pagination li.disabled span,
.pdb-pagination li.disabled span,
.pdb-list .pagination li.nextpage span,
.pdb-pagination li.nextpage span,
.pdb-list .pagination li.firstpage span,
.pdb-pagination li.firstpage span,
.pdb-list .pagination li.lastpage span,
.pdb-pagination li.lastpage span {
  vertical-align: sub;
}
.pdb-list .pagination li.currentpage span, 
.pdb-pagination li.currentpage span {
  background-color: var(--PDb-pagination-current-bg, inherit);
  color: var(--PDb-pagination-current-color, inherit);
}
.pdb-list .pagination li:first-of-type > span,
.pdb-pagination li:first-of-type > span,
.pdb-list .pagination li:first-of-type a,
.pdb-pagination li:first-of-type a  {
  margin-left:0;
  border-left-color: var(--PDb-pagination-border-color);
}
.pdb-list .pagination li:last-of-type > span,
.pdb-pagination  li:last-of-type > span,
.pdb-list .pagination li:last-of-type a,
.pdb-pagination li:last-of-type a  {
  margin-right:0;
  border-right-color: var(--PDb-pagination-border-color);
}
.pdb-list .pagination li.currentpage:first-child,
.pdb-pagination  li.currentpage:first-child,
.pdb-list .pagination li:first-child a,
.pdb-pagination li:first-child a {
  margin-left:0;
}
.pdb-list .pagination a,
.pdb-pagination a  {
  text-decoration:none;
}
.pdb-list .pagination a:hover,
.pdb-pagination a:hover  {
  background-color: var(--PDb-pagination-hover-color);
}
.pdb-list .pagination label,
.pdb-pagination label  {    
  float: left;
  margin: 8px 6px 0 0;
}
.pdb-pagination.csv-export-box label {
  float: none;
}
.pdb-list .pagination .ajax-loading, 
.pdb-pagination .ajax-loading {
  margin: 1em;
}
.wp-admin .pdb-list .pagination .dashicons, 
.wp-admin.has-dashicons .pagination .dashicons.dashicons-last-page,
.wp-admin.has-dashicons .pagination .dashicons.dashicons-first-page {
  vertical-align: -0.1em;
  font-size: 13px;
  margin-bottom: -4px;
}
.pagination .dashicons.dashicons-first-page:after {
  content: "❬❬";
}
.pagination .dashicons.dashicons-previous-page:after {
  content: "❬";
}
.pagination .dashicons.dashicons-next-page:after {
  content: "❭";
}
.pagination .dashicons.dashicons-last-page:after {
  content: "❭❭";
}
.has-dashicons .pagination .dashicons.dashicons-first-page,
.has-dashicons .pagination .dashicons.dashicons-last-page {
  letter-spacing: -0.5em;
  white-space: nowrap;
  margin: 0 3px 0 -3px;
}
.has-dashicons .pagination .dashicons.dashicons-first-page:after {
  content: "\f341\f341";
}
.has-dashicons .pagination .dashicons.dashicons-previous-page:after {
  content: "\f341";
}
.has-dashicons .pagination .dashicons.dashicons-next-page:after {
  content: "\f345";
}
.has-dashicons .pagination .dashicons.dashicons-last-page:after {
  content: "\f345\f345";
}

/* LIST FLEXBOX */

.pdb-flexbox-list .list-container {
  display: flex;
  flex-direction: column;
}
.pdb-flexbox-list section {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 0.75em 0;
  padding-bottom: 0.75em;
  border-bottom: 2px solid rgba(0,0,0,0.1);
}
.pdb-flexbox-list.flex-column section {
  flex-direction: column;
}
.pdb-flexbox-list section:last-of-type {
  border-bottom: none;
}
.pdb-flexbox-list section:first-of-type {
  margin-top: 1.5em;
  padding-top: 0.75em;
  border-top: 2px solid rgba(0,0,0,0.1);
}
.pdb-flexbox-list .pdb-field {
  margin-right: 1em;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  font-weight: bold;
  margin-bottom: 0.5em;
}
.pdb-flexbox-list .pdb-field.blank-field {
  display: none;
}
.pdb-flexbox-list .pdb-field-title {
  font-weight: normal;
  padding-right: 0.25em;
  font-size: 70%;
}
.pdb-flexbox-list.pdb-list .pagination ul, .pdb-pagination ul {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: auto;
  text-align: center;
}
.pdb-flexbox-list.pdb-list .pagination li {
  width: 20%;
  max-width: 4em;
}
.pdb-flexbox-list .pdb-pagination span.dashicons {
  vertical-align: middle;
}
.pdb-flexbox-list .pdb-pagination span.ajax-loading {
  position: absolute;
}
.pdb-flexbox-list .pdb-list .pagination li > span, 
.pdb-flexbox-list .pdb-pagination li > span, 
.pdb-flexbox-list .pdb-list .pagination a, 
.pdb-flexbox-list .pdb-pagination a {
  padding: 0.5em 0;
  width: 100%;
}

@media only screen and (max-width: 600px) {
  /* 
  this will hide the direct number pagination links, resulting in a more 
  compact display 
  */
  .pdb-flexbox-list .pdb-pagination li.direct-page {
    display: none;
  }
}


/* SINGLE */
.pdb-single dl {
  overflow: auto;
}
.pdb-single dd {
  overflow:auto;
  margin: 0 0 1.625em 0.8em;
}
.pdb-single dt {
  float: left;
  font-weight: bold;
  width: 140px;
  margin: 0 10px 1.625em 0;
}
.pdb-single .image-field-wrap {
  float: none;
}
.image-filename {
  vertical-align: text-bottom;
  margin: 0 0 0 10px;
}
.image-upload .helptext {
  display:block;
}
.pdb-single span.textarea {
  height: auto;
}
.hide-titles .flex-label,
.hide-titles dl dt,
.hide-titles .pdb-field-title,
.hide-blank .blank-field,
.hide-blank .image-blank-field,
.pdb-single.hide-empty-group .pdb-group-novalues {
  display: none;
}
.pdb-single-flex.show-blank .flex-field.blank-field {
  display: inherit;
}



/* SINGLE FLEX */
.pdb-single-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0;
  flex-direction: column;
}
.pdb-single-flex section {
  margin: 1em 0;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}
.pdb-single-flex.flex-row section {
  flex-direction: row;
}
.pdb-single-flex.flex-row section .pdb-group-title, 
.pdb-single-flex.flex-row section .pdb-group-description {
  flex-basis: 100%;
}
.pdb-single-flex.flex-row .flex-field {
  margin: 0.5em 6px 0.5em 0;
  padding: 10px;
  background-color: var(--PDb-flex-row-bg, inherit);
}
.pdb-single-flex .flex-field {
  margin: 0.5em 0;
}
.pdb-single-flex .flex-field.blank-field {
  display: none;
}
.pdb-single-flex .flex-label {
  font-style: italic;
  margin-right: 1em;
  vertical-align: top;
  opacity: 0.7;
}
.pdb-single-flex .flex-label:after {
  content: ":";
}
.pdb-single-flex.flex-justify section {
  justify-content: space-between;
}

/* images */

.image-field-wrap {
  display: inline-block;
}
.image-field-wrap.display-mode-filename,
.image-field-wrap.display-mode-both,
.pdb-admin-edit-participant .image-field-wrap {
  display: block;
  margin: 0 10px 10px 0;
}
.image-field-wrap.empty {
  height: auto;
}
.image-field-wrap img {
  width: auto;
}
.pdb-record .image-field-wrap,
.pdb-record .file-link-wrap,
.edit-participant .file-link-wrap,
.edit-participant .image-field-wrap {
  display: inline-block;
  margin-right:10px;
}

/* ERRORS / MESSAGES */

.pdb-error, .pdb-message {
  display:inline-block;
  background-color: var( --PDb-message-bg, #FFF );
  box-shadow: var( --PDb-message-shadow, 0 1px 1px 0 rgba(0, 0, 0, 0.1) );
  padding: 10px 20px;
  margin: 2em 0;
}

.pdb-error {
  border-left: 4px solid #cf2e2e;
}
.pdb-error li {
  margin:0.5em 20px;
}
.pdb-message {
  border-left: 4px solid #7bdcb5;
}
.pdb-error p, .pdb-message p {
  margin:0;
}
.dashicons-sort:before {
  white-space: nowrap;
  color: #0073aa;
}
.dashicons-no:before,
.dashicons-no-alt:before,
.dashicons-info.warning:before {
  color: #D64E07;
}
.dashicons-no:hover:before,
.dashicons-no-alt:hover:before {
  color: white;
}
.dashicons-no:hover:before,
.dashicons-no-alt:hover:before {
  background-color: #D64E07;
}
.dashicons-yes:before {
  color: #02ba02;
}
.dashicons-yes:hover:before {
  color: white;
}
.dashicons-yes:hover:before {
  background-color: #02ba02;
}
.ui-dialog button.dashicons-before:before {
  margin-top: 3px;
}
.dashicons-info.warning:before {
  transform: rotate(180deg);
}
