/*
 * From "Login page" down, rules are ported 1-to-1 from arda-basis.scoped.css
 * with the Tailwind scope. Unlayered, so they beat the components layer like on
 * Bootstrap routes. rem values are x0.625: Bootstrap's html is 10px, Tailwind
 * routes use 16px.
 */

/* Unlayered so it beats settings.css on Tailwind routes, like arda-basis.scoped.css does on Bootstrap routes. */
:where(html[data-arda-basis]) .login-top {
  padding-top: 50px;
  background: var(--clientLogo);
  background-size: 60%;
  background-position: top right;
  background-repeat: no-repeat;
}

/* Arda's .btn-default text colors, so they beat an org `.btn-default { color }` like on Bootstrap routes. */
:where(html[data-arda-basis]) .btn-default:hover {
  color: white;
}
:where(html[data-arda-basis]) .btn-default:active,
:where(html[data-arda-basis]) .btn-default:focus,
:where(html[data-arda-basis]) .btn-default[data-popup-open],
:where(html[data-arda-basis]) .btn-default[data-popup-open]:hover {
  color: #93a700;
}

:where(html[data-arda-basis]) .ardaStepIndication {
  background: white;
  border: 1px solid #f0f0f0;
  padding: 20px 20px 10px;
  border-radius: var(--borderRadius);
  color: var(--accentColorDark);
  width: 100%;
  margin: 10px auto;
}
:where(html[data-arda-basis]) .ardaStepIndication .ardaXPstyle {
  color: #93a700;
  font-weight: bold;
}
:where(html[data-arda-basis]) .ardaStepIndication img {
  width: 30px;
  float: left;
  margin-right: 5px;
}

/* Overrides the hover lift from settings.css (.todo-module-teaser:hover). */
:where(html[data-arda-basis]) .todo-module-teaser--not-linked:hover {
  transform: translate(0, 0);
}

/* react-select generates ids like react-select-2-option-0; no class to hook onto. */
:where(html[data-arda-basis]) [id^="react-select-"] {
  color: var(--accentColorDark);
}

/* ---- Login page (/login) ---- */

/* Full-screen background image. Orgs override it with `.page-login:after`. */
:where(html[data-arda-basis]) .page-login::after {
  content: "";
  position: fixed;
  z-index: 0;
  padding-top: 10vh;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: transparent var(--backgroundImage) center/cover no-repeat;
}

/* The card needs a position for its z-index to count (Bootstrap's .col is relative). */
:where(html[data-arda-basis]) .page-login__content {
  position: relative;
}

:where(html[data-arda-basis]) .page-login__form .page-login__form__back-button {
  float: left;
}
:where(html[data-arda-basis]) .language-switcher {
  margin-top: 1.25rem;
  background-color: #e5e8eb;
  width: fit-content;
  border-radius: 20px;
  padding: 10px 20px;
}
:where(html[data-arda-basis]) .language-switcher__item__content__link__image {
  height: 15px;
  width: 30px;
}
:where(html[data-arda-basis])
  .language-switcher__item__content__link__image:hover {
  height: 16px;
}
:where(html[data-arda-basis]) .page-login--new__content,
:where(html[data-arda-basis]) .page-logout__content,
:where(html[data-arda-basis]) .page-password-reset__content,
:where(html[data-arda-basis]) .page-login__content,
:where(html[data-arda-basis]) .page-register__content {
  background: white;
  color: var(--accentColorDark);
  max-width: 550px;
  width: 80vw;
  height: auto;
  margin: auto;
  float: none;
  /* Col is a grid item: span the whole row so margin:auto centers the card (a sm=6 cell is narrower than 550px). */
  grid-column: 1 / -1;
  text-align: left;
  border-radius: var(--borderRadius);
  filter: drop-shadow(var(--boxShadowsGeneral));
  -webkit-filter: drop-shadow(var(--boxShadowsGeneral));
  z-index: 5;
}
:where(html[data-arda-basis]) .page-logout__content {
  text-align: center;
}
:where(html[data-arda-basis]) .oauth-sign-in-button__button,
:where(html[data-arda-basis]) .regular-auth-button__button {
  box-shadow: none;
  border-radius: var(--borderRadius);
  background-color: white !important;
  width: 100%;
  text-align: left;
  font-family: var(--font-family-body);
  color: var(--accentColorDark);
  min-height: 50px;
  font-weight: 400;
  font-size: initial;
}
:where(html[data-arda-basis]) .oauth-sign-in-button__button {
  background-color: #e5e8eb !important;
}

:where(html[data-arda-basis])
  .page-login__content__external-oauth
  .oauth-sign-in-button--surfconext
  .oauth-sign-in-button__button,
:where(html[data-arda-basis])
  .page-register__content__external-oauth
  .oauth-sign-in-button--surfconext
  .oauth-sign-in-button__button {
  background: #e5e8eb url(images/arda_university_icon.png) no-repeat;
  background-size: 25px auto;
  background-position: 10px 50%;
  color: var(--accentColorDark);
}

:where(html[data-arda-basis])
  .page-login__content__external-oauth
  .oauth-sign-in-button--surfconext:nth-child(4)
  .oauth-sign-in-button__button,
:where(html[data-arda-basis])
  .page-register__content__external-oauth
  .oauth-sign-in-button--surfconext:nth-child(4)
  .oauth-sign-in-button__button {
  background: #e5e8eb url(images/rijksoverheid.png) no-repeat;
  background-size: 25px auto;
  background-position: 10px 50%;
}

@media only screen and (max-width: 600px) {
  :where(html[data-arda-basis])
    .page-login__content__external-oauth
    .oauth-sign-in-button--surfconext:nth-child(4)
    .oauth-sign-in-button__button,
  :where(html[data-arda-basis])
    .page-register__content__external-oauth
    .oauth-sign-in-button--surfconext:nth-child(4)
    .oauth-sign-in-button__button {
    background: #e5e8eb url(images/rijksoverheid.png) no-repeat;
    background-size: 25px auto;
    background-position: 10px 0%;
  }
}

:where(html[data-arda-basis])
  .page-login__content__regular-auth
  .regular-auth-button__button {
  box-shadow: none;
  font-weight: inherit;
  font-family: var(--font-family-body);
  padding: 0px;
}
:where(html[data-arda-basis])
  .page-login__content__regular-auth
  .regular-auth-button__button:hover {
  padding: 0 10px;
  box-shadow: none;
}

:where(html[data-arda-basis])
  .page-login--new
  .page-login__content__regular-auth {
  margin-bottom: 30px;
}
:where(html[data-arda-basis]) .page-login__content h1:first-child,
:where(html[data-arda-basis]) .page-login__content h2:nth-child(2) {
  display: none;
}

:where(html[data-arda-basis])
  .page-login--new
  .oauth-sign-in-button__button:hover,
:where(html[data-arda-basis]) .regular-auth-button__button:hover,
:where(html[data-arda-basis]) .oauth-sign-in-button__button:hover {
  background-color: #e5e8eb;
  padding: 15px 20px 15px 65px;
  box-shadow: none;
}
:where(html[data-arda-basis]) .page-login__content .oauth-sign-in-button:after,
:where(html[data-arda-basis])
  .page-login__content__regular-auth
  .regular-auth-button:after {
  content: " ";
  background: transparent url(images/green_arrow_right.png) no-repeat;
  background-size: 10px auto;
  background-position: 50% 50%;
  height: 50px;
  width: 50px;
  float: right;
  margin-top: -55px;
  position: relative;
  border-radius: 0px 5px 5px 0px;
}
:where(html[data-arda-basis]) .page-login .page-login__form {
  max-width: 500px;
  margin-top: 5vh;
}

:where(html[data-arda-basis]) .page-login--new .regular-auth-back-button {
  border: 0px;
  background: transparent;
}
/* tailwind/ui Glyphicon has no .glyphicon-chevron-left class, so style the button; the glyph inherits. */
:where(html[data-arda-basis]) .page-login--new .regular-auth-back-button {
  color: var(--primaryAccentColor);
  font-size: 1rem;
}
:where(html[data-arda-basis]) .page-login--new .page-login__form button {
  margin-bottom: 1.25rem;
}
:where(html[data-arda-basis]) .page-login__content h2,
:where(html[data-arda-basis]) .page-logout__content h2,
:where(html[data-arda-basis]) .page-password-reset__content h2,
:where(html[data-arda-basis]) .page-register__content .control-label,
:where(html[data-arda-basis]) .page-register__content .checkbox > label {
  text-align: center;
  color: var(--accentColorDark);
  font-size: 1rem;
  font-weight: initial;
}

:where(html[data-arda-basis]) .page-login__content h1,
:where(html[data-arda-basis]) .page-login__content h3,
:where(html[data-arda-basis]) .page-logout__content h1,
:where(html[data-arda-basis]) .page-password-reset__content h1,
:where(html[data-arda-basis]) .page-register__content h2 {
  margin-bottom: 0.2em;
  color: var(--secondaryAccentColor);
  text-align: center;
  font-weight: 700;
  font-size: 1.25rem;
}

:where(html[data-arda-basis]) .page-login__password-reset-link,
:where(html[data-arda-basis]) .page-login__password-reset-link:active,
:where(html[data-arda-basis]) .page-login__password-reset-link:focus,
:where(html[data-arda-basis]) .page-login__password-reset-link:hover,
:where(html[data-arda-basis]) .page-login__register-link,
:where(html[data-arda-basis]) .page-login__register-link:active,
:where(html[data-arda-basis]) .page-login__register-link:focus,
:where(html[data-arda-basis]) .page-login__register-link:hover,
:where(html[data-arda-basis]) .page-logout__content a,
:where(html[data-arda-basis]) .page-logout__content a:active,
:where(html[data-arda-basis]) .page-logout__content a:focus,
:where(html[data-arda-basis]) .page-logout__content a:hover,
:where(html[data-arda-basis]) .page-password-reset__login-link,
:where(html[data-arda-basis]) .page-password-reset__login-link:active,
:where(html[data-arda-basis]) .page-password-reset__login-link:focus,
:where(html[data-arda-basis]) .page-password-reset__login-link:hover {
  color: var(--primaryAccentColor);
}

/* Links in the login card (arda-basis.scoped.css: `p a` rules) */
:where(html[data-arda-basis]) .page-login__content p a {
  color: var(--primaryAccentColor);
  text-decoration: underline;
}
:where(html[data-arda-basis]) .page-login__content a:hover {
  color: var(--primaryAccentColorHover);
  text-decoration: underline;
  border-bottom: 0;
}
:where(html[data-arda-basis]) .page-login__content p a:active,
:where(html[data-arda-basis]) .page-login__content p a:focus {
  color: var(--primaryAccentColor);
  text-decoration: underline;
  border-bottom: 0;
}

/* ---- Password reset page (/passwordReset) ---- */

/* Background image, same as login. */
:where(html[data-arda-basis]) .page-password-reset::after {
  content: "";
  position: fixed;
  z-index: 0;
  padding-top: 10vh;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: transparent var(--backgroundImage) center/cover no-repeat;
}

/* Card position, same as login. */
:where(html[data-arda-basis]) .page-password-reset__content {
  position: relative;
}

:where(html[data-arda-basis]) .page-password-reset__form .btn {
  display: inline-block;
  width: auto;
  margin: 10px 0px;
  padding-left: 25px;
  padding-right: 25px;
  font-family: var(--font-family-body);
}

/* Links in the card (arda-basis.scoped.css: `p a` rules) */
:where(html[data-arda-basis]) .page-password-reset__content p a {
  text-decoration: underline;
}
:where(html[data-arda-basis]) .page-password-reset__content a:hover {
  color: var(--primaryAccentColorHover);
  text-decoration: underline;
  border-bottom: 0;
}
:where(html[data-arda-basis]) .page-password-reset__content p a:active,
:where(html[data-arda-basis]) .page-password-reset__content p a:focus {
  text-decoration: underline;
  border-bottom: 0;
}
