/* Webform preview */
.webform-submission-data--view-mode-preview details.webform-container summary {
  font-size: 1.40625rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6 !important;
  margin-bottom: .5rem;
  font-weight: bold;
}

.webform-submission-data--view-mode-preview details.webform-container .webform-element label {
  font-weight: normal!important;
}

.webform-submission-data--view-mode-preview fieldset.webform-container legend {
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6 !important;
}

input.webform-edit-preview-button {
  background-color: unset !important;
  color: var(--wc-primary)!important;
  border: unset!important;
  margin-top: 0px!important;
  margin-bottom: 0px!important;
  text-decoration: underline!important;
  padding: 0!important;
  border-radius: unset;
}
.webform-edit-preview-button:hover,
.webform-edit-preview-button:active
{
  background-color: unset !important;
  color: var(--wc-secondary)!important;
  border: unset!important;
  outline: none!important;
  box-shadow: none!important;
}

.webform-edit-preview-button:focus {
  color: var(--wc-secondary)!important;
}

.webform-element.summary-list-item {
  display: grid;
  grid-template-columns: 1fr 1.5fr 0.5fr;
  grid-auto-flow: column;
  column-gap: 10px;
  border-bottom: 1px solid #dee2e6 !important;
  justify-items: start;
  align-items: start;
  padding-bottom: .5rem;
}
/* Override: if it's a composite, don't use grid */
.webform-element.summary-list-item[class*="webform-element-type-webform-composite"] {
  display: flow-root;
  grid-template-columns: none;
  grid-auto-flow: row;
  position: relative; /* so button can anchor inside */
}

/* Push the Change button to the right if it is in composite */
.webform-element.summary-list-item[class*="webform-element-type-webform-composite"]
.webform-edit-preview-button {
  position: absolute;
  top: 0.25rem;   /* adjust vertical offset */
  right: 0.25rem; /* adjust horizontal offset */
  float: right;           /* align to right edge */
 }

.webform-element.summary-list-item input.webform-edit-preview-button {
  justify-self: end;
}

/* Webform fields */
/* fix hidden class (provided by core hidden module) not working on boostrap btns*/
.webform-submission-form .btn.hidden,
.webform-submission-form button.hidden {
  display: none!important;
}
/* localgov address field - styled as btn-secondary */
.localgov-webform-uk-address--wrapper button.js-reset-address {
  color: var(--wc-dark);
  background-color: var(--wc-grey);
  border-color: var(--wc-grey);
}

.localgov-webform-uk-address--wrapper button.js-reset-address:not(:disabled):not(.disabled):active,
.localgov-webform-uk-address--wrapper button.js-reset-address:hover,
.localgov-webform-uk-address--wrapper button.js-reset-address:focus {
  outline: 2px transparent solid;
  color: var(--white);
  background-color: var(--wc-secondary);
  border-color: var(--wc-secondary);
  -webkit-box-shadow: 0 0 0 3px rgb(6 73 126 / 50%);
  box-shadow: 0 0 0 3px rgb(6 73 126 / 50%);
}

.localgov-webform-uk-address--wrapper .js-address-error{
  color: var(--wc-danger);
}
