/* Login / Account styles ported from legacy Content/account.less
   (+ login utilities from Content/Site.less used by the Account login view). */

.account-body {
  background: var(--surface) !important;
  height: auto;
  min-height: 100%;
  position: relative;
  margin: 0;
  padding-bottom: 0;
  letter-spacing: 0.2px;
  line-height: 1.42857143;
  font-weight: 400;
}

.account-body input,
.account-body button,
.account-body select,
.account-body textarea {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.account-body main.account-main {
  display: block;
  min-height: 100vh;
  padding: 0;
  place-items: unset;
}

.account-container {
  height: 100%;
  width: 100%;
}

.account-container .btn,
.account-dialog .btn {
  display: inline-block;
  position: relative;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 28px;
  border-radius: var(--radius-control);
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: 0.3s;
  backface-visibility: hidden;
  border: 1px solid transparent;
  cursor: pointer;
  box-sizing: border-box;
}

.account-container .btn-primary,
.account-dialog .btn-primary {
  color: #fff;
  background-color: var(--accent);
  border-color: var(--accent-border);
}

.account-container .btn-primary:hover,
.account-container .btn-primary:focus,
.account-container .btn-primary:active,
.account-dialog .btn-primary:hover,
.account-dialog .btn-primary:focus,
.account-dialog .btn-primary:active {
  color: #fff;
  background-color: var(--accent-hover);
  border-color: #005a50;
}

.account-container .btn-link,
.account-dialog .btn-link {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
  font-weight: 500;
}

.account-container .btn-link:hover,
.account-container .btn-link:focus,
.account-container .btn-link:active,
.account-dialog .btn-link:hover,
.account-dialog .btn-link:focus,
.account-dialog .btn-link:active {
  color: var(--accent-hover);
  background-color: #f5f8fc;
  text-decoration: none;
}

.account-container .btn-full-width,
.account-dialog .btn-full-width {
  display: block;
  width: 100%;
}

/* display:block above beats the user-agent [hidden] rule, which is why the
   lockout "try again" button stayed visible during the countdown. */
.account-container [hidden],
.account-dialog [hidden] {
  display: none !important;
}

.account-container .btn-primary:disabled,
.account-container .btn-primary:disabled:hover,
.account-container .btn-primary:disabled:focus,
.account-container .btn-primary:disabled:active {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.account-container p {
  margin-bottom: 5px !important;
}

.signin {
  padding: 0 10px;
}

.signin #logo {
  margin: 15px auto;
}

.signin-box {
  background: var(--surface);
  margin: 40px 0;
  padding: 20px 30px;
}

.signin-header {
  font-family: var(--font-heading);
  color: var(--text-secondary);
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 15px;
}

.signin .checkbox {
  padding-top: 0 !important;
}

.signin .checkbox input[type="checkbox"] {
  margin-left: 0;
  margin-top: 1px;
}

.signin-underform-section {
  margin-top: 16px;
  margin-bottom: 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signin-or {
  margin: 15px 0;
}

.validation-summary-errors > ul {
  list-style: none;
  padding-left: 0;
}

.material-form {
  width: 100%;
  position: relative;
  margin-top: 20px;
}

.material-form .form-control {
  border-top: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  padding-top: 17px;
  padding-left: 0;
  padding-right: 16px;
  padding-bottom: 5px;
  color: var(--text-secondary);
  height: auto;
  display: block;
  font-size: 16px;
  margin-bottom: 7px;
  line-height: 19px;
  width: 100%;
  box-shadow: none;
  background: transparent;
  outline: none;
}

.material-form .form-control:focus,
.material-form .form-control:active {
  border-color: var(--accent) !important;
  box-shadow: none;
}

.material-form .has-error .form-control {
  border-color: #fff !important;
}

.material-form .form-label {
  position: absolute;
  top: 25px;
  left: 0;
  font-size: 14px;
  color: #9b9b9b;
  font-weight: 400;
  pointer-events: none;
  z-index: 9;
  transition: 0.3s;
  transform: translateY(-50%);
  transform-origin: 0 0;
}

.material-form .form-label.focus,
.material-form .form-label.auto-fill,
.material-form .form-control:focus + .form-label,
.material-form .form-control:not(:placeholder-shown) + .form-label {
  top: 0;
  font-size: 12px;
}

.material-form .form-control:focus + .form-label {
  color: var(--accent);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: inherit !important;
  color: inherit !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.show-password {
  position: absolute;
  right: 0;
  top: 15px;
  z-index: 10;
  text-transform: uppercase;
}

.show-password a {
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.show-password__icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.show-password__slash {
  display: none;
}

.show-password a.is-visible .show-password__slash {
  display: inline;
}

.account-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
}

.account-box {
  margin-top: 40px;
  background: var(--surface);
  padding: 40px 30px;
  box-shadow: var(--account-shadow);
}

.account-row-logo {
  display: flex;
  justify-content: center;
}

.account-row-logo img {
  max-width: 180px;
  max-height: 100px;
}

.account-row-header {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 500;
  text-align: center;
  margin-top: 40px;
}

.account-row-subheader {
  font-family: var(--font-heading);
  color: var(--muted);
  font-size: 18px;
  text-align: center;
  margin-top: 20px;
}

.account-row .checkbox input[type="checkbox"] {
  margin-left: 0;
  margin-top: 1px;
}

.account-row .signin-header {
  margin-bottom: 50px;
}

.account-box--message .signin-header {
  margin-bottom: 15px;
}

.account-box--message .account-action {
  text-align: center;
  margin-top: 50px;
}

.account-row .checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.account-row a {
  color: var(--accent);
  text-decoration: none;
}

.account-row a:hover {
  text-decoration: underline;
}

.text-danger,
.error {
  color: var(--error);
  margin-top: 0.35rem;
  display: block;
}

/* Utilities used by login (from Site.less) */
.color-base {
  color: var(--accent) !important;
}

.cursor-pointer {
  cursor: pointer;
}

.noselect {
  -webkit-touch-callout: none;
  user-select: none;
}

.font11 {
  font-size: 11px !important;
}

.font18 {
  font-size: 18px;
}

.margin-right-5 {
  margin-right: 5px;
}

.margin-bottom-50 {
  margin-bottom: 50px;
}

.account-register-hint {
  font-style: italic;
  margin-top: 16px;
}

.already-account {
  position: fixed;
  right: 30px;
  top: 30px;
  font-size: 14px;
  padding: 10px;
  box-shadow: var(--account-shadow);
  background: var(--surface);
}

.already-account span {
  margin-right: 10px;
}

.already-account--static {
  position: static;
  box-shadow: none;
  padding: 16px 0 0;
  text-align: center;
}

#loginForm .material-form {
  margin-bottom: 15px;
}

#loginForm .material-form .form-label {
  top: 0;
  font-size: 12px;
}

.login-sso {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.login-sso a {
  display: inline-flex;
  align-items: center;
  padding: 10px 0;
  text-align: center;
}

.login-sso__icon {
  width: 18px;
  height: 18px;
  margin-right: 5px;
  fill: #000;
}

.login-signup {
  margin-top: 40px;
  padding-top: 0;
}

.login-mobile-footer__forgot {
  margin-bottom: 20px;
}

.qr-login-toggle {
  margin-top: 5px;
}

.qr-login-toggle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  letter-spacing: inherit;
}

.qr-login-toggle__icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: var(--text-secondary);
}

.qr-scan-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.qr-scan-label {
  font-size: 16px;
}

.qr-back-link {
  display: inline-block;
  margin-top: 12px;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
}

.anim-box {
  position: relative;
  flex: 0 0 100px;
  width: 100px;
  height: 55px;
  padding: 10px;
}

.anim-box:before,
.anim-box:after,
.anim-box > :first-child:before,
.anim-box > :first-child:after {
  position: absolute;
  width: 7%;
  height: 15%;
  border-color: var(--text);
  border-style: solid;
  content: " ";
}

.anim-box:before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.anim-box:after {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}

.anim-box > :first-child:before {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.anim-box > :first-child:after {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}

.anim-item {
  display: inline-block;
  background-color: var(--text);
  height: 30px;
}

.anim-item-sm {
  width: 2px;
  margin-right: 3px;
}

.anim-item-md {
  width: 3px;
  margin-right: 2px;
}

.anim-item-lg {
  width: 5px;
  margin-right: 5px;
}

.scanner {
  width: 100%;
  height: 3px;
  background-color: #c00;
  opacity: 0.7;
  position: relative;
  box-shadow: 0 0 8px 10px rgb(170 11 23 / 49%);
  top: 50%;
  animation: qr-scan 3s linear infinite;
}

@keyframes qr-scan {
  0% {
    box-shadow: 0 0 8px 10px rgb(170 11 23 / 49%);
    top: 50%;
  }
  25% {
    box-shadow: 0 6px 8px 10px rgb(170 11 23 / 49%);
    top: 5px;
  }
  75% {
    box-shadow: 0 -6px 8px 10px rgb(170 11 23 / 49%);
    top: 98%;
  }
}

.account-dialog {
  width: min(360px, calc(100% - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-base);
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-modal);
  box-shadow: var(--modal-shadow);
}

.account-dialog::backdrop {
  background: rgb(50 51 57 / 55%);
}

.account-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-light);
}

.account-dialog__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.account-dialog__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-control);
  cursor: pointer;
}

.account-dialog__close:hover,
.account-dialog__close:focus-visible {
  color: var(--text);
  background: rgb(0 0 0 / 6%);
}

.account-dialog__body {
  padding: 24px 20px 20px;
}

.account-dialog__body p {
  margin: 0 0 20px;
}

.pin-code-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.pin-code-panel__item-login {
  box-sizing: border-box;
  width: 56px;
  height: 64px;
  padding: 0;
  font-family: var(--font-base);
  font-size: 28px;
  line-height: 1;
  color: var(--text-secondary);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pin-code-panel__item-login:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: var(--focus-ring);
}

.account-dialog .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* min-height reserves space so the dialog does not jump when the rate-limit countdown appears. */
.pin-login-error {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--error);
  text-align: center;
}

@media (max-width: 400px) {
  .pin-code-panel__item-login {
    width: 100%;
    height: 58px;
    font-size: 24px;
  }
}

.verified-email {
  color: var(--accent) !important;
  font-weight: bold;
}

.register-success-body {
  font-size: 14px;
}

.register-success-actions {
  margin-top: 60px;
}

.register-terms {
  margin-top: 25px;
}

.account-container .btn.btn-loading,
.account-dialog .btn.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0.75;
  cursor: default;
  text-transform: uppercase;
}

.btn-spinner {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-spinner {
    animation-duration: 2.4s;
  }
}

.administrator-info {
  padding: 20px 0;
  font-size: 12px;
  color: var(--muted);
}

.administrator-info-toggle {
  border: 0;
  background: none;
  padding: 0 0 0 4px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  font-size: inherit;
  text-decoration: underline;
}

.text-uppercase {
  text-transform: uppercase;
}

.simple-check {
  display: block;
  position: relative;
  padding-left: 38px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
  font-weight: normal;
}

.simple-check input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #ccd1d9;
}

.simple-check input:checked ~ .checkmark {
  background-color: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.simple-check input:checked ~ .checkmark:after {
  display: block;
}

.simple-check .checkmark:after {
  left: 7px;
  top: 2px;
  width: 5px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.reg-link {
  text-decoration: underline;
  color: inherit;
  font-weight: 500;
}

.mobile-welcome-container {
  flex: 1;
  display: none;
  flex-direction: column;
  min-height: 100vh;
  max-height: 100vh;
  height: 100vh;
}

.mobile-welcome-header {
  padding: 40px 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-welcome-header img {
  width: 100%;
  max-width: 400px;
}

.mobile-welcome-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  min-height: 0;
}

.mobile-welcome-footer {
  padding: 30px 20px 20px;
}

.mobile-welcome-footer .btn {
  height: 50px;
  font-size: 16px;
  font-weight: 500;
}

.mobile-welcome-login-button {
  margin-top: 20px;
}

#login_container {
  display: none;
}

.qr-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  height: 100%;
  justify-content: space-between;
}

.qr-carousel-viewport {
  overflow: hidden;
  touch-action: pan-y;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.qr-carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
  width: 100%;
}

.qr-carousel-slide {
  min-width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
  flex: 0 0 100%;
}

.qr-carousel-header {
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 10px;
}

.qr-carousel-subheader {
  font-size: 16px;
  display: block;
  margin-bottom: 10px;
}

.qr-carousel-image {
  margin: 0 40px;
  width: 100%;
  max-height: 25vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-carousel-image img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  display: block;
  object-fit: contain;
}

.qr-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 18px 0 0;
}

.qr-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dbe1f7;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px #fff;
}

.qr-carousel-dot[aria-current="true"] {
  background: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(0, 177, 157, 0.15);
}

@media (max-height: 719px) {
  .qr-carousel-subheader {
    display: none;
  }
}

.required-in-check {
  color: var(--accent);
  font-size: 16px;
  position: absolute;
  left: 30px;
  top: -2px;
}

/* SSO error page — technical details */
.sso-error-details {
  margin-top: 32px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  max-width: 100%;
  min-width: 0;
}

.sso-error-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #757575;
}

.sso-error-details-content {
  margin-top: 12px;
  font-size: 12px;
  color: #555;
}

.sso-error-details-item {
  padding-bottom: 10px;
}

/* Long unbroken values (emails, exception messages, URLs) must wrap inside .account-box. */
.sso-error-details-value {
  margin: 4px 0 0;
  padding: 8px;
  max-width: 100%;
  font-family: monospace;
  font-size: inherit;
  color: inherit;
  background: #f7f7f7;
  border: 0;
  border-radius: 3px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 767px) {
  .sso-error-details {
    margin-top: 24px;
    padding: 10px;
  }

  .sso-error-details-content {
    font-size: 11px;
  }
}

@media (min-width: 992px) {
  .account-row-login {
    background: url("/images/reg-bg.png") center 105px no-repeat;
  }

  .account-row-login .account-row-content {
    width: 460px;
  }

  .account-row-login .login-mobile-footer {
    display: none;
  }

  .account-row-signin {
    background: url("/images/reg-bg.png") center 212px no-repeat;
  }

  .account-row-signin .account-row-content {
    width: 460px;
  }

  .account-mobile-only {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .account-body {
    font-size: 14px;
  }

  .account-row-content {
    padding: 0 30px;
    width: 100%;
  }

  .account-box {
    box-shadow: none;
    padding: 0;
  }

  .already-account {
    position: relative;
    right: 0;
    top: auto;
    margin-bottom: 40px;
    box-shadow: none;
    text-align: center;
  }

  .account-row-login {
    height: 100vh;
    height: 100dvh;
  }

  .account-row-login .account-box {
    margin: 0;
  }

  .account-row-login .account-row-content {
    padding: 0 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
  }

  .account-row-login .login-mobile-footer {
    text-align: center;
  }

  .account-container .material-shadow {
    box-shadow: none;
  }

  .signin-box {
    margin: 10px 0;
    padding: 20px;
  }

  .signin #logo {
    padding: 0 5px;
    display: block;
  }

  .forgot-password-mobile {
    position: absolute;
    right: 0;
    top: 15px;
    z-index: 10;
  }

  .account-desktop-only {
    display: none !important;
  }
}
