.private-diia-auth {
  margin-top: 18px;
}

.private-diia-auth--only {
  margin-top: 0;
}

body.is-diia-auth-active {
  overflow: hidden;
}

body.is-diia-auth-active .auth-shell {
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

body.is-diia-auth-active .login-wrap {
  flex: 1 1 auto;
  align-items: stretch;
  min-height: 0;
  padding: 12px 16px 16px;
}

.login-box.is-diia-auth-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  min-height: 0;
}

.login-card.is-diia-auth-active .wikiomni-login-form,
.login-card.is-diia-auth-active .private-diia-auth__divider,
.login-card.is-diia-auth-active .private-diia-auth__start {
  display: none;
}

.login-box.is-diia-auth-active .login-logo,
.login-box.is-diia-auth-active .login-hint {
  display: none;
}

.login-card.is-diia-auth-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(12px, 2.3svh, 20px);
}

.login-card.is-diia-auth-active .private-diia-auth {
  display: flex;
  flex: 1 1 auto;
  margin-top: 0;
  min-height: 0;
}

.private-diia-auth [hidden] {
  display: none !important;
}

.private-diia-auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #707070;
  font-size: 12px;
}

.private-diia-auth__divider::before,
.private-diia-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #707070;
}

.private-diia-auth__start {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #050505;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.private-diia-auth__start:hover {
  background: #1f1f1f;
  border-color: #ff5a00;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.private-diia-auth__start:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 5, 5, 0.18);
}

.private-diia-auth__start:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.private-diia-auth__brand {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 7px;
  border: 1px solid white;
}

.private-diia-auth__label {
  min-width: 0;
}

.private-diia-auth.is-awaiting .private-diia-auth__start {
  display: none;
}

.private-diia-auth__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  gap: clamp(10px, 2svh, 18px);
  width: 100%;
  max-height: calc(100svh - 96px);
  margin-top: 0;
  text-align: center;
}

.private-diia-auth__panel-head {
  max-width: 380px;
}

.private-diia-auth__title {
  margin: 0 0 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.private-diia-auth__text {
  margin: 0;
  color: #b8b8b8;
  font-size: 13px;
  line-height: 1.45;
}

.private-diia-auth__qr-box {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 392px, calc(100svh - 260px));
  aspect-ratio: 1;
  min-width: 220px;
  padding: clamp(10px, 2.2svh, 16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.private-diia-auth__qr-box:hover {
  border-color: rgba(255, 90, 0, 0.74);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  transform: translateY(-1px);
}

.private-diia-auth__qr-box[aria-disabled="true"] {
  cursor: wait;
  transform: none;
}

.private-diia-auth__qr {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.private-diia-auth__qr-placeholder {
  position: absolute;
  inset: clamp(10px, 2.2svh, 16px);
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 18px;
  font-weight: 700;
}

.private-diia-auth.has-qr .private-diia-auth__qr-placeholder {
  display: none;
}

.private-diia-auth__content {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.private-diia-auth__status {
  max-width: 360px;
  margin-bottom: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.private-diia-auth__timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  padding: 6px 10px;
  border: 1px solid rgba(255, 90, 0, 0.38);
  border-radius: 999px;
  background: rgba(255, 90, 0, 0.1);
  color: #d8d8d8;
  font-size: 12px;
}

.private-diia-auth__time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #fff;
}

.private-diia-auth__deeplink {
  width: min(100%, 280px);
  justify-content: center;
  border-color: #ff5a00;
  background: #ff5a00;
  color: #fff;
}

.private-diia-auth__deeplink:hover {
  border-color: #ff7a2e;
  background: #ff7a2e;
  color: #fff;
}

.private-diia-auth__reset {
  display: inline-flex;
  justify-content: center;
  width: auto;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffb58c;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.private-diia-auth__reset:hover {
  color: #fff;
}

@media (max-width: 540px) {
  body.is-diia-auth-active .login-wrap {
    padding: 8px 12px 12px;
  }

  .login-box.is-diia-auth-active {
    max-width: 100%;
  }

  .login-card.is-diia-auth-active {
    padding: 16px;
  }

  .private-diia-auth__panel {
    padding: 14px;
    max-height: calc(100svh - 84px);
  }

  .private-diia-auth__content {
    width: 100%;
  }

  .private-diia-auth__qr-box {
    padding: 12px;
  }

  .private-diia-auth__qr-placeholder {
    inset: 12px;
  }
}

@media (max-height: 640px) {
  body.is-diia-auth-active .auth-topbar {
    height: 56px;
  }

  body.is-diia-auth-active .login-wrap {
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .private-diia-auth__text {
    display: none;
  }

  .private-diia-auth__title {
    margin-bottom: 0;
    font-size: 16px;
  }

  .private-diia-auth__status {
    font-size: 13px;
  }

  .private-diia-auth__qr-box {
    width: min(100%, 320px, calc(100svh - 210px));
    min-width: 190px;
  }
}

@media (max-height: 540px) {
  body.is-diia-auth-active .auth-topbar {
    height: 48px;
  }

  body.is-diia-auth-active .login-wrap {
    padding-top: 6px;
    padding-bottom: 8px;
  }

  .login-card.is-diia-auth-active {
    padding: 10px;
  }

  .private-diia-auth__panel {
    gap: 8px;
    padding: 10px;
  }

  .private-diia-auth__qr-box {
    width: min(100%, 260px, calc(100svh - 180px));
    min-width: 160px;
  }

  .private-diia-auth__reset {
    margin-top: 2px;
  }
}
