:root {
  --page-footer-padding: 4.5em;
}

body {
  padding-bottom: var(--page-footer-padding);  /* This accounts for the fixed footer */
}

body.withPageControls {
  padding-bottom: calc(var(--page-footer-padding) + 84px);
}

header.pageHeaderBar {
  background-color: var(--light-background-shaded-colour);
  z-index: 50;
}

footer.pageFooterBar {
  position: fixed;
  bottom: 0px;
  left: 0px;
  right: 0px;
  padding: 10px;
  border-top: solid 2px var(--core-colour);
  background-color: var(--body-background-colour);
  z-index: 50;
} 

.pageFooterBar .footerLayout {
  display: grid;
  grid-template-columns: 40% 20% 40%;
}

.pageFooterBar .footerLayout .copyright {
  grid-column: 1;
}

.pageFooterBar .footerLayout .links {
  grid-column: 3;
  text-align: right;
  word-spacing: 1em;
}

.pageFooterBar .footerLayout .links > * {
  word-spacing: normal;
}

.pageBackground.organisationLogo {
  position: absolute;
  z-index: -1;
  opacity: 0.05;
  bottom: 8em;  
  width: 400px;
  max-width: 100%;
  left: 50%;
  margin-left: -200px;
  overflow: hidden;
  transform: rotate(-60deg);
  /* transform-origin: 0% 0%; */

}

.homeButtonImage {
  height: 100%;
  width: 100%;
  padding: 4px;
}

.homeButtonImage svg {
  height: 100%;
  width: 100%;
}

.homeButtonImage svg path {
  stroke: var(--core-colour);
  stroke-opacity: 1; 
  stroke-width: 1; 
  stroke-dasharray: none; 
  stroke-linecap: butt; 
  stroke-dashoffset: 0; 
  stroke-linejoin: miter; 
  stroke-miterlimit: 4; 
  fill: var(--core-colour);
  fill-opacity: 1; 
  fill-rule: nonzero; 
  opacity: 1;  
}

.actionDisabled,
.actionTile,
a.actionTile {
  display: inline-block;
  padding: 20px;
  font-size: 20px;
  font-weight: bold;
  text-align: left;
  width: 430px;
  max-width: 100%;
  border-bottom: solid 1px var(--row-separator-colour);
  text-decoration: none;
  color: var(--text-colour);
  transition: all 0.3s ease-out;
}

.actionDisabled {
  color: var(--light-text-colour);
}

.actionTile:hover,
a.actionTile:hover {
  transform: none;
  background-color: rgba(var(--core-colour-rgb), 0.3);
  transition: all 0.1s ease-out;
}

.actionTile .smaller {
  font-weight: normal;
  font-size: small;
}

section.bottomActions {
  position: absolute;
  bottom: var(--page-footer-padding);
  left: 0px;
  padding: 0px 20px;
  max-width: 100%;
}

.actions.horizontal {
  word-spacing: 2em;
}

.actions.horizontal > * {
  word-spacing: normal;
}

section.selectionTiles,
section.actionTiles {
  max-width: 100%;
  text-align: left;
  width: fit-content;
}

.centered section.selectionTiles,
.centered section.actionTiles {
  margin-left: auto;
  margin-right: auto;
}

section.selectionTiles.grouped,
section.actionTiles.grouped  {
  display: grid;
  grid-template-columns: repeat(auto-fit, 430px);
  gap: 2em;
}

@media screen and (max-width:470px) {
  section.selectionTiles.grouped,
  section.actionTiles.grouped {
    grid-template-columns: repeat(auto-fit, 100%);
  }
}

section.selectionTiles.grouped .selectionGroup,
section.actionTiles.grouped .actionGroup {
  /* width: 430px; */
  max-width: 100%;
}

.selectionTile {
  padding: 10px;
  border: solid 2px var(--core-colour);
  border-radius: 6px;
  box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.4);
  transition: all 0.3s ease-out;
  margin: 0.5em 0px;
  background-color: var(--body-background-colour);
  position: relative;
}

.documentTile {
  padding-left: 30px;
}

.documentTile::before {
  content: '';
  display: block;
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: 0px;
  width: 20px;
  background-color: var(--core-colour);
  background-image: url(/image/icon_document.svg);
  background-size: 14px auto;
  background-position: center;
  background-repeat: no-repeat;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;  
}

.selectionTile[onclick] {
  cursor: pointer;
}

.selectionTile[onclick]:hover {
  background-color: rgba(var(--core-colour-rgb), 0.3);
  transition: all 0.1s ease-out;
}

.selectionTile heading {
  color: var(--core-colour);
  font-weight: bold;
}

.selectionTile .subHeading {
  font-weight: bold;
  margin-top: 0.5em;
}

.selectionTile .subHeading.marginBelow {
  margin-bottom: 0.5em;
}

.selectionTile.membership table {
  width: 100%;
}

.selectionTile.notValid {
  opacity: 0.5;
}

span.emailField button.icon,
span.emailField button.icon:hover,
span.telField button.icon,
span.telField button.icon:hover {
  cursor: default;
  box-shadow: none;
  /* background-color: lightgrey;
  top: 1px;
  right: 1px;
  bottom: 1px; */
  filter: none;
}

button.pickerChoose::before {
  content: 'Click to Select';
}

section.pageControls {
  background-color: var(--body-background-colour);
  padding: 0px 20px 20px;
  position: fixed;
  bottom: 46px;
  left: 0px;
  right: 0px;
  text-align: center;
}

section.pageControls::before {
  content: '';
  position: absolute;
  top: 0px;
  height: 30px;
  margin-top: -30px;
  left: 0px;
  right: 0px;
  background-image: linear-gradient(rgba(var(--body-background-colour-rgb),0), rgba(var(--body-background-colour-rgb),1));
}

.centeredLimitedWidthContent {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.centeredLimitedWidthContent.withGroups {
  max-width: 1354px;
}

section.centeredContent {
  width: fit-content;
  margin: auto;
}

.topSticky {
  position:sticky; 
  top: 78px; 
  background-color: #FFF; 
  align-self: start; 
  z-index: 1;  
}

h2.topSticky {
  margin-bottom: 0px;
  margin-top: 0px;
  padding-top: 1em;
  padding-bottom: 1em;
}

.selectionGroup h2.topSticky {
  padding-left: 15px;
  padding-right: 15px;
  background-color: #F2F2F2;
  border-radius: 6px;
  box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.4);
  margin-bottom: 1em;
}

@media screen and (max-width: 1480px) {  
  table.fields:not(.smaller),
  .extraTableControls:not(.smaller) {
    font-size: inherit;
  }
}

@media screen and (max-width: 600px) {  

  header.pageHeaderBar {
    padding: 10px;
    position: sticky;
    top: -10px;
  }

  .pageHeaderBar .organisationLogo {
    margin-right: 10px;
  }

  .pageHeaderBar .organisationLogo {
    width: 160px;
  }

  .pageHeaderBar .subTitle {
    font-size: 16px;
  }

  main {
      padding: 20px 10px;
  }

  table.fields > tbody > tr:not(.hidden),
  table.fields > tbody > tr:not(.hidden) > *,
  header.TableViewHeader > table > tbody > tr:not(.hidden),
  header.TableViewHeader > table > tbody > tr:not(.hidden) > * {
    display: block;
    width: auto;
  }

  section.tableSection > header {
    position: static;
  }

  section.tableSection > .tableWrapper > table.dataTable > thead  {
    top: 70px;
  }

  .TableViewHeader .extraTableControls {
    white-space: normal;
    text-align: left;
  }

  table.fields th:not([align]) {
    text-align: left;    
  }

  table.fields th {
    padding-top: 8px;
    padding-bottom: 2px;
  }

  table.fields.withSections tr:not(.sectionHeading) > :first-child {
    padding-left: 5px;
  }

  table.fields.withSections tr:not(.sectionHeading):not(.fileWrapper) > :first-child {
    padding-left: 2px;
  }

  table.fields tbody th[data-field-mandatory="yes"]::after {
    display: inline;
    position: static;
  }

  table.collapsible {
    width: 100%;
  }

  table.collapsible thead {
    float: right;
    border-radius: 10px;
  }

  table.collapsible thead tr {
    display: block;
    border-radius: 10px;
  }

  table.collapsible thead tr > * {
    display: block;
    text-align: right;
    width: auto;
    border-radius: 10px;
  }  

  table.collapsible tbody {
    display: block;
  }

  table.collapsible tbody tr {
    display: block;
    border: solid 1px #E6E6E6;
    box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.3);
    border-radius: 10px;
    margin-bottom: 1em;
  }

  table.collapsible tbody td {
    display: block;
  }

  table.collapsible tbody tr > * {
    border-bottom: none;
    text-align: left;
    width: auto;
    min-height: 2.65em;
  }

  table.collapsible tbody tr > *:first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
  }

  table.collapsible tbody tr > *:last-child {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
  }  

  button.sortButton {
    max-height: 1.3em;
    margin-top: -3px;
    margin-bottom: -3px;
  }

  article.form {
    padding: 0px;
    margin: 0px;
    border: none;
  }

  article.form .formElementContent h1 {
    margin-bottom: 0px;
  }

  article.form .formElementLabel {
    text-align: left;
    font-weight: 500;
  }

  article.form .formElement .formElementContentsWrapper {
    grid-template-columns: 1fr;
  }
  
  article.form .formElement[data-field-mandatory="yes"] .formElementLabel::before {  
    right: auto;
    left: -8px;
  }

  article.form .formElement.mandatoryFieldText .formElementLabel::before {
    top: 4px;
  }

  body.pageFormSubmission .submissionTime {
    border-top: solid 1px rgba(0,0,0,0.25);
    padding-top: 10px;
    text-align: center !important;
  }
}