/*-----------------------------------*\

  Temporary header content (Needs refactoring)

\*-----------------------------------*/
body.login #auth-content {
  background: #0b053b;
  height: 100%;
  color: white;
}
.temporary-header {
  text-align: center;
  padding: 3em;
}

.temporary-header h1 {
  font-weight: 500;
  margin: 0;
}

.temporary-header h2 {
  font-size: 0.7em;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
}

footer {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6em;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  vertical-align: middle;
}
footer img {
  margin: 1em;
  margin-right: 0.5em;
}
footer a {
  color: white;
}
footer .left-part {
  vertical-align: middle;
  display: inline-block;
  height: 6em;
  position: absolute;
  right: 0;
  bottom: 0;
}
footer a:hover {
  color: white;
  text-decoration: underline;
}
footer table {
  margin: 0.5em;
}

#region-settings {
  display: inline-block;
  padding: 3px;
  padding-right: 10px;
  float: right;
}
.flag.inactive {
  opacity: 0.25;
  filter: alpha(opacity=40); /* msie */
}
.flag.active {
  border-radius: 50%;
  border: #cccccc thin solid;
}
footer table a.info,
footer table a.info:visited {
  display: inline-block;
  font-size: 1em;
  background: rgb(255, 128, 0);
  color: #fff;
  margin: 0.5em 0;
  text-transform: uppercase;
  padding: 0 0.5em;
}
.add-new-site-card,
.farm-selection-card {
  display: inline-block;
  vertical-align: top;
}

.alarmswitch {
  position: relative;
  top: 5px;
  margin-left: 1em;
  width: 60px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  display: inline-block;
}
.alarmswitch-checkbox {
  display: none;
}
.alarmswitch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  height: 18px;
  padding: 0;
  line-height: 18px;
  border: 2px solid rgb(243, 165, 15);
  border-radius: 9px;
  background-color: rgb(243, 165, 15);
  transition: background-color 0.15s cubic-bezier(0.26, -0.6, 0.945, 1.65), border-color 0.15s ease-in;
  -webkit-box-shadow: inset 0px 2px 5px 0 rgba(0, 0, 0, 0.26);
  -moz-box-shadow: inset 0px 2px 5px 0 rgba(0, 0, 0, 0.26);
  box-shadow: inset 0px 2px 5px 0 rgba(0, 0, 0, 0.26);
}
.alarmswitch-label:before {
  content: "";
  display: block;
  width: 30px;
  margin: 0px;
  background: #ffffff;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 26px;
  border: 2px solid rgb(243, 165, 15);
  border-radius: 9px;
  transition: all 0.15s ease-in 0s;
}
.alarmswitch-checkbox:checked + .alarmswitch-label {
  background-color: rgb(228, 12, 12);
}
.alarmswitch-checkbox:checked + .alarmswitch-label,
.alarmswitch-checkbox:checked + .alarmswitch-label:before {
  border-color: rgb(228, 12, 12);
}
.alarmswitch-checkbox:checked + .alarmswitch-label:before {
  right: 0px;
}

/*-----------------------------------*\

  Authentication content (Needs refactoring)

\*-----------------------------------*/

.auth-wrap {
  margin: 0em 2em;
  text-align: center;
}

.auth-wrap article {
  margin: 2em auto 0 auto;
}

/*-----------------------------------*\

  Login box (Needs refactoring, a lot)

\*-----------------------------------*/
#farm-list {
}
#farm-list ul {
  margin: 0;
}
#farm-list ul li {
  height: 9.75em;
  vertical-align: top;
}
#site-search {
  font-size: 0.7em;
  height: 1.4em;
  margin-right: 0.3em;
}
#frequency-table_filter {
  display: inline-block;
  position: absolute;
  right: 0;
}
a.paginate_button.current {
  cursor: default;
  opacity: 0.5;
}
ul.dashed li:nth-child(odd) .site-item-bg-fade {
  background: rgb(244, 244, 244);
  position: absolute;
  width: 20%;
  top: 0;
  right: 40%;
  height: 9.75em;
  z-index: -1;
  background: -moz-linear-gradient(left, rgba(244, 244, 244, 1) 0%, rgba(244, 244, 244, 0) 100%); /* FF3.6+ */
  background: -webkit-gradient(
    linear,
    left top,
    right top,
    color-stop(0%, rgba(244, 244, 244, 1)),
    color-stop(100%, rgba(244, 244, 244, 0))
  ); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(left, rgba(244, 244, 244, 1) 0%, rgba(244, 244, 244, 0) 100%); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(left, rgba(244, 244, 244, 1) 0%, rgba(244, 244, 244, 0) 100%); /* Opera 11.10+ */
  background: -ms-linear-gradient(left, rgba(244, 244, 244, 1) 0%, rgba(244, 244, 244, 0) 100%); /* IE10+ */
  background: linear-gradient(to right, rgba(244, 244, 244, 1) 0%, rgba(244, 244, 244, 0) 100%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#00f4f4f4',GradientType=1 ); /* IE6-9 */
}
.site-item-bg-image-cropper {
  position: absolute;
  width: 60%;
  top: 0;
  right: 0;
  height: 9.75em;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 2s;
  transition-delay: 0.75s;
  opacity: 0;
  z-index: -3;
}
.site-item-bg-image {
  background-size: cover;
  position: absolute;
  width: calc(35em + 20px);
  top: -10px;
  bottom: -10px;
  right: -10px;
  height: calc(9.75em + 20px);
  z-index: -4;
  background-position: center;
  /*-webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -ms-filter: blur(5px);
    filter: blur(5px);*/
}
.site-item-bg-image-cropper.show {
  opacity: 1;
}
.site-item-bg-cover {
  background: rgba(255, 255, 255, 1);
  opacity: 0.75;
  position: absolute;
  width: 60%;
  top: 0;
  right: 0;
  height: 9.75em;
  z-index: -2;
  transition: opacity 1s;
  -webkit-transition: opacity 1s;
}
#farm-list ul li:hover .site-item-bg-cover {
  opacity: 0.5;
}
ul.dashed li:nth-child(even) .site-item-bg-fade {
  background: rgb(250, 250, 250);
  position: absolute;
  width: 20%;
  top: 0;
  right: 40%;
  height: 9.75em;
  z-index: -1;
  background: -moz-linear-gradient(left, rgba(250, 250, 250, 1) 0%, rgba(250, 250, 250, 0) 100%); /* FF3.6+ */
  background: -webkit-gradient(
    linear,
    left top,
    right top,
    color-stop(0%, rgba(250, 250, 250, 1)),
    color-stop(100%, rgba(250, 250, 250, 0))
  ); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(left, rgba(250, 250, 250, 1) 0%, rgba(250, 250, 250, 0) 100%); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(left, rgba(250, 250, 250, 1) 0%, rgba(250, 250, 250, 0) 100%); /* Opera 11.10+ */
  background: -ms-linear-gradient(left, rgba(250, 250, 250, 1) 0%, rgba(250, 250, 250, 0) 100%); /* IE10+ */
  background: linear-gradient(to right, rgba(250, 250, 250, 1) 0%, rgba(250, 250, 250, 0) 100%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fafafa', endColorstr='#00fafafa',GradientType=1 ); /* IE6-9 */
}

li.site_item {
}

.red-active,
.amber-active,
.blue-active {
  font-weight: bold;
  font-style: italic;
}

.red-active {
  color: rgb(167, 9, 9);
}
.amber-active {
  color: rgb(178, 120, 11);
}
.blue-active {
  color: rgb(83, 138, 196);
}
@keyframes drivetrain-appear {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  75% {
    opacity: 0.75;
  }
  100% {
    opacity: 1;
  }
}
.drivetrain-modeller-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000123;
  animation-name: drivetrain-appear;
  animation-duration: 1s;
  animation-timing-function: ease-out;
  transform-origin: 50% 50%;
}
.drivetrain-modeller-content {
  background: #fafafa;
  position: fixed;
  left: calc(50% - 320px);
  right: calc(50% - 320px);
  top: calc(50% - 180px);
  bottom: calc(50% - 240px);
  border-radius: 8px;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  -webkit-box-shadow: 10px 10px 37px 0px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: 10px 10px 37px 0px rgba(0, 0, 0, 0.75);
  box-shadow: 10px 10px 37px 0px rgba(0, 0, 0, 0.75);
  padding: 1em;
  border-top: solid 1px #888;
  vertical-align: top;
}
.drivetrain-modeller-content > input {
  position: absolute;
  right: 1em;
  bottom: 1em;
  width: 5em;
}
.drivetrain-modeller-content .bg-img {
  -webkit-filter: blur(10px);
  -moz-filter: blur(10px);
  -o-filter: blur(10px);
  -ms-filter: blur(10px);
  background-position: center;
  background-size: cover;
  filter: blur(5px);
  opacity: 0.2;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  pointer-events: none;
}
.drivetrain-modeller-title {
  position: fixed;
  left: calc(50% - 320px);
  top: calc(50% - 240px);
  background: #fafafa;
  right: calc(50% - 280px);
  bottom: calc(50% + 200px);
}
.drivetrain-modeller-title:before {
  position: fixed;
  left: calc(50% + 280px);
  top: calc(50% - 240px);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 40px 0 0 40px;
  border-color: transparent transparent transparent #fafafa;
  display: block;
  content: " ";
}
.drivetrain-modeller-title:after {
  position: fixed;
  left: calc(50% - 320px);
  top: calc(50% - 200px);
  background: #fafafa;
  right: calc(50% - 320px);
  bottom: calc(50% + 180px);
  display: block;
  content: " ";
}
.drivetrain-modeller-title h2 {
  margin: 0.5em 0.75em;
  font-weight: 100;
}
.notification-container {
  min-height: 34em;
  /*overflow-y: scroll;*/
  overflow-x: visible;
}
.notification {
  background: white;
  -webkit-box-shadow: 0px 2px 8px -1px rgba(0, 0, 0, 0.18);
  -moz-box-shadow: 0px 2px 8px -1px rgba(0, 0, 0, 0.18);
  box-shadow: 0px 2px 8px -1px rgba(0, 0, 0, 0.18);
  margin: 2em 1em;
  min-height: 100px;
  padding: 0;
  font-size: 0.8em;
}
.notification-has-url * {
  cursor: pointer;
}
.notification table {
  width: 100%;
}
.notification td {
  vertical-align: middle;
  padding-bottom: 0;
  padding-top: 0;
}
.flare-color {
  width: 7px;
  background: red;
  height: 100px;
  padding: 0;
}
.author-picture {
  margin-top: -6px;
  margin-bottom: 10px;
  width: 64px;
  height: 64px;
}
.author-picture img {
  border-radius: 50%;
  overflow: hidden;
  width: 64px;
  height: 64px;
}
.author {
  padding: 10px 15px;
  text-align: center;
  font-size: 1.2em;
  width: 64px;
}
.content-table {
  min-height: 100px;
  width: 100%;
}
.notification-content-row {
  min-height: 44px;
}
.notification-title {
  font-size: 1.5em;
  font-weight: bold;
  padding-top: 5px;
  vertical-align: text-bottom;
}
.notification-subtitle {
  padding-top: 5px;
  padding-right: 15px;
  text-align: right;
  vertical-align: text-bottom;
}
.notification-content {
  padding-right: 15px;
  vertical-align: middle;

  overflow-x: hidden;
  overflow-y: visible;
}
.notification-content-message-wrap {
  min-height: 44px;
  overflow-x: hidden;
  overflow-y: visible;
  vertical-align: middle;
  /*width: 345px;*/
}
.notification-content-message {
  min-height: 44px;
  vertical-align: middle;
  display: table-cell;
  overflow-x: hidden;
  overflow-y: visible;
  max-width: 345px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.notification-content-message > * {
  display: none;
}
.notification-date {
  padding-bottom: 5px;
  padding-right: 15px;
  text-align: right;
  vertical-align: text-bottom;
}
.notification-origin {
  padding-bottom: 5px;
  vertical-align: text-bottom;
}
.oauth-login {
  margin-top: -10px;
}
.oauth-login button {
  width: 427px;
}
.oauth-login p {
  text-align: center;
}

/* V2 */
#authentication {
  height: 100%;
}

.login-page {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  width: 100%;
  height: 100%;
}

/* Improve input a11y on just the login page. Not sure of the implications of
doing this site-wide. */
.login-page *:focus-visible {
  outline: revert !important;
}

.login-page__ball {
  max-width: min(50vh, 50vw, 750px);
  max-height: min(50vh, 50vw, 750px);
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  container-type: inline-size;
  container-name: ball;
}

.login-page__ball:first-child {
  align-self: end;
  justify-self: start;
}

.login-page__ball:last-child {
  align-self: start;
  justify-self: end;
}

@container ball (max-width: 140px) {
  .login-page__ball__svg {
    display: none;
  }
}

@media screen and (max-width: 750px) {
  .login-page {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto 1fr;
  }

  .login-page__ball {
    width: auto;
    height: 100%;
  }

  .login-page__ball:first-child {
    grid-row: 3;
  }

  .login-page__ball:last-child {
    grid-row: 1;
  }

  .login-form {
    justify-self: center;
  }
}

.login-form {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 1em;
  max-width: calc(450px + 2em);
  box-sizing: border-box;
  width: 100%;
  padding: 0 1em;
}

.login-form__logo {
  width: 100%;
}

.login-form__message {
  color: #010101;
  background-color: rgba(255, 218, 194, 0.7);
  border: 1px solid rgb(255, 186, 127);
}

.login-form__submission {
  display: grid;
  grid-template-columns: 1fr minmax(auto, 93px);
  grid-template-rows: auto 1fr auto 1fr;
  row-gap: 0.5em;
  column-gap: 1em;
}

.login-form__submission__label,
.login-form__submission__input {
  grid-column: 1;
}

.login-form__submission__label {
  display: block;
  letter-spacing: 1px;
  font-size: 0.8em;
}

.login-form__submission__input input {
  width: 100%;
}

.login-form__submission__submit {
  grid-column: 2;
  grid-row: 2 / span 3;
  aspect-ratio: 1 / 1;
  height: 100%;
  background-color: rgba(255, 255, 255, 1);
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.login-form__submission__submit .icon {
  font-size: 3em;
}

.login-form__or {
  text-align: center;
  width: 100%;
}

.login-form__sso {
  width: 100%;
}

.login-form__company-logo {
  width: 40%;
  min-width: 100px;
  margin: 0 auto;
  display: block;
}

.visually-hidden {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Star button and star filter styles */
.star-button-wrapper {
  display: inline-grid;
  place-items: center;
  height: 40px;
}
.star-button {
  /* tuck in the star position, probably a better way to do this but didn't want to mess with the existing elements too much */
  margin-left: -0.5em;
  margin-top: -0.2em;
  margin-right: -0.3em;
  color: #666;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Override global hover and active rules to remove shadow/borders */
.star-button,
.star-button:hover,
.star-button:active {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
  color: inherit !important;
}

.star-button .star .star-outline { stroke: var(--star-color, #666); }
.star-button .star .star-fill   { fill:   var(--star-color, #666); }

.star-button[aria-pressed="false"] { --star-color: #666; }
.star-button[aria-pressed="true"]  { --star-color: #f5a623; }

.star-button:hover                { --star-color: #888; }
.star-button[aria-pressed="true"]:hover { --star-color: #f7b347; }

.star-button[aria-pressed="true"] { color: #f5a623; }

.star-fill { transition: opacity 120ms ease; }
.star-button[aria-pressed="true"] .star-fill { opacity: 1; }

li[hidden] { display: none !important; }

.filter-starred {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  vertical-align: middle;
  font-size: 0.8em;
}
