/* Sign-in security pages (AccountSecurity views). Builds on the shared form classes of main.css. */

.AccountSecurityEU .AccountSecurityText {
  margin: 0 0 10px 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.AccountSecurityEU .AccountSecurityHint {
  display: block;
  padding: 4px;
  color: #6c757d;
  font-size: 12px;
}

/* The recommendation at the top of the "Protect your account" page and of the
   overview of an account that only has a password. */
.AccountSecurityEU .AccountSecurityNotice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px 0;
  padding: 10px 12px;
  border: 1px solid #dce6f3;
  border-left: 4px solid #2f5dab;
  border-radius: 8px;
  background: #f3f7fc;
  color: #1f3f77;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.AccountSecurityEU .AccountSecurityNotice > i {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #2f5dab;
  font-size: 18px;
}

/* Required, not recommended: the user cannot go on before the set-up is done. */
.AccountSecurityEU .AccountSecurityNotice.IsRequired {
  border-color: #f1dfb3;
  border-left-color: #c98a00;
  background: #fdf7e7;
  color: #6b4a00;
}

.AccountSecurityEU .AccountSecurityNotice.IsRequired > i {
  color: #c98a00;
}

/* Why a Remove button is missing: this is the only protection of the account. */
.AccountSecurityEU .AccountSecurityKeepOne {
  margin: 6px 0 0 0;
  padding-left: 0;
}

.AccountSecurityEU .AccountSecuritySection {
  margin-top: 4px;
  padding-top: 8px;
}

.AccountSecurityEU .AccountSecuritySection + .AccountSecuritySection {
  border-top: 1px solid #dfe3e8;
  margin-top: 14px;
  padding-top: 12px;
}

.AccountSecurityEU .FormButtonEU i:not(.sentera-button-spinner) {
  margin-right: 6px;
}

/* A button that just did its work (Copy): green for a moment. The shared button
   layer (ActionButtons.css) sets colours with !important and a selector that
   contains an id, so this rule lives in the same layer and repeats the id to win. */
@layer sentera-action-buttons {
  #RecoveryCopyBtn#RecoveryCopyBtn.IsDoneEU {
    background: #d8efdc !important;
    border-color: #9fd3a9 !important;
    color: #1e6b2e !important;
  }
}

.AccountSecurityEU .AccountSecurityHeading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #2f5dab;
  font-size: 14px;
  font-weight: bold;
}

/* One column for the heading icons, whatever their own width. */
.AccountSecurityEU .AccountSecurityHeading > i,
.AccountSecurityEU .AccountSecurityHeading > .PasskeyIconEU {
  flex: 0 0 20px;
  width: 20px;
  font-size: 16px;
  text-align: center;
}

/* The passkey icon of the FIDO Alliance (Views/AccountSecurity/_PasskeyIcon.cshtml). */
.PasskeyIconEU {
  display: inline-block;
  width: 18px;
  height: 18px;
  fill: currentColor;
  vertical-align: -4px;
}

/* Stacked form buttons (log in, verify, use a passkey): one width for the stack, the
   icon in a fixed place at the left and the label centred, like the Log in button. */
.SecurityButtonStackEU {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 200px;
  max-width: 100%;
  margin-top: 30px;
}

.AccountSecurityEU .SecurityButtonStackEU {
  margin-top: 20px;
}

.SecurityButtonStackEU > .FormButtonEU {
  position: relative;
  width: auto;
  height: auto;
  min-height: 30px;
  margin: 0;
}

/* The leading icon only. The busy spinner that action-buttons.js appends is an <i>
   too: it keeps its own place at the right and its rotation, so nothing here may
   match it, and nothing here may use "transform" (the rotation animates it). */
.SecurityButtonStackEU > .FormButtonEU > i:first-child:not(.sentera-button-spinner),
.SecurityButtonStackEU > .FormButtonEU > .PasskeyIconEU {
  position: absolute;
  left: 12px;
  top: 50%;
  pointer-events: none;
}

.SecurityButtonStackEU > .FormButtonEU > i:first-child:not(.sentera-button-spinner) {
  margin: -7px 0 0 0;
  font-size: 14px;
  line-height: 14px;
}

.SecurityButtonStackEU > .FormButtonEU > .PasskeyIconEU {
  margin: -9px 0 0 0;
}

/* The label keeps its distance from the icon at the left and the spinner at the
   right, in every language. A button without the submit padding of the shared
   layer (34px a side) gets the same room here. */
.SecurityButtonStackEU > .FormButtonEU > span {
  display: inline-block;
  padding: 0 6px;
}

.SecurityButtonStackEU > .FormButtonEU:not(.sentera-submit-control) > span {
  padding: 0 30px;
}

/* Links and hints under the buttons. */
.AccountSecurityEU .AccountSecurityFoot {
  margin-top: 16px;
}

.AccountSecurityEU .AccountSecuritySection + .AccountSecurityFoot {
  border-top: 1px solid #dfe3e8;
  padding-top: 10px;
}

.AccountSecurityEU .AccountSecurityStatus {
  padding: 1px 8px;
  border-radius: 10px;
  background: #e9ecef;
  color: #495057;
  font-size: 12px;
  font-weight: normal;
}

.AccountSecurityEU .AccountSecurityStatus.IsOn {
  background: #d8efdc;
  color: #1e6b2e;
}

/* The ways to get the code of the second step (authenticator app, SMS, e-mail): one
   row each, with its description under the name. */
.AccountSecurityEU .AccountSecurityWays .AccountSecurityItem > span > i {
  width: 16px;
  color: #2f5dab;
  text-align: center;
}

.AccountSecurityEU .AccountSecurityWays .AccountSecurityStatus {
  margin-left: 6px;
}

/* The masked destination in a "Send a code" button: part of the label, never split. */
.SecurityButtonStackEU .AccountSecurityDest {
  display: inline-block;
  margin-left: 4px;
  font-weight: normal;
  white-space: nowrap;
  opacity: 0.9;
}

/* Security traps page: an address that is blocked now, and the counted lists. */
.AccountSecurityEU .AccountSecurityStatus.IsBlocked {
  background: #f8dcdc;
  color: #8a1c1c;
}

.AccountSecurityEU .AccountSecurityCounts li {
  flex-wrap: nowrap;
  padding: 5px 0;
}

.AccountSecurityEU .AccountSecurityCounts .AccountSecurityStatus {
  flex: 0 0 auto;
}

.AccountSecurityEU .AccountSecurityActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px 0;
}

.AccountSecurityEU .AccountSecurityActions form {
  margin: 0;
}

.AccountSecurityEU .AccountSecurityActions .FormButtonEU,
.AccountSecurityEU .AccountSecurityInline .FormButtonEU,
.AccountSecurityEU .AccountSecurityList .FormButtonEU {
  /* One width for the short actions (Replace, Remove, Rename, Print...); a longer
     label makes its button wider. */
  margin: 0;
  width: auto;
  /* 150px: a submit button carries 34px padding a side from the shared layer, a
     link 10px; at this width "Replace" (link) and "Remove" (submit) are equal. */
  min-width: 150px;
  height: auto;
  min-height: 30px;
}

.AccountSecurityEU .AccountSecurityList {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}

.AccountSecurityEU .AccountSecurityList li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 0;
  border-top: 1px solid #eef0f3;
}

.AccountSecurityEU .AccountSecurityList li:first-child {
  border-top: 0;
}

.AccountSecurityEU .AccountSecurityItem {
  flex: 1 1 220px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.AccountSecurityEU .AccountSecurityItem small {
  display: block;
  color: #6c757d;
}

.AccountSecurityEU .AccountSecurityList form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

/* A passkey row: name field and Rename share the space left of Remove; the dates sit
   on a line of their own underneath. */
.AccountSecurityEU .AccountSecurityList .AccountSecurityRename {
  flex: 1 1 260px;
  flex-wrap: nowrap;
  min-width: 0;
}

.AccountSecurityEU .AccountSecurityList input[type="text"],
.AccountSecurityEU .AccountSecurityInline input[type="text"] {
  flex: 1 1 120px;
  width: auto;
  min-width: 0;
  max-width: 100%;
}

.AccountSecurityEU .AccountSecurityMeta {
  flex: 0 0 100%;
  color: #6c757d;
}

.AccountSecurityEU .login-link {
  display: inline-block;
  padding: 4px;
}

/* "Not now" on the Protect your account page: the way on must be easy to find. */
.AccountSecurityEU #ProtectNotNow {
  font-size: 13px;
  font-weight: bold;
}

.AccountSecurityEU .AccountSecurityInline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

/* The "Sign-in security" entry on the My account page. */
.AccountSecurityEntryEU {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.AccountSecurityEntryEU .AccountSecurityEntryItemsEU {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  color: #2f5dab;
}

.AccountSecurityEntryEU .AccountSecurityEntryItemsEU i {
  width: 18px;
  font-size: 16px;
  text-align: center;
}

.AccountSecurityEntryEU .FormButtonEU {
  margin: 0;
  width: auto;
  min-width: 130px;
  height: auto;
  min-height: 30px;
}

.AccountSecurityEU .AccountSecurityQr {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 6px auto 10px auto;
}

.AccountSecurityEU .AccountSecurityKey {
  display: block;
  width: 100%;
  margin: 0 0 12px 0;
  padding: 8px 10px;
  border: 1px solid #dce6f3;
  border-radius: 8px;
  background: #f3f7fc;
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  letter-spacing: 1px;
  text-align: center;
  overflow-wrap: anywhere;
  user-select: all !important;
}

.AccountSecurityEU .RecoveryCodesEU {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  list-style: none;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #dce6f3;
  border-radius: 8px;
  background: #f3f7fc;
}

.AccountSecurityEU .RecoveryCodeEU {
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  white-space: nowrap;
  user-select: all !important;
}

.AccountSecurityEU .AccountSecurityDone {
  margin: 0 0 10px 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: #d8efdc;
  color: #1e6b2e;
}

.AccountSecurityEU .AccountSecurityDone.IsError {
  background: #f8d7da;
  color: #842029;
}

.AccountSecurityEU .text-center {
  margin-top: 10px;
}

@media (max-width: 480px) {
  .SecurityButtonStackEU {
    display: flex;
  }

  .AccountSecurityEU .RecoveryCodesEU {
    grid-template-columns: 1fr;
  }

  /* Phone: every action takes the full width, also the ones inside a form. */
  .AccountSecurityEU .AccountSecurityActions form,
  .AccountSecurityEU .AccountSecurityActions .FormButtonEU {
    flex: 1 1 100%;
    width: 100%;
  }

  /* Phone: a passkey row is the name field on one line, Rename and Remove side by
     side on the next. The two forms step aside so their controls share one row. */
  .AccountSecurityEU .AccountSecurityList li form {
    display: contents;
  }

  .AccountSecurityEU .AccountSecurityList li input[type="text"],
  .AccountSecurityEU .AccountSecurityInline input[type="text"],
  .AccountSecurityEU .AccountSecurityInline .FormButtonEU {
    flex: 1 1 100%;
  }

  .AccountSecurityEU .AccountSecurityList li .FormButtonEU {
    flex: 1 1 0;
    min-width: 0;
  }

  .AccountSecurityEntryEU .FormButtonEU {
    flex: 1 1 100%;
  }

  /* A way to get the code (authenticator app, SMS, e-mail): its name and description take
     the row, its buttons share the next one. Next to the text a button would be too
     narrow for its label. */
  .AccountSecurityEU .AccountSecurityWays .AccountSecurityItem {
    flex: 1 1 100%;
  }

  /* Security traps page: "Lift block" gets the full row under the details of its address. */
  .SecurityTrapsEU .AccountSecurityList li .FormButtonEU {
    flex: 1 1 100%;
  }
}

@media print {
  .AccountSecurityEU .AccountSecurityActions,
  .AccountSecurityEU .text-center {
    display: none;
  }
}
