/**
 * ereefs-reset.css
 *
 * This is an HTML-reset stylesheet that sets common HTML element properties
 * which are consistent with the eReefs Visual Identity.
 *
 * Note on units: some elements use 'rem': this is proportional to the
 * font-size on the root (html) element, rather than the local element, and
 * is used to give a spacing-rhythm independent of the local element font,
 * but still respectful of whatever the user has set their browser font to.
 **/

/* Open Sans Condensed: Font for heading and display text */
@import "https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700";

/* Roboto: Font for body text */
@import "https://fonts.googleapis.com/css2?family=Roboto";

/* Global variables for visual identity entities */
:root {
  /* eReefs Colours */
  --ereefs-white: #FFFFFF;
  --ereefs-darkest-blue: #212529; 
  --ereefs-dark-blue: #0F528C;        
  --ereefs-light-blue: #55A6D9;        
  --ereefs-lightest-blue: #CBFDFF; 
  --ereefs-light-grey: #CFDCE8;     
  --ereefs-dark-grey:   #707070;
  
  --ereefs-status-info: var(--ereefs-lightest-blue);
  --ereefs-text-light: #FFFFFF;
  --ereefs-text-dark: var(--ereefs-darkest-blue);

  /* eReefs Images */
  --ereefs-banner-img: url("../images/logos/ereefs_banner.png");
  --ereefs-bg-img: url("../images/backgrounds/hardy-reef.jpg");
  --ereefs-logo-favicon-ico: url("../images/logos/ereefs_logo_favicon.ico");
  --ereefs-logo-favicon-png: url("../images/logos/ereefs_logo_favicon.png");
  --ereefs-logo-favicon-svg: url("../images/logos/ereefs_logo_favicon.svg");
  --ereefs-logo-img-png: url("../images/logos/ereefs_logo.png");
  --ereefs-logo-img-svg: url("../images/logos/ereefs_logo.svg");
  --ereefs-logo-min-height: 50px;

  /* eReefs fonts */
  --ereefs-brand-font-family: Roboto,'Helvetica Neue',Helvetica,Arial,sans-serif;
  --ereefs-brand-font-size: 1.5rem;
  --ereefs-brand-font-weight: 400;
  --ereefs-code-font-family: Menlo, "DejaVu Sans Mono", "Ubuntu Mono", Courier, "Courier New", monospace, sans-serif;
  --ereefs-headings-font-family: 'Open Sans Condensed','Open Sans',sans-serif;
  --ereefs-text-font-family: Roboto,'Helvetica Neue',Helvetica,Arial,sans-serif;
}

/* HTML Reset Styles (classless styles for standard HTML elements) */
* {
  box-sizing: border-box;
  word-wrap: break-word;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section,
summary {
  display: block;
}

audio,
canvas,
progress,
video {
  display: inline-block;
}

audio:not([controls]) {
  display: none;
  height: 0;
}

progress {
  vertical-align: baseline;
}

template,
[hidden] {
  display: none;
}

a,
a:link,
a:visited {
  background-color: transparent;
  color: var(--ereefs-dark-blue);
  font-family: inherit;
  text-decoration: none;
  -webkit-text-decoration-skip: objects;
}

a:hover,
a:focus,
a:focus-within {
  font-family: inherit;
  text-decoration: underline;
}

a.active,
a:active,
a:focus,
a:focus-within,
a:hover {
  color: var(--ereefs-darkest-blue);
}

a:focus-visible {
  outline: invert thin dotted;
}

@media print {
  a:link,
  a:visited {
    text-decoration: underline;
  }
  a[href]:after {
    content: " (" attr(href) ")";
    font-weight: normal;
    font-size: 0.8em;
    text-decoration: none;
  }
  a[href^='javascript:']:after,
  a[href^='#']:after {
    content: '';
  }
}

abbr[title] {
  border-bottom: 1px dotted;
  text-decoration: underline;
  text-decoration: underline dotted;
}

@media print {
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
}

b,
strong {
  font-family: inherit;
  font-weight: bold;
}

blockquote {
  margin: 1.5rem 2rem;
}

body {
  background-color:var(--ereefs-light-grey);
  color: var(--ereefs-darkest-blue);
  font-family: var(--ereefs-text-font-family) !important;
  font-size: 1rem;
  font-weight: 400;
  max-width: 1400px;  /* xl -> xxl responsive screensize breakpoint */
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

body > * {
  background-color: white;
}

br {
  margin-bottom: 1rem;
}

code,
kbd,
pre,
samp,
tt,
var,
code,
kbd,
samp,
var {
  font-family: var(--ereefs-code-font-family) !important;
  font-size: 1em;
}

dd {
  margin: 0 0 0 2rem;
}

[dir="rtl"] dd {
  margin: 0 2rem 0 0;
}

dl {
  margin: 1.5rem 0;
}

dfn {
  font-style: italic;
}

fieldset {
  padding: 0.5rem 1rem 1rem;
  border: 1px solid var(--ereefs-dark-grey);
  margin: 0 2px;
  padding: 0.5em 0.5em 1em;
}

figure {
  margin: 1.5rem 0;
}

figcaption {
  font-family: var(--ereefs-brand-font-family);
}

form {
  margin: 0;
}

h1,h2,h3,h4,h5,h6 {
  color: inherit;
  font-family: var(--ereefs-headings-font-family) !important;
  font-weight: bold !important;
  font-style: normal;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: 1.5em !important;    /* 24px */
}

h2 {
  font-size: 1.25em !important;   /* 20px */
}

h3 {
  font-size: 1.125em !important;  /* 18px */
}

h4 {
  font-size: 1em !important;      /* 16 px */
}

h5 {
  font-size: 0.875em !important;  /* 14px */
}

h6 {
  font-size: 0.75em !important;  /* 12px */
}

hr,
.divider {
  border-bottom-style: none;
  border-top: 1px solid var(--ereefs-dark-grey);
  box-sizing: content-box;
  height: 0;
  margin: 1.5rem 0;
  overflow: visible;
  padding-bottom: -1px;
}

.divider > :first-child, hr > :first-child {
  margin-top: 1.5rem;
}

html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  background-color: var(--ereefs-light-grey);  
  font-family: var(--ereefs-font-family);
  font-weight: 400;
  font-size: 100%;   /* Of the browser-default size, usually 16px. This defines 1rem */
  line-height: 1.5em;
  margin: 0;
  min-height: 100%;
  padding: 0;
}

@media print {
  html {
    font-size: 12pt;
  }
}

/* Note: i.fa is a common class for font-awesome glyphs. Don't reset it to be italic */
i:not(.fa) {
  font-style: italic;
  font-family: inherit;
}

img {
  border-style: none;
  max-width: 100%;
  height: auto;
  width: auto;
}

img :not(:root) {
  overflow: hidden;
}

input {
  box-sizing: border-box;
  font: inherit;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  vertical-align: baseline;
}

[type='checkbox'],
[type='radio'] {
  padding: 0;
}

[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
  height: auto;
}
[type='search'] {
  appearance: textfield;
  -webkit-appearance: textfield;
  outline-offset: -2px;
}
[type='search']::-webkit-search-cancel-button,
[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}
::-webkit-input-placeholder {
  color: inherit;
  opacity: .54;
}

legend {
  border: 0;
  box-sizing: border-box;
  display: table;
  max-width: 100%;
  white-space: normal;
  color: var(--ereefs-dark-blue);
  margin-left: -5px;
  padding: 0 5px;
}

mark {
  background-color: var(--ereefs-status-warning);
  color: black;
}

menu,
ol,
ul {
  margin: 1.5rem 0;
  padding: 0 0 0 2rem;
}

[dir="rtl"] menu, [dir="rtl"]
ol, [dir="rtl"]
ul {
  padding: 0 2rem 0 0;
}

ol ol,
ol ul,
ul ol,
ul ul {
  margin: 0;
}

optgroup {
  box-sizing: border-box;
  font: inherit;
  font-weight: bold;
  max-width: 100%;
  margin: 0;
  vertical-align: baseline;
}

p,
pre {
  margin: 1.5rem 0;
}

q {
  quotes: '\201C' '\201D' '\2018' '\2019';
}

select {
  box-sizing: border-box;
  font: inherit;
  max-width: 100%;
  margin: 0;
  text-transform: none;
  vertical-align: baseline;
}

small {
  color: inherit;
  font-family: inherit;
  font-size: 0.625rem;  /* 10px */
}

sub,
sup {
  font-size: 0.5rem;  /* 8px */
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -.25em;
}

sup {
  top: -.5em;
}

svg {
  width: auto;
  height: auto;
}

svg :not(:root) {
  max-width: 100%;
  overflow: hidden;
}

table {
  margin: 1.5rem 0;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

table tr:nth-child(even) {
  background-color: var(--ereefs-light-grey);
}

table td {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  padding: .3rem .5rem;
}

table th {
  font-family: inherit;
  font-size: inherit;
  font-weight: bold;
  padding: .3rem .5rem;
}

textarea {
  box-sizing: border-box;
  max-width: 100%;
  font: inherit;
  max-width: 100%;
  margin: 0;
  overflow: auto;
  vertical-align: top;
}

/* button definitions, which need to override input element settings: */
.btn,
.button,
button:not([class]),
[type='button'],
[type='reset'],
[type='submit'],
::-webkit-file-upload-button {
  appearance: button;
  -moz-appearance: button;
  -webkit-appearance: button;
  background-color: var(--ereefs-dark-blue);
  border: 1px solid color-mix(in srgb, var(--ereefs-dark-blue) 90%, #000);  /* 10% darker than the background*/
  box-shadow: inset 0 1px 0 rgba(#FFFFFF, .15), 0 1px 1px rgba(#000000, .075);
  box-sizing: border-box;
  color: var(--ereefs-text-light);
  cursor: pointer;
  display: inline-block;
  font: inherit;
  line-height: inherit;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  padding: 0.375rem 0.75rem;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  vertical-align: baseline;
}

/* Active, focused and hovered buttons can change colour */
/* See: https://developer.mozilla.org/en-US/docs/Web/CSS/:active */
/* See: https://developer.mozilla.org/en-US/docs/Web/CSS/:focus */
/* See: https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-within */
/* See: https://developer.mozilla.org/en-US/docs/Web/CSS/:hover */
.btn.active,
.button.active,
button.active,
[type='button'].active,
[type='reset'].active,
[type='submit'].active,
.btn:active,
.button:active,
button:active,
[type='button']:active,
[type='reset']:active,
[type='submit']:active,
.btn:focus,
.button:focus,
button:focus,
[type='button']:focus,
[type='reset']:focus,
[type='submit']:focus,
.btn:focus-within,
.button:focus-within,
button:focus-within,
[type='button']:focus-within,
[type='reset']:focus-within,
[type='submit']:focus-within,
.btn:hover,
.button:hover,
button:hover,
[type='button']:hover,
[type='reset']:hover,
[type='submit']:hover {
  background-color: color-mix(in srgb, var(--ereefs-dark-blue) 90%, #000);  /* matches the unhovered border colour */
  box-shadow: inset 0 3px 5px rgba(#000000, .125);
  color: var(--ereefs-text-light);
  text-decoration: none;
}

/* Prevent dotted outlines from appearing on buttons with focus unless needed for accessibility */
/* See: https://developer.mozilla.org/en-US/docs/Web/CSS/::-moz-focus-inner */
/* See: https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
.btn:not(:focus-visible)::-moz-focus-inner,
.button:not(:focus-visible)::-moz-focus-inner,
button:not(:focus-visible)::-moz-focus-inner,
[type='button']:not(:focus-visible)::-moz-focus-inner,
[type='reset']:not(:focus-visible)::-moz-focus-inner,
[type='submit']:not(:focus-visible)::-moz-focus-inner {
  border-style: none;
}
.btn:focus-visible,
.button:focus-visible,
button:focus-visible,
[type='button']:focus-visible,
[type='reset']:focus-visible,
[type='submit']:focus-visible {
  outline-color: invert;
}

/* Disabled buttons should be greyed out, with no active/focus/hover changes */
[disabled].btn,
[disabled].button,
button[disabled],
[disabled][type='button'],
[disabled][disabled][type='reset'],
[type='submit'],
[disabled].btn.active,
[disabled].button.active,
button[disabled].active,
[disabled][type='button'].active,
[disabled][type='reset'].active,
[disabled][type='submit'].active,
[disabled].btn:active,
[disabled].button:active,
button[disabled]:active,
[disabled][type='button']:active,
[disabled][type='reset']:active,
[disabled][type='submit']:active,
[disabled].btn:focus,
[disabled].button:focus,
button[disabled]:focus,
[disabled][type='button']:focus,
[disabled][type='reset']:focus,
[disabled][type='submit']:focus,
[disabled].btn:focus-within,
[disabled].button:focus-within,
button[disabled]:focus-within,
[disabled][type='button']:focus-within,
[disabled][type='reset']:focus-within,
[disabled][type='submit']:focus-within,
[disabled].btn:hover,
[disabled].button:hover,
button[disabled]:hover,
[disabled][type='button']:hover,
[disabled][type='reset']:hover,
[disabled][type='submit']:hover {
  background-color: var(--ereefs-dark-grey);
  border: 1px solid color-mix(in srgb, var(--ereefs-dark-grey) 90%, #000);  /* 10% darker than the background*/
  cursor: default;
  color: var(--ereefs-light-grey);
}
