:root {
  --danger-border-color: rgb(220, 0, 0);
}

html {
  font: 12pt Helmet, Freesans, sans-serif;
  overflow-y: auto;
}

a {
  color: #455d7a;
  text-decoration:none;
}

a:hover {
  text-decoration:underline;
}

body {
  position:relative;
}

body > header {
  background-color:black;
  height:40px;
  color:white;
  display:flex;
  justify-content: space-between;
  align-items: center;
}

body > header div.menu {
  height:40px;
  width:32px;
  display:flex;
  align-items: center;
  justify-content: center;
}

body > header div.menu.selected {
  background-color:#333;
}

body > header h1 {
  flex:1;
  font-size: 14pt;
  margin:0;
  padding:0;;
  margin-left:8px;
}

body > header > .admin > img {
  background:white;
  border-radius: 50%;
  width:32px;
  margin-left:8px;
}

.container {
  display:flex;
  background: white;
  height:calc(100vh - 40px);
  position:absolute;
  width:100%;
}

.container nav {
  width:200px;
  background-color:#333;
  display:flex;
  flex-direction: column;
  color:white;
  height:100%;
}

.container nav a {
  padding:8px;
  color:lightgrey;
  text-decoration: none;
  width:100%;
  display:flex;
  align-items: center;
}

.container nav a svg {
  margin-right:8px;
}

.container nav li:hover {
  background-color:#666;
}

.container nav a.active,
.container nav a[aria-current="page"] {
  color:black;
  background-color:white;
}

.container nav ul ul li {
  padding-left:18px;
  background-color:#555;
}

.container .content {
  flex:1;
  padding:10px;
  overflow-y: auto;
}

.content table {
  width:100%;
  border:1px solid grey;
}

.content table tr {
  text-align: left;
}

.content table tr:nth-child(odd) {
  background-color:#eee;
}

.content table tr:hover {
  background-color: #ccc;
}

.content table tr td, .content table tr th {
  padding:4px;
}

.content table thead tr:first-child {
  background: rgb(0,0,0);
  background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgb(75, 75, 75) 100%);
  text-align:left;
  color:white;
  padding:4px;
}

.content table thead tr th:not(:first-child), .content table tbody tr td:not(:first-child) {
  border-left:2px groove lightgrey;
}

.content table tbody tr {
  cursor: pointer;
}

.selected, .content table tr.selected {
  background: #adbdd1;
}

.numberLink {
  display:flex;
  align-items: center;
  justify-content: flex-start;
}

.numberLink span {
  flex:1;
}

.numberLink svg {
  margin-left:10px;
  width:16px;
  height:16px;
}

.content header {
  display:flex;
  align-items: center;
  margin-bottom:8px;
}

.content h1 {
  font-weight:bold;
  font-size:20pt;
  flex:1;
}

.content header a {
  display:flex;
  align-items: center;
  text-decoration: none;
  font-size:10pt;
}

.container header a svg {
  margin-left:4px;
  height:16px;
  width:16px;
}

.container .details {
  margin-top:10px;
}

.container .details h2 {
  font-size:14pt;
  font-weight: bold;
  margin-bottom:8px;
}

.details.pods > div {
  display:flex;
}

.content .details table thead tr:first-child {
  background:none;
  background-color:#999;
  border-bottom:1px solid black;
}

/** Pod details **/
.details.pods {
  font-size:10pt;
}

.details.pods header {
  display:flex;
}

.details.pods table {
  width:100%;
}

.details .details-segment {
  margin-bottom:20px;
  margin-right:10px;
}

.details .details-segment:last-child {
  margin-bottom:0;
}

/** Pod History **/
.podHistory {
  border-left:1px solid #666;
  /* border-radius:8px; */
  /* background-color:#eee; */
  padding:8px;
  min-width:500px;
  white-space: nowrap;
  overflow-x:auto;
}

.podHistory .type-filter {
  display:flex;
  font-size:10pt;
  align-items: center;
  border-top:1px dotted grey;
  margin-top:8px;
  padding-top:8px;
}

.details.pods svg {
  width:16px;
  height:16px;
}

.podHistory .type-filter .disabled {
  color:grey;
}

.podHistory h3 {
  font-weight:bold;
  margin-bottom:8px;
  padding-bottom:8px;
  border-bottom:1px dotted grey;
}

.podHistory ul {
  margin:0;
  padding:0;
}

.podHistory li {
  display:flex;
  align-items: center;
  justify-content: flex-start;
  font-size:11pt;
}

.podHistory li svg {
  width:16px;
  height:16px;
  margin-left:4px;
}

.podHistory li .logTimestamp {
  color:grey;
  font-size:10pt;
  margin-right:4px;
  width:120px;
}

.details .dangerous {
  display:block;
  border:1px solid rgb(124, 0, 0);;
  border-radius:8px;
  padding:4px;
  background-color:rgb(250, 149, 149);
  width:200px;
}

.details .dangerous .exposure {
  font-weight:bold;
  color:rgb(124, 0, 0);
}

.details .dangerous .actionBox {
  display:none;
}

/** Pod Details **/
.podDetails {
  flex:1;
}

.podDetails h3 {
  font-weight: bold;
  margin-bottom:8px;
}

/** Detail Entry **/
.detailEntry {
  display:flex;
  flex-direction: column;
  font-size:10pt;
  min-width:150px;
}
.detailEntry .field {
  font-weight:bold;
}

/** Component versions **/
.component-versions li {
  display:flex;
}

.component-versions li span {
  flex:1;
}

input:invalid, select:invalid {
  box-shadow: 0px 0px 8px 1px var(--danger-border-color);
}

/* ----  Tooltip ---- */
[data-tooltip] {
  position: relative;
  z-index: 2;
  display: block;
}

[data-tooltip]:before,
[data-tooltip]:after {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
	transition: .2s ease-out;
	transform: translate(-50%, 5px)
}

[data-tooltip]:before {
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-bottom: 5px;
  padding: 7px;
	width: 100%;
  min-width: 70px;
	max-width: 250px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  background-color: #000;
  background-color: hsla(0, 0%, 20%, 0.9);
  color: #fff;
  content: attr(data-tooltip);
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
	transition: .2s ease-out
}

[data-tooltip]:after {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 0;
  border-top: 5px solid #000;
  border-top: 5px solid hsla(0, 0%, 20%, 0.9);
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: " ";
  font-size: 0;
  line-height: 0;
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  visibility: visible;
  opacity: 1;
	transform: translate(-50%, 0)
}
[data-tooltip=false]:hover:before,
[data-tooltip=false]:hover:after {
  visibility: hidden;
  opacity: 0;
}

/** General Subheader **/
header h2 {
  font-weight:bold;
  font-size:16pt;
}

/** Form cleanups **/
input, select {
  line-height:1.2em;
  padding:4px;
  outline: 1px solid grey;
  border:0;
  border-radius:2px;
}

input::placeholder {
  font-style: italic;
  font-size:9pt;
}

label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

select:not([selectedid]),
select:not([selectedid]) option:disabled {
  font-style: italic;
  font-size:9pt;
}

select:not([selectedid]) option {
  font-style:normal;
  font-size:initial;
}

/** Modal Dialogs **/
.modal h2 {
  font-size:16pt;
  font-weight:bold;
}

.modal label {
  font-weight:bold;
  text-align: right;
}

/** Form grid **/
.content-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1em;
}

.details header {
  display:flex;
}

.details header h2 {
  flex:1;
}

header .buttonBox {
  color: gray;
}

.buttonBox {
  display: flex;
}

.buttonBox > div {
  color:grey;
}

.buttonBox > div:hover {
  color:black;
}

.buttonBox > div.delete:hover {
  color:#ff3333;
}

.buttonBox button {
  margin-right: 8px;
}

.buttonBox button:last-child {
  margin-right: 0;
}

button {
  display:flex;
  align-items: center;
  justify-items: center;
  padding:4px;
}
button > svg {
  margin-right: 4px;
}