/* CERN theme for the Keycloak login page */

html {
  height: auto;
  min-height: 100vh;
  background-color: #fbfbfb;
  background-image: none;
  overflow-x: hidden;
}

/* --pf-global--primary-color--100 is defined in web_modules/@patternfly/react-core/dist/styles/base.css */
a {
  color: var(--pf-global--primary-color--100);
  font-weight: bold;
}

.bottom-top-margin {
  margin-top: 20px;
  margin-bottom: 20px;
}

#kc-attempted-username {
  display: inline;
}

#kc-username {
  padding: 10px;
}

.subtitle {
  color: black;
}

.login-pf body {
  height: auto;
  background-color: #fbfbfb;
  background-image: none;
}

.reminder-oc5 {
  border: 1px solid #cfcfcf;
  background-color: #fafafa;
  padding: 5px 10px;
  margin-top: 25px;
  color: #404040;
}

.social-privacy-notice {
  margin-top: -10px;
  margin-bottom: 5px;
  color: #404040;
}

.login-pf-page {
  min-height: 100vh;
  padding-top: 0 !important;
}

.login-pf-page-header {
  background-image: url(../img/bg.jpg);
  background-size: cover;
  background-color: black;
  height: 150px;
}

#kc-header-wrapper {
  font-size: 34px;
  padding-top: 70px;
  white-space: normal;
  font-weight: 400;
  text-shadow: 2px 0 2px black, 0 2px 2px black, -2px 0 2px black,
  0 -2px 2px black, 0 0 2px black;
  text-transform: none;
  color: white;
}

.sub-providers hr.less-space-below {
  margin-bottom: 10px;
}

.sub-providers hr.more-space-below {
  margin-bottom: 20px;
}

.login-form-caption-small {
  text-align: center;
  margin-bottom: 10px;
}

.login-form-caption-small h2 {
  font-weight: 200;
  font-size: 16px;
  color: #020202;
}

.login-form-caption-large {
  text-align: center;
  margin-bottom: 30px;
}

.login-form-caption-large h2 {
  margin: 5px 0;
  font-weight: 400;
  font-size: 18px;
}

#kc-social-providers ul {
  padding: 0;
}

#kc-social-providers li:first-of-type {
  margin-top: 0;
}

#kc-locale {
  text-align: right;
  z-index: 9999;
}

/* Large header for high resolution screens */
@media (min-height: 1100px) {
  .login-pf-page-header {
    height: 200px;
  }

  #kc-header-wrapper {
    font-size: 45px;
    padding-top: 88px;
  }
}

/* Narrow header for phones */
@media (max-width: 767px) {
  #kc-header-wrapper {
    font-size: 35px;
    letter-spacing: 0;
    padding-right: 0;
  }
}

.card-pf {
  border: 1px solid #ccc;
  box-shadow: 2px 2px 3px #ddd;
}

/* Desktop: mimic old wide layout from PatternFly 3 */
@media (min-width: 841px) {
  .login-pf-accounts {
    max-width: 840px;
    display: flex;
  }

  .login-pf-accounts #kc-form-wrapper {
    float: left;
    width: 50%;
    padding-right: 40px;
    margin-top: 0;
  }

  .login-pf-accounts #kc-social-providers {
    float: right;
    width: 50%;
    padding-left: 39px;
    border-left: 1px solid #d1d1d1;
  }
}

/* Tablet + Mobile */
@media (max-width: 840px) {
  .card-pf {
    border: 0;
  }

  #kc-header {
    margin-bottom: 0;
  }

  #kc-social-providers {
    margin-top: 40px;
  }

}

.login-pf-page label {
  font-weight: 400;
  color: #1e1e1e;
  font-size: 15px;
}

#kc-page-title {
  display: none;
}

#kc-info-wrapper {
  background-color: transparent;
}

#kc-content-wrapper {
  margin-top: 0;
}

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

.login-pf-page .card-pf p {
  color: black;
  margin: 0;
}

/* Leave some space between buttons */
.kc-social-item {
  margin-bottom: 4px;
}

/* Narrower social buttons */
#social-providers .kc-social-item {
  width: 48%;
  margin-left: 2px;
  margin-right: 2px;
}

#kc-totp-secret-key {
  padding: 0;
}

.login-alert {
  margin-bottom: 18px;
}

/* Hides all login options besides the standard CERN account login */
.onlycern {
  #kc-social-providers {
    display: none;
  }

  .login-pf-accounts #kc-form-wrapper {
    float: unset;
    width: unset;
    padding-right: unset;
    margin-top: unset;
  }

  @media (min-width: 768px) {
    .login-pf-accounts {
      max-width: 420px;
    }
  }

  @media (max-width: 767px) {
    .card-pf {
      border: 0;
    }

    #kc-header {
      margin-bottom: 0;
    }

    #kc-social-providers {
      margin-top: 40px;
    }
  }
}
