:root {
  --community: #EDC334;
  --ambition: #DC3C2B;
  --respect: #1CBA5E;
  --excellence: #4582E1;
  --community-hover: #EDC33444;
  --ambition-hover: #DC3C2B44;
  --respect-hover: #1CBA5E44;
  --excellence-hover: #4582E144;
}

html {
  position: relative;
  min-height: 100%;
  scrollbar-gutter: stable both-edges;
}

html.waiting, html.waiting * {
  cursor: progress;
}

object {
  user-select: none;
  cursor: default;
}

h1 {
  font-size: 1.25rem;
}

h2 {
  font-size: 1.15rem;
}

a {
  color: #0366d6;
  cursor: pointer;
}

.material-icons {
  vertical-align: middle;
  position: relative;
  top: -2px;
}

#refresh .material-icons {
  top: -1px;
}

.navbar-nav {
  position: relative;
  top: 1px;
  gap: 4px;
}

.navbar-light .navbar-nav span.nav-link, .navbar-light .navbar-nav span.nav-link:hover {
  color: rgba(0,0,0,.3);
}

#period {
  display: inline-block;
  width: 90px;
  text-align: center;
  background-color: #f3f3f3;
  padding: 3px 6px;
}

#refresh {
  cursor: default;
  color: #ccc;
  margin: 0 10px;
}

#refresh.clickable:hover {
  cursor: pointer;
  color: #999;
}

#refresh.spinning i {
  animation: spin 1s linear infinite;
}

#refresh.outdated {
  color: red;
}

#activity.outdated .student {
  opacity: 0.5;
}

@keyframes spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

#map-container {
  position: relative;
}

#map {
  max-height: calc(100vh - 100px);
}

path.room:hover {
  box-shadow: 0 0 40px 20px #0ff;
}

#tooltip {
  position: absolute;
  border: solid 1px #666;
  padding: 3px 6px;
  background-color: #fff;
  display: none;
  white-space: pre;
  z-index: 1;
}

#filter {
  width: 120px;
}

#activity {
  position: relative;
  height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 20px;
  margin-top: 10px;
}

.student {
  margin-top: 20px;
  border: solid 2px #ddd;
  padding: 12px 12px 6px;
}

.student:hover {
  border-color: #999;
}

.studentlinks {
  float: right;
  font-size: 9pt;
  position: relative;
  top: 2px;
}

.incidents > li {
  font-size: 10pt;
  margin-top: 10px;
}

.comments {
  font-size: 9pt;
  font-style: italic;
}

.comments > li {
  margin: 6px 0;
}

.newcomment {
  width: 100%;
  border: solid 1px #eee;
}

.resolve {
  font-style: normal;
}

.unwell {
  color: green;
  font-weight: bold;
}

.detentions {
  background-color: #f3f3f3;
  margin: 12px 0;
  padding: 12px;
  font-size: 9pt;
}

.detentions table {
  text-align: center;
  margin: 12px 0;
  width: 100%;
  background-color: #fff;
}

.detentions table td, .detentions table th {
  border: solid 1px #ddd;
  padding: 4px 10px;
  text-align: left;
  vertical-align: top;
}

.detentions table th:first-child {
  width: 100px;
}

.reason {
  width: 100%;
  margin: 4px 0;
}

#awards {
  border-collapse: collapse;
  width: 100%;
  font-size: 10pt;
  margin-top: 24px;
}

#awards td, #awards th {
  border: 1px solid #ccc;
  padding: 3px 6px;
  vertical-align: top;
}

#awards td {
  height: 64px;
}

#awards th:nth-child(1) { width: 5%; }
#awards th:nth-child(2) { width: 13%; }
#awards th:nth-child(3) { width: 18%; }
#awards th:nth-child(4) { width: 20px; }
#awards th:nth-child(6) { width: 18%; }

#awards select {
  width: 100%;
  border-width: 2px;
}
#awards textarea {
  width: 100%;
  height: 52px;
  resize: none;
  margin: 0;
  border-width: 2px;
}

#awards .error {
  color: red;
  font-weight: bold;
  font-size: 8pt;
}

#awards .message {
  font-weight: bold;
}

#awards .unsubmit {
  font-size: 8pt;
  border-width: 1px;
  margin-top: 4px;
}

#awards .valid {
  border-color: green;
  outline-color: green;
}

#awards .invalid {
  border-color: red;
  outline-color: red;
}

#interim {
  font-family: Arial;
  font-size: 10pt;
  background-color: grey;
  padding: 1.27cm 0 6cm;
  margin-top: 12px;
  line-height: initial;
}

#interim article {
  width: 21cm;
  margin: auto;
  background-color: white;
  padding: 1.27cm;
  margin: auto;
}

#interim article * {
  box-sizing: initial;
}

td.col-impact:has(.review-area) {
  position: relative;
  padding-bottom: 16px;
}

.review-area {
  position: absolute;
  bottom: 0;
  right: 4px;
}

.review {
  display: inline-block;
  width: 10px;
  height: 10px;
}

a.review-N { background-color: #999; }
a.review-R { background-color: #f00; }
a.review-A { background-color: #fb0; }
a.review-G { background-color: #0b0; }

td.review-N { background-color: white; }
td.review-R { background-color: #f002; }
td.review-A { background-color: #fb02; }
td.review-G { background-color: #0b02; }

#idcard {
  width: 100%;
  margin-bottom: 12px
}

select#student {
  width: 100%;
}

#current-card {
  background-color: #eee;
  padding: 18px;
}

#current-card-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#current-card-main a {
  text-decoration: none;
  font-weight: bold;
  color: #666;
}

#current-card-assignee {
  margin-top: 24px;
}

#current-card.recognised {
  background-color: #ceebff;
}

#current-card.not-recognised {
  background-color: #ecf7ff;
}

#current-student {
  padding: 18px;
  margin-top: 12px;
}

#current-student.detention-30 {
  background-color: #ffffd2;
}

#current-student.detention-60 {
  background-color: #ffe3e3;
}

#current-student.no-detention {
  background-color: #e3ffe3;
}

#current-student h2 {
  font-size: 18pt;
  font-weight: bold;
  margin-bottom: 6px;
}

.button {
  text-decoration: none;
  border: 1px solid #666;
  color: #222;
  padding: 6px 12px;
  background-color: #f2f2f2;
  display: inline-block;
  text-align: center;
  margin-right: 8px;
}

.button:hover {
  background-color: #e6e6e6;
}

.button.disabled, .button.disabled:hover {
  cursor: default;
  background-color: #f2f2f2;
  color: #888;
  border-color: #999;
}

#current-detention .button {
  width: 120px;
}

#duration {
  font-size: 24pt;
  position: relative;
  top: 5px;
  margin-right: 4px;
}

#reason {
  margin-top: 12px;
  font-style: italic;
}

#no-current-detention {
  margin-top: 18px;
}

.attended {
  background-color: #00bf00;
}

option.attended:checked {
  background-color: #00dd00;
}

.button.attended:hover {
  background-color: #00cc00;
}

select#student option {
  padding: 3px 0;
}