html,
body {
  height: 100%;
}

body {
  background-image: url("/cas/images/background-73d96938503db5e4ad115bf23a4c7236.jpg");
  background-size: cover;
  background-attachment: fixed;
}

.wrapper {
  min-height: 100%;
}

.wrapper .main {
  overflow: visible;
  padding-bottom: 40px;
}

.anim-fade-in {
  animation: fadeInAnimation ease 1.5s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

/**
 * Navigation section
 */
.navigation {
  background-color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(240,240,240,1) 100%);
}

.navigation .navbar-brand img {
  position: relative;
  top: 1px;
}

/**
 * Login section
 */
section.login {
  position: relative;
  width: 100%;
  max-width: 550px;
  padding: 15px;
  animation: fadeInAnimation ease 1.5s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

section.login-md {
  max-width: 720px;
}

/* Shift the login box slightly up for optical centering, only when there is enough vertical space. */
@media (min-height: 900px) {
  section.login {
    margin-top: -40px;
  }
}

section.login .box {
  background: #fff;
  color: #505050;
  padding: 1em;
  border-radius: 0.5em;
}

section.login .box, .box-shadow {
  box-shadow: 0 2px 1px -1px #0003, 0 1px 1px #00000024, 0 1px 3px #0000001f;
}

section.login input, section.login select {
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.05), 0 -1px 1px #fff, 0 1px 0 #fff;
}

section.login .checkbox label {
  cursor: pointer;
}

section.login .checkbox input {
  cursor: pointer;
  font-weight: 500;
  position: relative;
  top: 1px;
}

section.login .form-floating:focus-within {
  z-index: 2;
}

section.login .logo {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

section.login button > .spinner-border {
  position: relative;
  top: -2px;
  display: none;
}

/**
 * Password visibility toggle
 */
.password-field .form-control {
  padding-right: 3.25rem;
}

/* Keep Bootstrap's validation icon visible left of the toggle. */
.password-field .form-control.is-invalid {
  padding-right: 5.25rem;
  background-position: right 3.25rem center;
}

/* Hide the browser built-in reveal button (Edge), we provide our own. */
.password-field .form-control::-ms-reveal,
.password-field .form-control::-ms-clear {
  display: none;
}

.password-field .password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: calc(3.5rem + calc(var(--bs-border-width) * 2));
  padding: 0;
  border: 0;
  background: none;
  font-size: 1.2rem;
  color: #6c757d;
  cursor: pointer;
  transition: color .15s ease-in-out;
}

.password-field .password-toggle:hover,
.password-field .password-toggle[aria-pressed="true"] {
  color: #198754;
}

.password-field .password-toggle:focus-visible {
  outline: 0;
  color: #198754;
}

.password-field .password-toggle .bi {
  padding: 0.3rem;
  line-height: 1;
}

.password-field .password-toggle:focus-visible .bi {
  border-radius: 0.375rem;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/**
 * Login terms
 */
section.login .terms-notice {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #6c757d;
  text-align: center;
}

section.login .terms-notice > .bi {
  margin-right: 0.3em;
  color: #198754;
}

section.login .terms-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: #198754;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(25, 135, 84, 0.35);
  text-underline-offset: 3px;
  white-space: nowrap;
  cursor: pointer;
}

section.login .terms-toggle:hover,
section.login .terms-toggle:focus-visible {
  text-decoration-color: currentColor;
}

/**
 * Login terms modal
 */
.terms-modal .modal-header {
  border-bottom-color: #e3e6e8;
}

.terms-modal .modal-title {
  color: #333;
}

.terms-modal .terms-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.75rem;
  border-radius: 50%;
  font-size: 1.1rem;
  color: #198754;
  background: rgba(25, 135, 84, 0.1);
}

.terms-modal .modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #505050;
}

.terms-modal .terms-lead {
  margin-bottom: 1.5rem;
}

.terms-modal .terms-subtitle {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
}

.terms-modal .terms-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #f5f7f6;
}

.terms-modal .terms-list li + li {
  margin-top: 0.5rem;
}

.terms-modal .terms-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  color: #198754;
  background: rgba(25, 135, 84, 0.12);
}

.terms-modal .modal-footer {
  border-top-color: #e3e6e8;
}

/**
 * Footer
 */
footer {
  width: 100%;
  height: 40px;
  position: relative;
  margin-top: -40px;
  clear: both;
  color: #fff;
  background: linear-gradient(180deg, rgba(85,85,85,1) 0%, rgba(51,51,51,1) 100%);
  box-shadow: 0 -0.125rem .35rem rgba(0,0,0,.2);
}

footer a, footer a:hover {
  font-weight: 600;
  color: #fff;
}

/**
 * Services section
 */
section.services .service {
  background: #fff;
  color: #505050;
  padding: 1em;
  border-radius: 0.5em;
  margin-bottom: 1em;
  border-left: solid 5px #eee;
  animation: fadeInAnimation ease 1s;
  animation-fill-mode: forwards;
  opacity: 0;
  box-shadow: 0 2px 1px -1px #0003, 0 1px 1px #00000024, 0 1px 3px #0000001f;
}

section.services .service:nth-child(2) {
  animation-delay: .25s;
}

section.services .service:nth-child(3) {
  animation-delay: .5s;
}

section.services .service:nth-child(4) {
  animation-delay: .75s;
}

section.services .service:nth-child(5) {
  animation-delay: 1s;
}

section.services .service:nth-child(n+6) {
  animation-delay: 1.25s;
}

section.services .service .logo {
  max-width: 110px;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/**
 * Logout - services notified about single logout
 */
section.login .logout-services .list-group-item {
  font-size: 0.9rem;
  color: #505050;
}

section.login .logout-services .bi {
  font-size: 1.1rem;
  color: #6c757d;
}

/**
 * Errors
 */
.error {
  text-align: center;
  background: #fff;
  color: #505050;
  padding: 1em;
  border-radius: 0.5em;
}

/**
 * CAS views rendered in IMTM layout (templates/layout.html), e.g. OIDC consent or weak password.
 * They use CAS (Material) markup, so map it onto the IMTM look.
 */
section.cas-view .card,
section.cas-view .mdc-card {
  border: 0;
  border-radius: 0.5em;
  box-shadow: 0 2px 1px -1px #0003, 0 1px 1px #00000024, 0 1px 3px #0000001f;
}

section.cas-view .card:not(.alert) {
  color: #505050;
}

section.cas-view h1 {
  font-size: 1.5rem;
}

section.cas-view h2,
section.cas-view h3 {
  font-size: 1.15rem;
}

section.cas-view .bg-primary {
  color: #333 !important;
  background: #f5f7f6 !important;
  border-radius: 0.375rem;
}

section.cas-view .btn-primary {
  --bs-btn-bg: #198754;
  --bs-btn-border-color: #198754;
  --bs-btn-hover-bg: #157347;
  --bs-btn-hover-border-color: #146c43;
  --bs-btn-active-bg: #146c43;
  --bs-btn-active-border-color: #13653f;
  --bs-btn-disabled-bg: #198754;
  --bs-btn-disabled-border-color: #198754;
  --bs-btn-focus-shadow-rgb: 60, 153, 110;
}

section.cas-view .mdc-linear-progress {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(25, 135, 84, 0.15);
}

section.cas-view .mdc-linear-progress > * {
  display: none;
}

section.cas-view .mdc-linear-progress::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  background: #198754;
  animation: progressIndeterminate 1.2s ease-in-out infinite;
}

/**
 * Captcha
 */
.captcha-area .captcha-img {
  display: flex;
  margin-right: 5px;
  height: 80px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  user-select: none;
  border-radius: 5px;
  position: relative;
}

.captcha-img img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
  opacity: 0.95;
}

.captcha-img .captcha {
  position: absolute;
  left: -5%;
  top: -20px;
  width: 100%;
  height: 80px;
  color: black;
  font-family: cursive !important;
  font-style: italic !important;
  font-size: 50px !important;
  text-align: center;
  font-weight: bold;
  letter-spacing: 10px;
  transform-origin: top left;
  transform: skew(36deg, 4deg);
  text-shadow: 0px 0px 2px #b1b1b1;
}

/**
 * Password policy
 */
.password-progress {
  height: 30px;
  font-size: 0.85em;
}

/**
 * Simple MFa token field.
 */
#simple-mfa-token {
  font-family: monospace;
}

/**
 * Animations
 */
@keyframes fadeInAnimation {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes progressIndeterminate {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

@keyframes slideDownAnimation {
  0% {
    opacity: 0;
    bottom: 40px;
  }
  100% {
    opacity: 1;
    bottom: 0px;
  }
}