/*
  @file Base/element level theming.

  This file sets up default CSS for elements, such as links as
  well as font sizes, vertical rhythm, etc.
*/

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin-block-start: 0; /* Removing top margin, for better vertical rhythm layout */
}

dialog {
  margin: auto;
}

body {
  margin: 0 auto;
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: var(--font-size);
  line-height: var(--line-height);
  scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
  body {
    scroll-behavior: auto;
  }
}

.dialog-off-canvas-main-canvas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  /* To give us a sticky footer. */
  margin-block-end: auto;
}

a {
  transition: var(--transition-time);
  color: var(--color-link);
  font-weight: 800;
}

a:hover {
  text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
}

a:not([class*="toolbar"]):focus {
  text-decoration: none;
  color: var(--color-black);
  outline: 3px solid transparent;
  background-color: var(--color-focus);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  box-shadow:
    0 -2px var(--color-focus),
    0 4px var(--color-black);
}


h1,
.h1 {
  color: var(--heading-1-color);
  font-family: var(--font-heading-1);
  font-size: var(--font-size-h1);
  font-weight: var(--heading-1-font-weight);
  line-height: var(--heading-1-line-height);
  font-optical-sizing: auto;
  margin-bottom: 1.6rem;
}

.page-pre-title {
  font-size: 1.5rem;
  display: block;
  color: var(--color-orange);
  font-family: var(--font-secondary);
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 1.5px;
  text-transform: lowercase;
}

h2,
.h2 {
  color: var(--heading-2-color);
  font-family: var(--font-heading-2);
  font-size: var(--font-size-h2);
  font-weight: var(--heading-2-font-weight);
  line-height: var(--heading-2-line-height);
}

h3,
.h3 {
  color: var(--heading-3-color);
  font-family: var(--font-heading-3);
  font-size: var(--font-size-h3);
  font-weight: var(--heading-3-font-weight);
  line-height: var(--heading-3-line-height);
}

h4,
.h4 {
  color: var(--heading-4-color);
  font-family: var(--font-heading-4);
  font-size: var(--font-size-h4);
  font-weight: bold;
  font-weight: var(--heading-4-font-weight);
  line-height: var(--heading-4-line-height);
}

h5,
.h5 {
  color: var(--heading-5-color);
  font-family: var(--font-heading-5);
  font-size: var(--font-size-h5);
  font-weight: var(--heading-5-font-weight);
  font-variant: all-small-caps;
  line-height: var(--heading-5-line-height);
}

h6,
.h6 {
  text-decoration: underline;
  color: var(--heading-6-color);
  font-family: var(--font-heading-6);
  font-size: var(--font-size-h6);
  font-weight: var(--heading-6-font-weight);
  font-variant: all-small-caps;
  line-height: var(--heading-6-line-height);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

img[alt] {
  text-wrap: balance;
  color: var(--image-alt-color);
  font-size: var(--image-alt-font-size-large);
  font-style: var(--image-alt-font-style);
}
img[data-img-loading-error] {
  padding: var(--image-alt-spacing);
  border: var(--image-alt-border);
  background-color: var(--image-alt-bg-color);
}

figcaption {
  font-size: small;
  color: var(--color-red);
}


.field--name-field-rich-text p,
.field--name-field-rich-text li {
  max-width: 75ch;
}

p,
ul,
ol,
pre,
table,
blockquote {
  margin-block-end: var(--vertical-rhythm-spacing);
}

ul ul,
ol ol,
ul ol,
ol ul {
  margin-block-end: 0;
}

sub,
sup {
  position: relative;
  vertical-align: baseline;
  line-height: 0;
}

sup {
  top: -0.5rem;
}

sub {
  bottom: -0.25rem;
}

small {
  text-transform: uppercase;
  font-size: 0.7rem;
}

table {
  width: 100%;
  text-align: left;
  border: var(--table-border);
  border-collapse: collapse;
}

td,
th {
  padding: var(--table-padding);
  border: var(--table-border);
}

th {
  border-color: var(--table-header-border-color);
  background-color: var(--table-bg-color);
  color: var(--color-white);
}

tr:nth-child(even) {
  background-color: var(--color-grey-lightest);
}

/* Responsive tables for table field tables */
table {
  overflow-x: hidden;
  max-width: 100%;
}
.lgd-responsive-table {
  overflow-x: auto;
}

input,
select,
option,
textarea,
button {
  font-family: var(--font-primary);
}

hr {
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  margin: 1rem 0;
}

.node__meta {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  min-width: 300px;
  margin-right: 1rem;
}

.node__meta .h3 {
  text-align: center;
  line-height: initial;
}

/* taxonomy tags */
.field--name-field-tags .field__items {
  display: flex;
  gap: 1rem;
}

.is-person-yes img {
  --image-border: 10px;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
  object-fit: cover;
  border: var(--image-border) solid white;
  margin-bottom: 1rem;
  transform: rotate(3deg);
  width: 250px;
}

/* @media (min-width: 2000px) {
  .main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
    grid-auto-rows: minmax(100px, auto);
  }
} */
/* We're not going super wide any more so now we need this and not the above,
    might be more places that needs narrowing 
 */
.node--type-article.node--view-mode-full, 
.lgd-region--content-top {
  max-width: var(--width-container);
  margin: 0 auto;
}

.lgd-region--content-bottom {
  margin-top: 2rem;
  background: var(--color-lgd-yellow);
  color: var(--color-black);
  padding: 1rem;
}

.lgd-region--banner {
  position: relative;
  border-top: 1px solid var(--color-beige-transparent);
  border-bottom: 1px solid var(--color-beige-transparent);
  display: flex;
  justify-content: end;
  margin-bottom: 1rem;
}

.lgd-region--banner .navigation--main > * {
  font-size: 1rem;
  display: inline-flex;
}

.path-frontpage .region-content-top {
  margin-top: 3rem;
}