* {
  box-sizing: inherit;
}

:root {
  --background-grey: #e8e8e8;
  --background-white: #fafafa;
  --text-black: #111111;
  --divider-grey: #aaaaaa;
}

{% comment %}Less brutal than a CSS reset - some *really basic* css rules {% endcomment %}
body {
  font-family: Lato, Helvetica;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-black);
}

h1, h2, h3, h4, h5, h6, p, a, span, li, label, input, select {
  line-height: inherit;
}

{% comment %}Maybe extend this list in future...{% endcomment %}
label {
  cursor: inherit;
}

h1 {
  font-size: 2rem;
  margin: 0 0 1rem 0;
  padding: 0.5rem 0 0 0;
}

h2 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem 0;
  padding: 0.3rem 0 0 0;
}

h3 {
  font-weight: bold;
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
  padding: 0.3rem 0 0 0;
}

h4 {
  font-weight: bold;
  margin: 0 0 0.5rem 0;
  padding: 0.3rem 0 0 0;
}

p, a, li {
  margin: 0 0 0.3rem 0;
}

p.error {
  color: var(--error-color);
}

b {
  font-weight: bold;
}

ul {
  list-style: circle;
  list-style-position: inside;
  margin: 0 0 0.3rem 0;
}

ul p{
  display: inline; 
}

ol {
  list-style: decimal;
  list-style-position: inside;
}

ol {
  margin: 0 0 0.3rem 0;
}

h1:first-child, h2:first-child, h3:first-child, p:first-child {
  padding-top: 0
}

input, textarea, select {
  border-style: solid;
  border-color: #656565;
  border-width: 1px 1px 1.5px 1px;

  background-color: var(--background-white);

  padding: 5px 5px 3.5px 5px;
  margin: 0 0 0.4rem 0;

  font-family: inherit;
  font-size: inherit;
  text-overflow: ellipsis;
}

input.error, input:focus.error {
  border-color: red;
}

input[type="checkbox"] {
  margin-right: 0.4rem;
}

input:disabled, textarea:disabled, select:disabled {
  background-color: #f3f3f3;
}

input:focus, textarea:focus, select:focus {
  border-color: #333333;
  border-bottom-width: 3px;
  padding-top: 5px;
  padding-bottom: 2px;
  outline:none;
}

em {
  font-style: italic;
}

strong {
  font-weight: bold;
}

small {
  font-size: 0.8rem;
}

button, .button {
  font-size: inherit;
  font-family: inherit;
  background-color: #3ba2dc;
  transition: background-color 0.3s ease-in;
  color: white;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0.4rem 0.8rem;
  margin: 0 0 0.4rem 0;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  line-height: 1.24;
  display: inline-block;
}

button.secondary, .button.secondary {
  background-color: #60d063;
}

button > *, .button > * {
  vertical-align: middle;
}

button:hover, .button:hover {
  background-color: #2e75a6;
}

button.secondary:hover, .button.secondary:hover {
  background-color: #378246;
}

button:disabled, .button:disabled, .button.secondary:disabled, button.secondary:disabled {
  border: 1px solid #999;
  background-color: #ccc;
  cursor: initial;
}

/* Put icons at a nice place on buttons */
button i, .button i {
  line-height: 1; /* Less than the text next to it, so it sits fitting against the top left */
   margin: -.2rem .3rem -.2rem -.1rem;
}

/* Put spacing between buttons placed side by side */
button + button, .button + .button, button + .button, .button + button {
  margin-left: 0.2rem;
}

/* Useful tooltip for hover-over help */
.tooltip-area {
  position: relative;
}

.tooltip-area span {
  visibility: hidden;
  position: absolute;
  min-width: 5rem;
  max-width: 15rem;
  width:fit-content;
  font-weight: normal;
  font-size: 1rem;
  background-color: black;
  color: white;
  padding: 0.5rem;
  border-radius: 5px;
  z-index: 1;
  top: 100%;
  left: 50%;
  margin-left: -50%;
}

.tooltip-area i {
  vertical-align: baseline;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.tooltip-area:hover span {
  visibility: visible;
}

/* Generic material piece, in case you need more control over how it appears */
.material {
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  border-radius: 3px;
  background-color: var(--background-white);
}

/* A wide piece of material used for a section */
.material-section {
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  border-radius: 3px;
  box-sizing: border-box;

  max-width: 800px;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: var(--background-white);
}

.material-section > hr {
  width: 100%;
  margin: 1px 0 1rem 0;
  border-bottom-color: var(--divider-grey);
  border-bottom-color: #aaaaaa;
  border-bottom-style: solid;
  border-width: 0px 0px 1px 0px;
}

/* Background body for a page */
.page-background {
  background-color: var(--background-grey);
  /* The 1rem bottom padding matches with the trailing 1rem of .material-section */
  padding: 2rem 2rem 1rem 2rem;
  min-width: 100%;
  min-height: 100%;
}

@media screen and (max-width: 800px) {
  .page-background {
    /* Use a tiny bottom padding to stop margin collapse */
    padding: 1rem 1rem 0.01rem 1rem;
  }
  .material-section {
  }
}

/**** Deprecated ****/
.material-card {
  box-sizing: border-box;
  max-width: 800px;
  margin: 1rem;
}

.material-card > hr {
  width: 100%;
  margin: 1px 0 1rem 0;
  border-bottom-color: var(--divider-grey);
  border-bottom-color: #aaaaaa;
  border-bottom-style: solid;
  border-width: 0px 0px 1px 0px;
}

.card-contents {
  max-width: 800px;
  padding: 1rem;
}

.card-l2 {
  border: solid 1px var(--black-18);
  border-radius: 0.813rem;
  box-shadow: unset !important;
}

.card-l2:hover {
  box-shadow: 0px 0px 12px 3px #00000020 !important;
}

@media screen and (max-width: 800px) {
  .material-card {
    padding: 0.8rem;
    margin: 0.8rem 0.3rem;
  }
}

.grey-background {
  background-color: var(--background-grey);
}

.hidden {
  visibility: hidden;
}
