/* Variables */
:root {
  --primary-hue: 206;
  --colour-plum: #9e0057;
  --colour-primary: var(--colour-plum);
  --colour-lines: #d8d8d8;
  --colour-pale: #f4f5f0;

  /* See https://modernfontstacks.com/ */
  --font-family-geometric-humanist: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;

  --page-width: 90%;
  --page-max-width: 1200px;
  --text-max-width: 40em;
  --full-node-max-width: 54em;
  --landing-page-section-gap: calc(1em + 2vw);
}

/* ================================================================================================================== */
/* Elements */
/*details {
  & > div {
    padding: 0.5em 0.6em;
  }
  p:first-child {
    margin-top: 0;
  }
  p:last-child {
    margin-bottom: 0;
  }
}*/

/* Lists */
ul, ol {}
li + li {
  /*margin-top: 0.7em;*/
}

blockquote {
}

a {
  color: #0f5dac;

  &:link {}
  &:hover,
  &:focus {
  }
}
h1, h2, h3, h4 {
  line-height: 1;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  color: #171717;
}
h1 {
}
hr {
  /*border-width: 0 0 1px;
  border-color: var(--colour-lines);
  margin-top: 3vw;
  margin-bottom: 3vw;*/
}
fieldset {
  border: solid 1px var(--colour-lines);
  border-radius: 4px;

  legend {
    font-weight: bold;
  }
}
legend,
.form-composite > legend {
  padding: 0.3em 0.5em;
}
img,
video {
  max-width: 100%;
  height: auto;
}
table {
  border-spacing: 0;
  border-collapse: collapse;

  th {
    text-align: left;
  }
  th, td {
    border: solid 1px var(--colour-lines);
    padding: 0.3rem 0.4rem;
  }
}
button,
input[type="submit"],
.button {
  display: inline-block;
  padding: 0.5em 0.9em;
  border: solid 1px var(--colour-lines);
  background: #f0f0f0;
  color: inherit;
  text-decoration: none;
  border-radius: 1.2em;

  &:hover,
  &:focus {
    background: #dcdcdc;
    text-decoration: none;
  }
  &.primary,
  &.button--primary {
    background: var(--colour-primary);
    color: white;
    border: none;

    &:hover,
    &:focus {
      filter: brightness(85%);
    }
  }
  &.outlined {
    background: white;
    background: none;
    color: var(--colour-primary);
    border: solid 1px var(--colour-primary);
  }
  &.flat {
    background: none;
    padding-left: 0.2em;
    /*border-radius: 0;*/
    padding-right: 0.2em;
    color: var(--colour-primary);
    border: none;

    &:hover,
    &:focus {
      background: none;
      filter: brightness(85%);
    }
  }
}


/* Utilities (small components) */
.demo-heading {
  background: #474747;
  color: white;
  padding: 0.2em 0.5em;
  font-size: 0.85em;
  max-width: var(--page-max-width);
  margin: calc(1em + 3vw) auto calc(0.9em + 1vw);

  & > .text {
    width: initial;
    max-width: initial;
  }
  p {
    margin: 0;
  }
}
.hidden {
  display: none !important;
}
.background-pale {
  background: var(--colour-pale);
}
ul.inline li:first-child {
  padding-left: 0;
}
/* Lists */
.non-list {
  list-style: none;
  padding-left: 0;
  margin: 0;

  li {
    margin-top: 0;
    padding-left: 0;
    line-height: inherit;
  }
}
/* Messages (success, error, etc.) */
.messages {
  margin-top: 1em;
  margin-bottom: 1em;
}
/* Score bars */
.score-bar {
  width: 100%;
  height: 6px;
  background: #e6e6e6;

  .score {
    height: inherit;
    background: #696969;
  }
}
/* Tabs */
[role="tabpanel"] {
  /*padding: 1.8em 0;*/
}
/* Views */
.view-content {
  clear: both;
}
.views-exposed-form {}
.view-footer {}

ul.menu {
  margin-left: 0;
}


/* ================================================================================================================== */
/* Regions & layout */
html {
  height: calc(100% - var(--drupal-displace-offset-top));
}
body,
.dialog-off-canvas-main-canvas,
.layout-container {
  height: 100%;
}
body.path-canvas {
  height: initial;
}
body {
  font-family: var(--font-family-geometric-humanist);
  line-height: 1.3;
  color: #494949;
}
.layout-container {
  margin: 0;
  display: flex;
  flex-direction: column;
}
header[role="banner"] > div,
[id="layout-main-container"],
footer[role="contentinfo"] > div {
  max-width: var(--page-max-width);
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}
header[role="banner"],
footer[role="contentinfo"] {
  flex: 0 1 auto;

  .menu {
    display: flex;
    gap: 1em;
    align-items: center;
  }
  a {
    color: inherit;
    text-decoration: inherit;
    font-size: 1.1em;
  }
}

/* Header */
header[role="banner"] {
  /*border-bottom: solid 1px var(--colour-lines);*/
  background: hsl(var(--primary-hue), 32.6%, 81.4%);
}

main {
  flex: 1 1 auto;
}

/* Footer */
footer[role="contentinfo"] {
  /*border-top: solid 1px var(--colour-lines);*/
  background: hsl(var(--primary-hue), 32.6%, 81.4%);
  margin-top: 3vw;
}


/* ================================================================================================================== */
/* Overrides */
[id="block-demo-branding"] {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
.demo-block {
  background: hsl(var(--primary-hue), 36%, 93%);
  padding: 0.6em 0.8em;

  p:first-child {
    margin-top: 0;
  }
  p:last-child {
    margin-bottom: 0;
  }
}
.sdc-spacer {
  position: relative;
  border-style: dashed;
  border-width: 1px 0;
  border-color: #b6b6b6;

  &::before,
  &::after {
    position: absolute;
  }
  &::before {
    content: "↑";
    top: 0;
  }
  &::after {
    content: "↓";
    bottom: 0;
  }
}
