@import url("https://fonts.googleapis.com/css?family=Muli:400,700&display=swap");

/* Colors Theme (fallback) */
:root {
  --colors-background-base: #fafaff;
  --colors-background-elevated: #ffffff;
  --colors-background-disabled: #f2f2f7;
  --colors-background-inverse: #000000;
  --colors-text-primary: #000000;
  --colors-text-secondary: #4d4d4d;
  --colors-text-disabled: #8e8e93;
  --colors-text-inverse: #f2f2f2;
  --colors-outline-border: #ceced9;
  --colors-outline-shadow: #e1e1e6;
  --colors-tint-accent: #ae001a;
  --colors-tint-red: #ff3b30;
  --colors-tint-blue: #007aff;
  --colors-background-grey: #D9D9D9;
  --colors-kvarn-dark-green: #002F36;
  --colors-kvarn-light-green: #90ffbc;
}

html,
.login-pf-page,
.login-pf body {
  background: transparent;
  font-family: "Muli", sans-serif !important;
  color: var(--colors-text-secondary);
  height: 100vh !important;
  width: 100vw;
}

#kc-header-wrapper {
  position: relative;
  z-index: 10;
  background-image: url("../img/kvarn-logo-with-text.png");
  background-size: 127px 25px;
  background-repeat: no-repeat;
  height: 25px;
  width: 127px;
  margin: 0;
  color: transparent;
  display: inline-block;
  vertical-align: middle;
}

.pficon {
  font-size: 22px;
}

.pf-c-alert__icon {
  display: inline-block;
  font-family: "PatternFlyIcons-webfont";
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  line-height: 1;
  speak: none;
  text-transform: none;
}

.login-pf {
  background: unset !important;
}

.login-pf-page {
  padding-bottom: 50px;
}

.alert-error {
  background-color: var(--colors-background-elevated);
  border-color: var(--colors-tint-red);
  color: var(--colors-text-secondary);
  border-radius: 4px;
  border: 1px solid red;
  margin-bottom: 20px;
  padding: 11px;
  display: flex;
}

.alert-error span {
  margin-left: 10px;
  margin-top: 2px;
  position: unset;
}

#kc-locale ul {
  display: none;
  position: absolute;
  background-color: var(--colors-background-elevated);
  list-style: none;
  right: 0;
  top: 20px;
  min-width: 100px;
  padding: 2px 0;
  border: solid 1px var(--colors-outline-border);
}

#kc-locale:hover ul {
  display: block;
  margin: 0;
}

#kc-locale ul li a {
  display: block;
  padding: 5px 14px;
  color: var(--colors-text-secondary) !important;
  text-decoration: none;
  line-height: 20px;
}

#kc-locale ul li a:hover {
  color: var(--colors-text-primary);
  background-color: var(--colors-background-base);
}

#kc-locale-dropdown a {
  color: var(--colors-text-secondary);
  background: 0 0;
  padding: 0 15px 0 0;
  font-weight: 300;
}

#kc-locale-dropdown a:hover {
  text-decoration: none;
}

a#kc-current-locale-link {
  display: block;
  padding: 0 5px;
}

/* a#kc-current-locale-link:hover {
    background-color: rgba(0,0,0,0.2);
} */

a#kc-current-locale-link::after {
  content: "\2c5";
  margin-left: 4px;
}

.login-pf .container {
  padding-top: 40px;
}

.login-pf a:hover {
  color: var(--colors-kvarn-dark-green);
}

div.kc-logo-text span {
  display: none;
}

#kc-header {
  color: var(--colors-text-inverse);
  overflow: visible;
  white-space: nowrap;
  margin-left: 40px;
}

#kc-header-wrapper {
  font-size: 0px;
  /* 29px */
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.2em;
  padding: 62px 10px 20px 0px;
  white-space: normal;

}

#kc-page-title {
  font-size: 28px;
  line-height: 30px;
  font-weight: 500;
  text-align: center;
  color: var(--colors-text-primary);
}

#kc-content {
  width: 100%;
  margin-top: 40px;
}

#kc-content-wrapper {
  position: relative;
  margin-left: 0;
  margin-right: 50%;
  padding: 20px 40px 20px 0px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50%;
}

/* #kc-info {
  padding-bottom: 200px;
  margin-bottom: -200px;
  height: auto;
} */

#kc-info-wrapper {
  font-size: 13px;
}

#kc-form-options span {
  display: block;
}

#kc-form-options .checkbox {
  margin-top: 0;
  color: var(--colors-text-disabled);
}

#kc-terms-text {
  margin-bottom: 20px;
}

#kc-registration {
  margin-bottom: 15px;
}

/* TOTP */

ol#kc-totp-settings {
  margin: 0;
  padding-left: 20px;
}

ul#kc-totp-supported-apps {
  margin-bottom: 10px;
}

#kc-totp-secret-qr-code {
  max-width: 150px;
  max-height: 150px;
}

#kc-totp-secret-key {
  background-color: var(--colors-background-elevated);
  color: var(--colors-text-secondary);
  font-size: 16px;
  padding: 10px 0;
}

/* OAuth */

#kc-oauth h3 {
  margin-top: 0;
}

#kc-oauth ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#kc-oauth ul li {
  border-top: 1px solid var(--colors-outline-border);
  font-size: 12px;
  padding: 10px 0;
}

#kc-oauth ul li:first-of-type {
  border-top: 0;
}

#kc-oauth .kc-role {
  display: inline-block;
  width: 50%;
}

/* Code */
#kc-code textarea {
  width: 100%;
  height: 8em;
}

/* Social */

#kc-social-providers ul {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

#kc-social-providers li {
  display: block;
}

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

.zocial,
a.zocial {
  width: 100%;
  font-weight: normal;
  font-size: 14px;
  text-shadow: none;
  border: 0;
  background: var(--colors-background-base);
  color: var(--colors-text-disabled);
  border-radius: 0;
  white-space: normal;
}

.zocial:before {
  border-right: 0;
  margin-right: 0;
}

.zocial span:before {
  padding: 7px 10px;
  font-size: 14px;
}

.zocial:hover {
  background: var(--colors-background-disabled) !important;
  color: var(--colors-kvarn-dark-green) !important;
}

.zocial.facebook,
.zocial.github,
.zocial.google,
.zocial.microsoft,
.zocial.stackoverflow,
.zocial.linkedin,
.zocial.twitter {
  background-image: none;
  border: 0;

  box-shadow: none;
  text-shadow: none;
}

.faAuth,
.okta {
  color: var(--colors-text-primary) !important;
}

.faAuth:hover,
.okta:hover {
  border: none;
  box-shadow: none;
  background: none !important;
  text-decoration: none;
  opacity: 1 !important;
}

/* Copy of zocial windows classes to be used for microsoft's social provider button */
.zocial.microsoft:before {
  content: "\f15d";
}

.zocial.stackoverflow:before {
  color: inherit;
}

@media (min-width: 768px) {
  .login-pf-page-header {
    margin-bottom: auto !important;
  }

  #kc-container-wrapper {
    position: absolute;
    width: 100%;
  }

  .login-pf .container {
    padding-right: 80px;
  }

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

  .login-pf-page .login-pf-accounts {
    max-width: 400px !important;
  }
}

@media (max-width: 767px) {
  /* .login-pf body {
    background: white;
  } */

  #kc-header {
    padding-left: 15px;
    padding-right: 15px;
    float: none;
  }

  #kc-header-wrapper {
    font-size: 0px;
    /* 16px */
    font-weight: bold;
    padding: 20px 0 0 0 0;
    color: transparent;
    letter-spacing: 0;
    margin-left: 8px;
  }

  div.kc-logo-text {
    margin: 0 auto;
    width: 72px;
    height: 72px;
    background-size: 72px;
  }

  #kc-form {
    float: none;
  }

  #kc-info-wrapper {
    border-top: 1px solid var(--colors-outline-border);
    margin-top: 15px;
    padding-top: 15px;
    padding-left: 0px;
    padding-right: 15px;
  }

  #kc-social-providers li {
    display: block;
    margin-right: 5px;
  }

  .login-pf .container {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  #kc-locale {
    position: absolute;
    width: 200px;
    top: 20px;
    right: 20px;
    text-align: right;
    z-index: 9999;
  }

  #kc-logo-wrapper {
    background-size: 100px 21px;
    height: 21px;
    width: 100px;
    margin: 20px 0 0 20px;
  }

  a[href="https://kvarnx.statuspage.io/"] {
    display: none !important;
  }

  .login-options-container {
    flex-direction: column;
    align-items: center;
  }

  #showLoginForm {
    margin-bottom: 10px;
    margin-top: 10px;
  }
}

@media (min-height: 646px) {
  #kc-container-wrapper {
    bottom: 12%;
  }
}

@media (max-height: 645px) {
  #kc-container-wrapper {
    padding-top: 50px;
    top: 20%;
  }
}

.card-pf form.form-actions .btn {
  float: right;
  margin-left: 10px;
}

#kc-form-buttons {
  margin-top: 0;
  /* 40px */
}

.login-pf-page .login-pf-brand {
  margin-top: 20px;
  max-width: 360px;
  width: 40%;
}

.login-pf-page .control-label {
  font-weight: bold;
  font-size: 12px;
  line-height: 16px;
  color: var(--colors-text-primary);
}

.login-pf-page .form-control {
  border-radius: 5px;
  background-color: var(--colors-background-base);
  color: var(--colors-text-primary);
  width: 220px;
}

.form-control:hover {
  border: 1px solid var(--colors-outline-border);
  outline: none;
}

.form-control:focus {
  border: 1px solid var(--colors-text-primary);
  outline: none;
  box-shadow: none;
}

.card-pf {
  background: var(--colors-background-elevated);
  margin: 0 auto;
  padding: 0;
  max-width: 1000px;
  /* Increased to accommodate two columns */
  border-radius: 8px;
  position: relative;
  z-index: 0;
  overflow: hidden;
  /* To ensure the pseudo-element stays within the card */
  box-shadow: none;
  display: flex;
  flex-direction: row-reverse;
  margin-top: 6vh;
  /* Added to create space for the header */
  height: 720px;
}

.card-pf::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background-image: url('../img/kvarn-phone.png');
  background-size: cover;
  background-position: center;
}

#kc-content-wrapper {
  position: relative;
  margin-left: 0;
  margin-right: 50%;
  padding: 20px 20px 20px 0px;
  box-sizing: border-box;
  width: 50%;
  /* Added to limit width to match content area */
  display: flex;
  flex-direction: column;
}

@media (max-width: 840px) {
  .card-pf {
    max-width: 420px;
    flex-direction: column;
    padding-top: 0;
    /* Removed top padding on mobile */
  }

  .card-pf::before {
    display: none;
  }

  #kc-content-wrapper {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  #kc-header-wrapper {
    width: 100%;
    max-width: 420px;
  }
}

/* Ensure the login form and social providers are properly styled */
#kc-form,
#kc-social-providers {
  width: 100%;
}

/* Adjust the logo positioning if needed */
#kc-header-wrapper {
  position: relative;
  z-index: 1;
  width: 960px;
}

.login-pf-page .login-pf-signup {
  font-size: 15px;
  color: var(--colors-text-disabled);
  margin: 0;
}

#kc-content-wrapper .row {
  margin-left: 0;
  margin-right: 0;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  /* width: 220px; */
}

@media (min-width: 768px) {
  .login-pf-page .login-pf-social-section {
    max-width: initial !important;
  }

  .login-pf-page .login-pf-social-section:first-of-type {
    /* padding-right: initial !important; */
  }

  .login-pf-page .login-pf-social-section:last-of-type {
    padding-left: initial !important;
    border-left: 0px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .login-pf-page .login-pf-social-section .login-pf-social-link:last-of-type {
    margin-bottom: 0;
  }
}

.login-pf-page .login-pf-social-link {
  margin-bottom: 25px;
}

.login-pf-page .login-pf-social-link a {
  padding: 6px 6px 6px 12px;
  border-radius: 20px;
  color: var(--colors-kvarn-dark-green);
  border: 1px solid #bbb;
  display: flex;
  width: 220px;
  justify-content: flex-start;
  align-items: center;
  background-color: white;
}

.login-pf-page .login-pf-social-link a:hover {
  color: var(--colors-kvarn-dark-green);
  background-color: var(--colors-background-disabled);
}

.login-pf-page.login-pf-page-accounts {
  margin-left: auto;
  margin-right: auto;
}

.login-pf-page .btn-primary {
  margin-top: 0;
}

.btn-primary {
  height: 34px;
  border-radius: 20px;
  background: var(--colors-kvarn-light-green) !important;
  box-shadow: 0 0 4px 0 var(--colors-outline-shadow);
  border: none;
  color: var(--colors-kvarn-dark-green) !important;
}

.btn-primary:hover {
  background: var(--colors-kvarn-dark-green) !important;
  color: var(--colors-kvarn-light-green) !important;
  box-shadow: 0 0 4px 0 var(--colors-text-primary);
}

a {
  color: var(--colors-text-secondary);
}

form#kc-form-login {
  display: none;
}

#forgetPasswordLink {
  display: none;
}

a#zocial-ftn-prod::before {
  content: url('../img/Flag_of_Finland.png');
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  line-height: 14px;
}

a#zocial-mitid-prod::before {
  content: url('../img/Flag_of_Denmark.png');
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  line-height: 14px;
}

a#zocial-sbid-prod::before {
  content: url('../img/Flag_of_Sweden.png');
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  line-height: 14px;
}

a#zocial-nbid-prod::before {
  content: url('../img/Flag_of_Norway.png');
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  line-height: 14px;
}

/* Add this new rule */
.login-pf-header {
  position: absolute;
  top: 0;
  left: 0px;
  width: 50%;
  /* Limit width to match content area */
  z-index: 1;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  align-items: start;
}

/* Adjust the page title positioning */
#kc-page-title {
  text-align: left;
  display: inline-block;
  vertical-align: middle;
  padding-left: 20px;
}

@media (max-width: 840px) {
  .login-pf-header {
    position: relative;
    width: 100%;
    padding: 0px;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  #kc-header-wrapper {
    margin-bottom: 10px;
  }

  #kc-page-title {
    margin: 10px 0 0 0;
    padding-left: 0;
  }
}

#showLoginForm {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--colors-outline-border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--colors-text-secondary);
  transition: all 0.3s ease;
  width: 220px;
}

#showLoginForm:hover {
  background-color: var(--colors-background-disabled);
  color: var(--colors-kvarn-dark-green);
}

@media (min-width: 768px) and (max-width: 840px) {
  #kc-header-wrapper {
    margin-left: 40px;
  }
}

.login-options-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* margin-top: 20px; */
  /* width: 220px; */
}

@media (max-width: 1024px),
(max-device-width: 1024px) {
  .card-pf {
    max-width: 100%;
    flex-direction: column;
    padding-top: 0;
    height: auto;
    margin-top: 0;
  }

  .card-pf::before {
    display: none;
  }

  #kc-content-wrapper {
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    max-width: 400px;
    padding: 20px 0;
  }

  #kc-header-wrapper {
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    background-position: center;
  }

  .login-pf-header {
    position: relative;
    width: 100%;
    left: 0;
    flex-direction: column;
    align-items: center;
  }

  #kc-page-title {
    text-align: center;
    padding-left: 0;
    margin: 10px 0;
  }

  .login-options-container {
    flex-direction: column;
    align-items: flex-start;
  }

  #showLoginForm {
    margin-bottom: 10px;
    margin-top: 10px;
  }

  a[href="https://kvarnx.statuspage.io/"] {
    display: none !important;
  }

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

  #kc-header {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
    margin-left: 0;
  }

  #forgetPasswordLink {
    text-align: center;
  }

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

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

  .card-pf.card-pf-view.card-pf-view-select.card-pf-view-single-select {
    display: none;
  }
}

#kc-signup-link,
#privacyPolicy {
  display: none;
}

@media (min-width: 768px) {
  .login-pf-page .login-pf-social-double-col {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    -ms-flex-pack: justify;
    justify-content: center;
    align-items: center
  }
}
