:root {
  /* keycloak */
  --keycloak-logo-url: url('../img/keycloak-logo-text.png');
  --keycloak-bg-logo-url: url("../img/login-bg.jpg");
  --keycloak-logo-height: 63px;
  --keycloak-logo-width: 300px;
  /* sirius */
  --page-background: #f9fafb;
  --paper-background: #ffffff;
  --paper-background-active: rgba(235, 228, 219, 0.3);
  --text-base-color: #454552; /**/
  --text-light-color: #9CA3A1;
  --text-base-size: 16px;
  --text-small-size: 14px;
  --border: #D2D9D8; /**/
  --border-dark: rgba(0, 0, 0, 0.18); /**/
  --primary: #F08137; /**/
  --primary-dark: #e07b38; /**/
  --primary-contrast-text: #ffffff; /**/
  --error-text: #c73d49;
  --error-bg-opacity: rgba(236, 89, 102, 0.12);
  --progress-buffer: #e6e6e6;
  --progress-danger: #ff4152;
  --progress-warning: #ff8447;
  --progress-success: #0bb992;
  --indent-top: 260px;
  --paper-width: 440px;
  --paper-border-radius: 8px;
  --field-height: 56px;
  --btn-border-radius: 28px;
  --second: #453089;
}

@media (max-width: 1560px) {
  :root {
    --indent-top: 120px;
  }
}

/* fonts */
@font-face {
  font-family: 'Raleway';
  src: local('Raleway Regular'),
  local('Raleway-Regular'),
  url('../fonts/Raleway-Regular.woff2') format("woff2"),
  url('../fonts/Raleway-Regular.woff') format("woff"),
  url('../fonts/Raleway-Regular.ttf') format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Raleway';
  src: local('Raleway Medium'),
  local('Raleway-Medium'),
  url('../fonts/Raleway-Medium.woff2') format("woff2"),
  url('../fonts/Raleway-Medium.woff') format("woff"),
  url('../fonts/Raleway-Medium.ttf') format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Raleway';
  src: local('Raleway SemiBold'),
  local('Raleway-SemiBold'),
  url('../fonts/Raleway-SemiBold.woff2') format("woff2"),
  url('../fonts/Raleway-SemiBold.woff') format("woff"),
  url('../fonts/Raleway-SemiBold.ttf') format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Raleway';
  src: local('Raleway Bold'),
  local('Raleway-Bold'),
  url('../fonts/Raleway-Bold.woff2') format("woff2"),
  url('../fonts/Raleway-Bold.woff') format("woff"),
  url('../fonts/Raleway-Bold.ttf') format("truetype");
  font-weight: 700;
  font-style: normal;
}

/* keycloak styles */
.pf-v5-c-login__container {
    grid-template-columns: var(--paper-width);
    grid-template-areas: "header"
                         "main"
}

.login-pf body {
    background: var(--keycloak-bg-logo-url) no-repeat center center fixed;
    background-size: cover;
    height: 100%;
}

div.kc-logo-text {
    background-image: var(--keycloak-logo-url);
    height: var(--keycloak-logo-height);
    width: var(--keycloak-logo-width);
    background-repeat: no-repeat;
    background-size: contain;
    margin: 0 auto;
}

div.kc-logo-text span {
    display: none;
}

.kc-login-tooltip {
    position: relative;
    display: inline-block;
}

.kc-login-tooltip .kc-tooltip-text{
    top:-3px;
    left:160%;
    background-color: black;
    visibility: hidden;
    color: #fff;

    min-width:130px;
    text-align: center;
    border-radius: 2px;
    box-shadow:0 1px 8px rgba(0,0,0,0.6);
    padding: 5px;

    position: absolute;
    opacity: 0;
    transition:opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
    visibility: visible;
    opacity: 0.7;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
    content: " ";
    position: absolute;
    top: 15px;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent black transparent transparent;
}

#kc-recovery-codes-list {
    columns: 2;
}

#certificate_subjectDN {
    overflow-wrap: break-word
}

#kc-header-wrapper {
    font-size: 29px;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.2em;
    white-space: normal;
    color: var(--pf-v5-global--Color--light-100) !important;
    text-align: center;
}

#kc-error-message {
  padding: 16px;
  margin-bottom: 16px;
  font-weight: 500;
  text-align: center;
  border-radius: 4px;
  color: var(--error-text);
  background-color: var(--error-bg-opacity);
}

#kc-info-message {
  padding: 16px;
  margin-bottom: 16px;
  font-weight: 500;
  text-align: center;
  border-radius: 4px;
  background-color: var(--paper-background-active);
}

#kc-error-message:last-child,
#kc-info-message:last-child {
  margin-bottom: 0;
}

hr {
    margin-top: var(--pf-v5-global--spacer--sm);
    margin-bottom: var(--pf-v5-global--spacer--md);
}

p + p {
  margin-top: 8px;
}

@media (min-width: 768px) {
    div.pf-v5-c-login__main-header {
      padding: 24px 16px 0;
      text-align: center;
    }
}

/* sirius styles */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

strong, b {
  font-weight: 700;
}

body {
  margin: 0;
  font: 600 16px/1.25 "Raleway", "Helvetica", "Arial", sans-serif;
  font-size: var(--text-base-size);
  color: var(--text-base-color);
  background-color: var(--page-background);
}

/* page */
.page-content {
  min-height: calc(100vh - 100px);
}

/* login */
.login-card {
  background-color: var(--paper-background);
  border-radius: var(--paper-border-radius);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.login-header {}

.login-logo {
  margin: 0 auto;
  height: 60px;
  width: 220px;
  background: url(../img/logo-sirius.svg) top center no-repeat;
  background-size: contain;
}

.login-body {
  padding: 16px 48px 32px;
}

/* alerts */
.alert-error {
  padding: 12px 16px;
  margin: 16px 0;
  min-height: 48px;
  background-color: var(--error-bg-opacity);
  border-radius: var(--paper-border-radius);
  border: none;
}

.alert-error .alert-text {
  color: var(--error-text);
  font-weight: 500;
  font-size: var(--text-base-size);
}

.alert-error .alert-icon {
  margin: 0;
}

.alert-warning {
  padding: 12px 16px;
  margin: 16px 0;
  min-height: 48px;
  border-radius: var(--paper-border-radius);
  border: none;
}

.alert-warning .alert-text {
  font-weight: 500;
  font-size: var(--text-base-size);
}

.alert-warning .alert-icon {
  margin: 0;
}

/* footer */
.footer-content{
  position: relative;
  height: 100px;
}

.page-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 16px 48px 8px;
  line-height: 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: linear-gradient(0deg, rgba(38, 28, 28, 0.6), transparent);
}

.footer-separator:before {
  content: " | ";
  padding: 0 3px;
}

.footer-row {
  display: flex;
  justify-content: center;
  line-height: 18px;
}

.footer-item {
  margin: 4px 16px 0;
}

.footer-item + .footer-item:before {
  content: "|";
  position: relative;
  left: -16px;
}

.footer-support-phone {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.footer-support-email {
  white-space: nowrap;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.footer-support-email:hover {
  color: #fff;
}

.footer-version{
  white-space: nowrap;
}

/* form-control */
.form-control>:is(input,select,textarea) {
  height: var(--field-height);
  padding: 0 24px;
  font-weight: 600;
  border-radius: var(--btn-border-radius);
}

.form-control:before {
  border-bottom-width: 1px;
  border-radius: var(--btn-border-radius);
  border-color: var(--border);
}

.form-control:focus-within:before {
  border-color: var(--primary);
}

.form-control>:is(input,select,textarea):focus {
  outline: none;
}

/* field with btn */
.form-control.form-control__with-btn-active,
.form-control.form-control__with-btn-active>:is(input,select,textarea),
.form-control.form-control__with-btn-active:before {
  border-radius: var(--btn-border-radius) 0 0 var(--btn-border-radius);
}

.form-group .form-control__btn-active {
  border-radius: 0 var(--btn-border-radius) var(--btn-border-radius) 0;
}

.form-group .form-control__btn-active:after {
  border: 1px solid var(--border);
  border-radius: 0 var(--btn-border-radius) var(--btn-border-radius) 0 !important;
}

/* error field */
.form-control.pf-m-error:before {
  border-color: var(--error-text);
}

.form-control-util {
  padding-top: 12px;
  padding-right: 12px;
}

.form-control-util__error {
  color: var(--error-text);
}

.form-helper__block {
  padding: 0 10px 0 20px;
  font-weight: 500;
}

.form-helper__text.pf-m-error {
  color: var(--error-text);
}

/* remove line under field */
.form-control:after {
  border: none;
}

/* login-form */
.login-form {
  margin-top: 16px;
}

/* inner label */
.login-form .form-group {
  position: relative;
}

.login-form .form-control>:is(input,select,textarea) {
  padding-left: 100px;
  width: 100%;
}

.form-label {
  margin: 0 10px 4px 20px;
}

.login-form .form-label {
  margin: 0;
  width: 80px;
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 2;
}

.form-label__text {
  color: var(--text-light-color);
  font-size: var(--text-base-size);
  font-weight: 500;
}

/* login btns */
.form-action-block {
  margin: 0;
}

/* btn */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--field-height);
  padding: 0 24px;
  margin: 0;
  width: 100%;
  border: 0;
  border-radius: var(--btn-border-radius);
  cursor: pointer;

  font-size: var(--text-base-size);
  font-weight: 600;
  text-decoration: none;

  outline: 0;
  vertical-align: middle;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease-in-out;
}

.btn[disabled] {
  opacity: .5;
  cursor: default;
}

/* primary */
.btn-primary {
  text-transform: uppercase;
  color: var(--primary-contrast-text);
  background-color: var(--primary);
}

.btn-primary:not([disabled]):hover,
.btn-primary:not([disabled]):focus,
.btn-primary:not([disabled]):focus-visible {
  background-color: var(--primary-dark);
}

/* secondary */
.btn-secondary {
  color: var(--text-base-color);
  background-color: var(--paper-background);
  box-shadow: 0 0 0 1px var(--primary);
}

.btn-secondary:not([disabled]):hover,
.btn-secondary:not([disabled]):focus,
.btn-secondary:not([disabled]):focus-visible {
  background-color: var(--paper-background-active);
  box-shadow: 0 0 0 1px var(--primary-dark);
}

/* social */
.btn-social {
  color: var(--text-base-color);
  background-color: var(--paper-background);
  box-shadow: 0 0 0 1px var(--border-dark);
}

.btn-social:not([disabled]):hover,
.btn-social:not([disabled]):focus,
.btn-social:not([disabled]):focus-visible {
  background-color: var(--paper-background-active);
}

/* social icons*/
.btn-social__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-social__icon-esia {
  width: 30px;
  height: 30px;
  background: url(../img/logo-esiaoidc.svg) top center no-repeat;
  background-size: contain;
}

.btn-social__icon-passport {}
.btn-social__icon-keycloak-oidc {}


/* providers */
.login-providers {
  margin-top: -16px;
  padding: 0 48px 32px;
}

.login-providers__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/**/
.sport-provider {
  margin-top: 32px;
}

.sport-provider__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 29px;
  margin-bottom: 16px;
}

.sport-provider__subtitle {
  font-weight: 600;
  margin-bottom: 16px;
}

.sport-provider__form {}

.sport-provider-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  position: relative;
}

.sport-provider-list__item {
  font-weight: 400;
  font-variant-numeric: lining-nums;
  position: relative;
}

.sport-provider-list__radio {
  opacity: 0;
  position: absolute;
  top: 0;
}

.sport-provider-list__label {
  display: block;
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: var(--btn-border-radius);
  transition: background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.sport-provider-list__radio[disabled] + .sport-provider-list__label {
  opacity: 0.5;
  pointer-events: none;
}

.sport-provider-list__radio:not([disabled]) + .sport-provider-list__label:hover,
.sport-provider-list__radio:not([disabled]):focus-visible + .sport-provider-list__label {
  background-color: var(--paper-background-active);
  cursor: pointer;
}

.sport-provider-list__radio:checked + .sport-provider-list__label {
  border-color: var(--primary);
  background-color: var(--paper-background-active);
}

.sport-provider-list__ogrn,
.sport-provider-list__post {
  color: var(--text-light-color);
  font-size: var(--text-small-size);
  font-weight: 500;
}

.sport-provider-list__post {
  margin-left: 8px;
}

.sport-provider-list__org {
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

.sport-provider-list__org-label {
  display: none;
}

.sport-provider-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
