.alert-error {
  background-color: #ffffff;
  color: #001e49;
  border: 3px solid #d4004b;
  border-radius: 3px;
}

.alert-error .pf-c-alert__title {
  color: #001e49;
}

.login-pf {
  background: #ffffff;
}

.login-pf body {
  background: #ffffff;
  color: #001e49;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  font-weight: normal;
}

.login-pf-page {
  flex: 1;
  padding-top: 90px;
  margin-bottom: 40px;
}

.dark-header {
  background: #001e49;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px -1px,
    rgba(0, 0, 0, 0.14) 0px 4px 5px 0px, rgba(0, 0, 0, 0.12) 0px 1px 10px 0px;
  display: flex;
  height: 60px;
  justify-content: space-between;
  left: 0;
  padding-left: 16px;
  padding-right: 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1008;
}

.dark-header a {
  margin-bottom: auto;
  margin-top: auto;
}

.header-logo {
  box-sizing: border-box;
  display: block;
  -moz-box-sizing: border-box;
  margin-bottom: 7px;
}

.header-help {
  box-sizing: border-box;
  color: #ffffff;
  display: block;
  font-size: 20px;
  -moz-box-sizing: border-box;
}

.light-header {
  background: #e5eaef;
  height: 40px;
  position: fixed;
  top: 60px;
  width: 100%;
  z-index: 1006;
}

.login-pf-header {
  font-size: 22px;
  font-weight: bold;
  max-width: 500px;
  min-width: 320px;
}

.login-pf-page .login-pf-header h1 {
  text-align: left;
}

.title-logo {
  margin: 6.25rem auto 24px auto;
  max-width: 600px;
  text-align: center;
  width: 540px;
}

.card-pf {
  border-radius: 4px;
  box-shadow: 0px 3px 10px #e5eaef;
  margin-left: auto;
  margin-right: auto;
  max-width: 540px;
  min-width: 320px;
}

h1#kc-page-title {
  font-size: 18px;
  font-weight: bold;
  margin-top: 0;
}

.card-divider {
  background: #1eae9c;
  border-radius: 4px;
  height: 4px;
  margin-left: -40px;
  margin-right: -40px;
}

.login-pf-page .card-pf p {
  color: #001e49;
}

.login-prompt {
  font-size: 16px;
  line-height: 18px;
  margin-top: 28px;
  margin-bottom: 16px;
}

.pf-c-form__label.pf-c-form__label-text {
  font-size: 16px;
}

.pf-c-input-group {
  border: 1px solid #001e49;
  border-radius: 5px;
}

.pf-c-input-group .pf-c-form-control {
  border: none;
}

.pf-c-input-group:has(> .pf-c-form-control[aria-invalid="true"]) {
  border-color: #d4004b;
}

.pf-c-form-control:not(textarea) {
  border: 1px solid #001e49;
  border-radius: 5px;
  height: 50px;
  padding: 16px;
  --pf-c-form-control--Color: #001e49;
  --pf-c-form-control--placeholder--child--Color: #001e49;
}

.pf-c-form-control:focus {
  padding-bottom: 16px;
  border-bottom-width: 1px;
}

.pf-c-form-control:focus-visible {
  outline-color: #001e49;
}

.pf-c-form-control:not(textarea)[aria-invalid="true"] {
  border-bottom-width: 1px;
  border-color: #d4004b;
  padding-bottom: 16px;
  --pf-c-form-control--invalid--BackgroundUrl: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23D4004B' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E");
}

label:has(+ .pf-c-form-control:not(textarea)[aria-invalid="true"]),
label:has(+ .pf-c-input-group > .pf-c-form-control[aria-invalid="true"]) {
  color: #d4004b;
  font-weight: bold;
}

.pf-c-button.pf-m-control {
  --pf-c-button--BorderRadius: 5px;
  --pf-c-button--after--BorderWidth: 0px;
  border: none;
}

.pf-c-form__helper-text.pf-m-error {
  color: #d4004b;
}

.password-help-text {
  font-size: 12px;
  text-align: center;
}

.pf-c-button {
  border: 2px solid #001e49;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  height: 50px;
}

.pf-c-button.pf-m-primary {
  background: #001e49;
  color: #fff;
}

.pf-c-button.pf-m-primary:hover {
  background: #325e91;
  color: #fff;
}

.password-update-prompt {
  color: #001e49;
  font-size: 16px;
  font-weight: normal;
  margin-bottom: 16px;
  margin-top: 28px;
}

.light-footer {
  align-items: end;
  background-image: linear-gradient(
      to bottom right,
      #ffffff 25%,
      transparent 25%
    ),
    linear-gradient(180deg, rgba(229, 234, 239, 1) 100%, transparent 100%);

  background-repeat: no-repeat, no-repeat;

  background-size: 200% 80%, 100% 100%;

  bottom: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  min-height: 240px; /* Avoid footer shrinking vertically on smaller screen sizes*/
  padding: 8px 48px 32px 48px;
  width: 100%;
  width: -moz-available; /* WebKit-based browsers will ignore this. */
  width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
}

.footer-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 12px 32px;
  width: 50%;
}

.footer-item {
  color: #001e49;
  font-size: 20px;
  margin-right: 30px;
  text-decoration: none;
}

.footer-logos {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  padding: 20px 32px;
  width: 50%;
}

.footer-logo {
  width: 220px;
}

.footer-logo-divider {
  background-color: #001e49;
  bottom: 50px;
  display: inline-flex;
  height: 110px;
  left: 50%;
  margin-left: 10px;
  width: 2px;
}

.dark-footer {
  background: #001e49;
  bottom: 0;
  height: 22px;
  left: 0;
  position: fixed;
  width: 100%;
}

.kc-form-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.kc-form-buttons button,
.kc-form-buttons input[type="submit"] {
  flex: 1;
  padding: 10px 20px;
  border-radius: 4px;
  max-width: 49%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.kc-form-buttons button:hover,
.kc-form-buttons input[type="submit"]:hover {
  background-color: #c4c9ce;
}

@media (max-width: 1279px) {
  .light-footer {
    background-size: 200% 50%, 100% 100%;
    flex-direction: column-reverse;
    min-height: 280px;
    padding-bottom: 32px;
  }

  .footer-items {
    width: 100%;
  }

  .footer-item {
    font-size: 18px;
    margin-right: 0;
    padding-left: 30px;
    padding-right: 30px;
  }

  .footer-logos {
    justify-content: flex-end;
    padding: 80px 30px 0 30px;
    width: 100%;
  }

  .footer-logo {
    width: 220px;
  }

  .footer-logo-divider {
    bottom: 160px;
    height: 100px;
  }
}

@media (max-width: 959px) {
  .header-logo {
    background: url(../img/Schulportal_SH_Bildmarke_RGB_Anwendung_HG_Blau.svg)
      no-repeat;
    height: 33px;
    /* this padding is necessary to move the old image out of the viewport */
    padding-left: 33px;
    width: 33px;
  }

  .header-help {
    background: url(../img/help-circle-outline.svg) 0 0 no-repeat;
    height: 24px;
    margin-right: 8px;
    text-indent: -99999em;
    width: 24px;
  }

  .login-pf-page .card-pf {
    margin-bottom: 20px;
  }

  .light-footer {
    padding: 0 16px 52px 16px;
  }

  .footer-logos {
    padding-right: 16px;
  }

  .footer-items {
    padding: 0 16px;
  }

  .footer-item {
    margin-right: 10px;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 767px) {
  .title-logo {
    width: 360px;
  }

  .login-pf-page .card-pf {
    max-width: 360px;
  }

  .card-divider {
    margin-left: -20px;
    margin-right: -20px;
  }

  .light-footer {
    min-height: 260px;
    background-size: 200% 30%, 100% 100%;
  }

  .footer-item {
    font-size: 16px;
    padding: 0;
  }

  .kc-form-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .kc-form-buttons button:first-child,
  .kc-form-buttons input[type="submit"]:first-child {
    margin-right: 0px;    
  }

  .kc-form-buttons button,
  .kc-form-buttons input[type="submit"] {
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .kc-form-buttons button:last-child,
  .kc-form-buttons input[type="submit"]:last-child {
    margin-bottom: 10px;
  }
}

#CancelButton {
  order: 1;
}

#SubmitButton {
  order: 2;
}

input:focus {
  outline: none;
}
