:root {
  --tokfm-red: #F93822;
  --tokfm-blue: #10069F;
  --tokfm-blue-hover: #564bf7;
  --tokfm-green: #009901;
  --tokfm-fb-blue: #2374f2;
  --tokfm-bkg: #10069F;
  --tokfm-radius: 20px;
  --tokfm-input-radius: 5px;
  --tokfm-input-border: 1px solid #bfbfbf;
  --tokfm-btn-radius: 20px;
  --tokfm-inbutton-gap: 5px;

  --tokfm-small-font: 14px;
  --tokfm-mid-font: 16px;
  --tokfm-big-font: 24px;

}

a {
  color: var(--tokfm-blue);
}

button:hover {
  opacity: 0.8;
}

.login-pf body {
  font-family: "Roboto", sans-serif;
  background-color: var(--tokfm-bkg);
  position: relative;
  background-image: none;
}

.login-pf body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../img/gray.svg");
  background-repeat: repeat;
  background-size: 90%;
  opacity: 0.5; /* Adjust this value between 0 and 1 as needed */
  z-index: 0;
  pointer-events: none;
}

.login-pf-page {
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  width: 100%;
  height: 100%;
  padding: 0;
}

.login-pf-page .card-pf {
  padding: 155px 40px 30px 40px;
  max-width: 500px;
  width: 100%;
}

/* wymagane pola */
.subtitle {
  margin-top: -20px;
}

#kc-form-login .pf-c-form__label,
.pf-c-dropdown {
  display: none;
}

.tokfm-return {
  position: absolute;
  top: -35px;
  left: 0;
  font-weight: 400;
}

#kc-form-login,
#kc-reset-password-form,
#kc-register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#kc-form-login,
#kc-reset-password-form,
#kc-register-form .form-group {
  margin: 0;
}

.pf-c-form-control {
  padding: 23px 15px;
  border-radius: var(--tokfm-input-radius);
  border: var(--tokfm-input-border);
}
.pf-c-form-control[aria-invalid="true"] {
  padding: 23px 15px;
  border-bottom-color: var(--tokfm-red);
}
.required {
  color: var(--tokfm-red);
}

.pf-c-form-control[type="password"] {
  border-radius: var(--tokfm-input-radius) 0 0 var(--tokfm-input-radius);
}

.pf-c-form-control:focus {
  padding-block: 23px;
  border: 2px solid var(--tokfm-bkg);
  outline: none;
  background-color: white;
}

.pf-c-button.pf-m-control {
  border: var(--tokfm-input-border);
  border-radius: 0 var(--tokfm-input-radius) var(--tokfm-input-radius) 0;
}

.pf-c-button.pf-m-control:after {
  border: none;
}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #eef6ff inset; /* Adjust as needed */
}

input:-webkit-autofill {
  background-color: white;
}

.checkbox {
  height: 28px;
  margin-bottom: 0;
  font-size: var(--tokfm-mid-font);
  display: flex;
  align-items: center;
}

.tokfm--terms.checkbox {
  height: auto;
}

.checkbox:before {
  content: "";
  position: absolute;
  display: block;
  border-radius: var(--tokfm-input-radius);
  width: 28px;
  height: 28px;
  border: var(--tokfm-input-border);
  pointer-events: none;
}

input[type="checkbox"] {
  visibility: hidden;
  appearance: none;
}

input[type="checkbox"]:checked:before {
  content: "";
  visibility: visible;
  width: 18px;
  height: 10px;
  position: absolute;
  top: -10px;
  left: -15px;
  border: 2px solid var(--tokfm-blue);
  border-top: none;
  border-right: none;
  background: transparent;
  opacity: 1;
  transform: rotate(-45deg);
  pointer-events: none;
}

.checkbox label {
  display: flex;
  height: 100%;
  align-content: center;
  align-items: center;
  padding-left: 40px;
  line-height: 0;
  cursor: pointer;
}
.tokfm--terms.checkbox {
  cursor: pointer;
}
.tokfm--terms-text {
  line-height: 1.5;
  font-size: var(--tokfm-small-font);
}
.tokfm--terms-error {
  padding: 5px 0 0 40px;
}

/* Optional: Add a background color to autofilled fields */
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  background-color: white;
}
input::placeholder {
  color: #999; /* Gray */
}
input:-internal-autofill-selected {
  background-color: yellow; /* Highlight autofilled fields */
}

.tokfm-return a {
  color: white;
  font-size: var(--tokfm-mid-font);
  font-weight: 400;
}

.pf-c-button {
  border-radius: var(--tokfm-btn-radius);
  font-size: 1.3em;
  line-height: 100%;
  padding: 10px 20px;
}

#kc-header {
  color: var(--tokfm-blue);
  font-weight: 700;
}

.card-pf {
  border-color: var(--tokfm-red);
  border-radius: var(--tokfm-radius);
  position: relative;
}

.card-pf:before {
  content: "";
  display: block;
  width: 420px;
  height: 100px;
  background-image: url(../img/logo_tokfm.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  position: absolute;
  top: 40px;
}

#kc-form-login #kc-form-options {
  display: flex;
  align-items: center;
}
#kc-register-form #kc-form-options {
  color: var(--tokfm-blue);
  margin-bottom: 0;
  padding: 0;
  color: #0C4DA2;
  font-size: 16px;
}

#kc-form-login .login-pf-settings {
  align-items: center;
  font-size: var(--tokfm-mid-font);
  line-height: 0;
  margin: 0;
}

#kc-form-buttons {
  margin-top: 5px;
}
#kc-form-buttons,
.form-horizontal .form-group,
.form-group {
  margin-top: 0;
  margin-bottom: 0;
  margin-right: 0;
  margin-left: 0;
}

#kc-registration {
  font-size: var(--tokfm-mid-font);
}

.login-pf-page .login-pf-signup a {
  margin-left: 0;
}

#kc-locale-dropdown button {
  padding: 5px 10px;
  border-radius: var(--tokfm-btn-radius);
  background: gray;
  color: white;
  font-size: 1em;
}

#kc-info-wrapper {
  border-radius: 0 0 var(--tokfm-radius) var(--tokfm-radius);
}

.pf-c-button.pf-m-primary {
  background-color: var(--tokfm-blue);
}

.pf-c-button.pf-m-primary:hover {
  opacity: 0.8;
}

#kc-social-providers ul.kc-social-links {
  gap: 20px;
}

.kc-social-gray h2 {
  font-size: var(--tokfm-mid-font);
  font-weight: 400;
}

#kc-social-providers ul.kc-social-links li a,
.pf-c-button.pf-m-primary,
.pf-c-button.btn-default  {
  margin: 0;
  padding: 0;
  height: 43px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: center;
  font-size: var(--tokfm-mid-font);
  font-weight: 600;
  gap: var(--tokfm-inbutton-gap);
  background-image: none;
}
.pf-c-button:first-child:not(:only-child) {
  margin-bottom: 10px;
}

.pf-c-button.btn-default {
  background-color: var(--tokfm-blue);
  color: white;
}

.pf-c-button#linkAccount {
  background-color: var(--tokfm-green);
}

#kc-social-providers ul.kc-social-links li a:hover {
  opacity: 0.8;
}

#kc-social-providers ul.kc-social-links li a .kc-social-icon-text {
  left: 0;
}

.pf-c-button.kc-social-item {
  color: white;
  border-radius: var(--tokfm-btn-radius);
  border: none;
}

.pf-c-button.kc-social-item:after {
  border: none;
}

#social-facebook {
  background-color: var(--tokfm-fb-blue);
}

h1#kc-page-title {
  font-weight: 300;
  margin-top: 6px;
}

/* FB */
#social-facebook .kc-social-provider-logo {
  margin-top: -3px;
  background: white;
  border-radius: 40px;
  width: 20px;
  height: 20px;
  color: red;
}

.fa-facebook-f:before,
.fa-facebook:before {
  color: var(--tokfm-fb-blue);
  font-size: 19px;
}

/* APPLE */
#social-apple {
  background-color: black;
  flex-direction: row-reverse;
}
#social-apple .kc-social-provider-logo {
  font-size: var(--tokfm-mid-font);
  width: 18px;
  height: 18px;
}

.fa-apple:before {
  color: white;
}

#social-wyborcza {
  color: black;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

#social-google {
  background: #ffffff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

#social-google .kc-social-provider-logo.fa-google {
  width: 24px;
  height: 24px;
}

#social-google .fa-google:before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  background-image: url(../img/google.svg);
  background-size: contain;
}

#social-wyborcza span.kc-social-provider-name:after {
  position: absolute;
  content: "";
  display: inline-block;
  width: 110px;
  height: 19px;
  background-image: url(../img/logo-wyborcza.png);
  background-repeat: no-repeat;
  background-position: center;
}
#social-wyborcza span.kc-social-provider-name {
  width: 110px;
  color: transparent;
  justify-content: center;
  display: flex;
  height: 100%;
  align-items: center;
  gap: var(--tokfm-inbutton-gap);
}

.login-pf .kc-social-links a:hover {
  color: white;
}
.login-pf .kc-social-links a#social-wyborcza:hover {
  color: black;
}

#kc-info {
  margin: 30px -40px -30px;
}

#kc-passwd-update-form {
  gap: 20px;
  display: flex;
  flex-direction: column;
}

#kc-passwd-update-form #kc-form-options {
  margin-bottom: 20px;
}

#kc-form-options {
  margin-bottom: 5px;
}

[class^="alert-"] {
  margin-bottom: 10px;
}

@media screen and (max-width: 600px) {
  input[type="checkbox"]:checked:before {
    left: -10px;
  }
  .login-pf-page {
    --tokfm-small-font: 12px;
    --tokfm-mid-font: 14px;
    align-items: flex-start;
  }
  .login-pf-page .card-pf {
    padding: 20px;
    top: 30px;
  }
  #kc-form-login .login-pf-settings,
  .checkbox {
    font-size: var(--tokfm-small-font);
  }
  .checkbox label {
    padding-left: 35px;
  }
  .kc-social-gray h2 {
    font-size: var(--tokfm-mid-font);
  }
  #kc-register-form {
    gap: 10px;
  }
  #kc-info {
    margin: 0;
  }
  #kc-info-wrapper {
    padding: 15px 0 0;
  }
  #kc-registration {
    font-size: var(--tokfm-mid-font);
  }
  .tokfm-return {
    top: -30px;
  }
  .tokfm-return a {
    font-size: var(--tokfm-small-font);
  }
  h1#kc-page-title {
    margin: 0 auto;
  }
  .subtitle {
    margin-top: -5px;
  }
  .login-pf-page {
    padding: 10px;
  }
  .card-pf:before {
    display: none;
  }
}

.form-group div[class^="col"],
.login-pf-header div[class^="col"] {
  padding: 0;
}

@media (min-width: 992px) {
  .col-md-10 {
    width: 100%;
  }
}
