:root {
  --color-primary: #14854f;
}

*,
*::before,
*::after {
  -webkit-box-sizing: inherit;
          box-sizing: inherit;
}

body {
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.2rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover:not(.button) {
  opacity: 0.75;
}

p {
  margin-top: 0;
}

aside.topnav {
  width: 95vw;
}

div.app-content {
  width: 95vw;
  height: 95vh;
}

.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0;
  margin-bottom: 0;
  line-height: 1.5;
  max-width: 72em;
  border-bottom: solid 1px lightgray;
}

.app-header div {
  margin-right: 1em;
}

/* Buttons */
button {
  font-family: inherit;
  font-size: 100%;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  color: black;
  background-color: lightgray;
}

button[type=submit] {
  background-color: var(--color-primary);
  color: white;
}

div.container, form.container {
  padding: 1em;
  border: solid 1px red;
}

main.container {
  max-width: 72em;
  height: 90vh;
}

main.container-fluid {
  padding-top: 0;
  width: 100%;
  height: 90vh;
}

.logo {
  font-size: x-large;  
  color: var(--color-primary);  
  text-decoration: none;
}

.menu a {
  text-decoration: none;
  padding-right: 1em;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

table thead th th, table tbody tr td {
  padding-top: 0.1em;
  padding-bottom: 0.1em;
}

td a {
  text-decoration: none;
}

/* Forms */
form fieldset {
  display: flex;
  flex-direction: column;
}

fieldset article {
  margin-bottom: 1em;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;  
}

fieldset article section {
  display: flex;
  flex-direction: column;
  margin-right: 1em;
  margin-bottom: 0.5em;
}

fieldset article:has(button) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

fieldset article button {
  margin-right: 1em;
}

button[type="submit"] {
  min-width:12em;
  max-width: max-content;
}

p.message {
  width: 90%;
  border: solid 2px black;
  padding: 0.5em;
}

p.error {
  border:solid 2px red;
  color: red;
}

p.validation-error {
  color: red;
  font-size: small;
  margin-bottom: 0;  
}

input:not([type="checkbox"], [type="radio"]), select, textarea {
  font-size: 100%;
  margin-bottom: 0;
  font-weight: lighter;
}

label {
  font-weight: 600;
}

/* Pager */
div.pager {
  font-size: medium;
}

div.pager button {
  padding: 0.5em;
  margin-right: 0.5em;
}

div.pager span {
   padding: 1em; 
   border: solid 1px blue;
   margin-right: 0.5em;
}

/* Widths */
.wd-4 {
  width: 4em;
}
.wd-8 {
  width: 8em;
}
.wd-10 {
  width: 10em;
}
.wd-12 {
  width: 12em;
}
.wd-16 {
  width: 16em;
}
.wd-24 {
  width: 24em;
}
.wd-32 {
  width: 32em;
} 
.wd-40 {
  width: 40em;
}
.wd-48 {
  width: 48em;
}
.wd-56 {
  width: 56em;
}
.wd-64 {
  width: 64em;
}

/* Alerts */

div.alert {
  position: fixed;
  top: 4em;
  width: 100%;  
  padding: 0.5em;
  z-index: 1000;  
  border: solid 2px green;
  background-color: green;
  color: white;
  padding: 1em;  
  padding-bottom: 0.7em;
  width: 96%;
}

div.alert button {  
  position: absolute;
  right: 0.05em;
  top: 0.05em;
}

div.alert.alert-warning {
  border: solid 2px black;
  background-color: yellow;
  color: black;
}

div.alert.alert-error {
  border: solid 2px red;
  background-color: red;
  color: yellow;
}

/* FixedHeaderTable */
table.fixed-header-table {
  border-collapse: collapse;
  margin: 1em;
  line-height: 1.4;
  /* max-width: 90vw; */
  /* width:min-content; */
}

table.fixed-header-table th, td {
  padding: 8px;
  text-align: left;
  border: 1px solid #ddd;
}

table.fixed-header-table thead, table.fixed-header-table tbody{
  display: block;
}

table.fixed-header-table thead {
  background-color: #f1f1f1;
  font-size: 80%;
}

table.fixed-header-table tbody {
  height: 78vh;
  overflow-y: auto;
  scrollbar-width: thin;
  font-size: 75%;
}

table.fixed-header-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

table.fixed-header-table thead tr th,
table.fixed-header-table tbody tr td {
  padding: 0px 0px 0px 1.3333px;
  /* width: 23em; */
  min-width: 0;
}

@media screen and (max-width: 1200px) {
  body {
    font-size: 0.9rem;
  }
  
  table.fixed-header-table tbody {
    height: 70vh;
  }
}

@media screen and (max-width: 1024px) {
  body {
    font-size: 0.8rem;
  }

  table.fixed-header-table tbody {
    height: 70vh;
  }
}

@media screen and (max-width: 900px) {
  body {
    font-size: 0.8rem;
  }

  table.fixed-header-table tbody {
    height: 74vh;
  }
}

@media screen and (max-width: 800px) {
  body {
    font-size: 0.7rem;
  }

  table.fixed-header-table tbody {
    height: 70vh;
  }
}