.account-settings {
  position: relative;
  display: none;
  align-items: center;
}

.account-settings.is-ready {
  display: flex;
}

.account-settings-button {
  min-height: 36px;
  border: 1px solid rgba(190, 191, 220, 0.42);
  border-radius: 8px;
  padding: 0 13px;
  background: transparent;
  color: #dfe0f1;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.account-settings-button:hover,
.account-settings-button:focus-visible,
.account-settings-button[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.account-settings-popover {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 8px);
  right: 0;
  width: min(290px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #d9daea;
  border-radius: 11px;
  background: #fff;
  color: #0a0420;
  box-shadow: 0 18px 45px rgba(10, 4, 32, 0.2);
}

.account-settings--sidebar .account-settings-popover {
  top: auto;
  right: auto;
  bottom: calc(100% + 8px);
  left: 0;
}

.account-settings-email {
  overflow: hidden;
  padding: 13px 14px;
  border-bottom: 1px solid #e4e5ef;
  color: #626581;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-settings-action {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 0 14px;
  background: #fff;
  color: #0a0420;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.account-settings-action:hover,
.account-settings-action:focus-visible {
  background: #f2f2f8;
}

.account-settings-action--danger {
  border-top: 1px solid #e4e5ef;
  color: #bd3f48;
}

.account-password-dialog {
  width: min(460px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 15px;
  color: #0a0420;
  background: #fff;
  box-shadow: 0 25px 75px rgba(10, 4, 32, 0.3);
}

.account-password-dialog::backdrop {
  background: rgba(10, 4, 32, 0.62);
}

.account-password-panel {
  padding: 25px;
}

.account-password-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.account-password-heading h2,
.account-password-success h2 {
  margin: 0;
  color: #0a0420;
  font-size: 24px;
}

.account-password-close {
  min-width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: #626581;
  font-size: 26px;
  cursor: pointer;
}

.account-password-close:hover {
  background: #f2f2f8;
}

.account-password-field {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.account-password-field label {
  margin: 0;
  color: #4d526f;
  font-size: 12px;
  font-weight: 750;
}

.account-password-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd1e2;
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  color: #0a0420;
  font: inherit;
}

.account-password-field input:focus {
  border-color: #223180;
  outline: 3px solid rgba(34, 49, 128, 0.13);
}

.account-password-status {
  margin: 15px 0 0;
  padding: 10px 12px;
  border: 1px solid #f0b8bd;
  border-radius: 8px;
  background: #fff0f0;
  color: #a92e38;
  font-size: 13px;
}

.account-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.account-password-actions button,
.account-password-done {
  min-height: 40px;
  border: 1px solid #223180;
  border-radius: 8px;
  padding: 0 17px;
  background: #223180;
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.account-password-actions .account-password-cancel {
  border-color: #d4d6e5;
  background: #fff;
  color: #4d526f;
}

.account-password-success {
  padding: 34px 25px;
  text-align: center;
}

.account-password-success p {
  margin: 10px 0 22px;
  color: #626581;
}

.account-password-success-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ecf9f2;
  color: #16834f;
  font-size: 28px;
  line-height: 48px;
}

.sidebar-bottom .account-settings {
  display: flex;
  width: 100%;
}

.sidebar-bottom .account-settings-button {
  width: 100%;
  color: var(--sidebar-text, #bebfdc);
  text-align: left;
}

@media (max-width: 720px) {
  .account-settings-popover {
    position: fixed;
    top: 62px;
    right: 12px;
  }
}
