/*
OSL green: #c2c926;
*/

html, body {
  padding: 0px !important;
  margin: 0px !important;
  width:100%;
  /* height:100%; */
  overflow: auto;
}

select {
  padding: 0.1em;
  border-radius: 5px;
  /* width: 15em; */
}

section#help #info {
  margin: 15px;
}

section#help header {
  margin: 15px;
}

select, option  {
  font-family: Arial,sans-serif;
  font-size: 1em;
}

div.group {
  margin-top: 10px;
  margin-bottom: 10px;  
}

span.tag {
  margin: 0 5px 0 0;
  padding: 5px 5px;
  background: white;
  line-height: 30px;
  font-weight: bold;
}

span.one {
  background-color: lightblue;
}

span.two {
  background-color: lightgoldenrodyellow;
}

span.three {
  background-color: lightpink;
}

input[type="button"] {
  color:#000000;
  padding:3px;
  background: #ffffff;
  border-width: thin;
  border-style: solid;
  border-radius: 5px;
  margin-top: 0.5em;
}

section {
  font-family: Arial,sans-serif;
  /* font-size: 0.875em; */
}

canvas#renderCanvas {
  margin: 5px;
  width: calc(100% - 15px);
  /* height: calc(100% - 15px); */
  /* min-height: 450px; */
}

body.using-mouse :focus {
  outline:none;
}

:focus {
  outline: black solid 2px;  
}

canvas:focus {
  outline-offset: -5px;
}

/* controls and data box */
section {
  /* left: 0; */
  /* right: 0; */
  padding: 0.5em;
}

section#controls, section#data {
  border-style: solid;
  /* opacity: 0.8; */
  background-color: white;
  border-style: solid;
  border-width: thin;
  border-radius: 10px; 
}

section#controls {
  border-style: solid;
  position: absolute; 
  top: 5px;
  width: fit-content;
  /* z-index: 200; */
}

section#help, section#progress  {
  position: absolute;
  overflow-y: auto;
  margin-bottom: 5px;
  top: 0;
}

section#data {
  position: relative;  
  /* bottom: 0px; */
  /* max-height: 160px; */
  overflow-y: auto;
  z-index: 500;
  margin-bottom: 5px;
}

section#button-bar, section#button-bar-vert {
  border-style: none;
  background: unset;
  position: absolute;
  top: 5px;
  right: 15px;
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-end;
  width: fit-content;
  padding:0;
  /* z-index: 100; */
}

section#button-bar-vert {
  top: 40px;
  flex-flow: column wrap;
}

section#button-bar input {
  margin-left: 10px;
}

.flexcontainer {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
}

.fleximagegroup {
  flex: fit-content;
}

figure {
  float: left;
}

figure a {
  display: block;
}

@media all and (min-width: 500px) {
  .flexcontainer {
    flex-wrap: nowrap;
  }
}

html.fullscreen, body.fullscreen {
  width:100%;
  height:100%;
  overflow:hidden;
}

#renderCanvas.fullscreen {
  width: 100%;
  height: 100%;
  /* min-height: unset;
  max-height: unset; */
}


section#data.fullscreen {
  position: absolute;  
  bottom: 0;
  /* top: 50px; */
  max-height: fit-content;
  /* width: 28em; */
  z-index: 500;
  margin-bottom: 2px;
}

section#data.fullscreen .flexcontainer {
  /* flex-flow: row wrap; */
}

section#data .main {
  margin-top: 0.5em;
}

section#data .box {
  text-align: center;
}

figure {
  margin: 5px;
}

figcaption {
  text-align: left;
  font-size: x-small;
}


/* help dialogue */
section#help .modal-container, section#progress .modal-container {
  max-width: 500px;
}

section#help h1 {
  margin: 0px;
}
section#help dl {
  display: flex;
  flex-flow: row;
  flex-wrap: wrap;
  width: 400px;
}

section#help dl dt {
  flex: 0 0 20%;
  margin-bottom: 5px;
  font-weight: bold;
}

section#help dl dd {
  flex:0 0 80%;
  margin-left: auto;
  text-align: left;
}

section#help.fullscreen {
  position: absolute;  
  top: auto;
  bottom: -140px;
  width: 41em;
}

/* modal dialogues */
div#modal-section {
  /* position:absolute; */
  /* 
  top: 80%;  
  left: 80%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%; 
  */
  /* z-index: 400; */
}

section.modal header {
  font-weight: bold;
  padding-top: 10px;
  padding-bottom: 20px;
  text-align: center;
  font-size: large;
}

/* controls */
input, select, label, img.thumb {
  cursor: pointer;
}

input[type="button"] {
  cursor: pointer;
}

input.button {
  width: 32px;
  height: 32px;
  background-repeat: no-repeat;
  border: solid 4px white;
  border-radius: 0;
  padding: 0;
  margin: 5;
}

/* maximise button */
input.toggle-fullscreen {
  background-image: url(../images/maximise.svg);
}

input.off {
  background-image: url(../images/minimise.svg);
}

/* home button */
input#goto-home {
  background-image: url(../images/home.svg);
}

/* help button */
input#open-help {
  background-image: url(../images/help.svg);
}

/* contrast button */
input.contrast-on {
  background-image: url(../images/contrast-on.svg);
}

input.contrast-off {
  background-image: url(../images/contrast-off.svg);
}

/* zoom buttons */
input#zoom-in {
  background-image: url(../images/zoom-in.svg);
}

input#zoom-out {
  background-image: url(../images/zoom-out.svg);
}

input.close {
  width: 35px;
  /* height: 35px; */
  font-size: 30px;
  font-weight: bolder;
  border-style: none;
  margin:0;
  padding: 0;
}

dt {
  margin-bottom: 1em;
}

#renderCanvas {
  width: 100%;
  height: 460px; /* changed from 100% */
  touch-action: none;
}

a.external::after {
  display: inline-block;
  background: transparent url(../images/link.svg) 0 0 no-repeat;
  /* background-size: auto; */
  background-size: 16px;
  content: "";
  height: 16px;
  margin-left: 3px;
  width: 16px;
}


section#popup, section#help, section#progress {
  opacity: 1;
  padding: 0 !important;
}

.flex {
  display: flex; 
}

.align-vert, .align-vert .align-center {
  align-items: center; 
}

.align-center { 
  justify-content: center; 
}

.modal-align {
  width: 100%;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.75);
  /* z-index: 999; */
}

.modal-container {
  /* position: relative; */
  width: 100%;
  /* max-width: 700px; */
  padding: 5px 5px 5px 5px;
  /* margin: 12px; */
  background: #fff;
  /* border-radius: 15px; */
  /* border-style: solid; */
  /* border-width: thin; */
  /* top: 5%; */
}

section#help .modal-align, section#progress .modal-align {
  /* position: absolute; */
  height: 100%;
  z-index: 999;
}

section#help .modal-container, section#progress .modal-container {
  width:auto;
  border-radius: 15px;
  border-style: solid;
  border-width: thin;
}

div.modal-close-x {
  right: 10px;
  float: right;
  top: 0;
}

.modal-close-x:hover {
  cursor: pointer;
}

div#popup-content {
  text-align: center;
  display: flex;
  justify-content: center;
}

div#popup-content img#image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}

svg {
  height: 400px;
}

svg.fullscreen {
  height: 740px;
}

img.thumb {
  border-style: solid;
  border-width: 0.5px;
  border-color: black;
}

/* Tooltips for accessability */
.tooltip {
  position: relative;
  height: 100%;
}

.tooltip .tooltiptext {
  min-width: 120px;
  position: absolute;
  right:0;
  top: 35px;
  margin-top: 5px;
  z-index: 1;
  background-color: white;
  color: black;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  border: solid thin black;
  font-weight: normal;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

span.tooltiptext[aria-hidden="true"] {
  display:none;  
}

span.tooltiptext[aria-hidden="false"] {
  display:block;
}
